swagger: '2.0'
info:
  version: 1.0.0
  title: HaitiPay Web API
host: api.haitipay.com
basePath: /v1-dev
schemes:
  - https
paths:
  /accounts:
    post:
      tags:
        - Account
      summary: Create a new account.
      operationId: Account.create
      parameters:
        - name: data
          in: body
          description: Model instance data
          required: false
          schema:
            description: Model instance data
            $ref: '#/definitions/Account'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Account'
      deprecated: false
  '/accounts/{id}':
    get:
      tags:
        - Account
      summary: 'Find account by id'
      operationId: Account.findById
      parameters:
        - name: id
          in: path
          description: Model id
          required: true
          type: string
          format: JSON
        - name: filter
          in: query
          description: >-
            Filter defining fields and include - must be a JSON-encoded string
            ({"something":"value"})
          required: false
          type: string
          format: JSON
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Account'
      deprecated: false
    put:
      tags:
        - Account
      summary: >-
        Patch attributes for a model instance and persist it into the data
        source.
      operationId: 'Account.prototype.updateAttributes__put_accounts_{id}'
      parameters:
        - name: id
          in: path
          description: Account id
          required: true
          type: string
          format: JSON
        - name: data
          in: body
          description: An object of model property name/value pairs
          required: false
          schema:
            description: An object of model property name/value pairs
            $ref: '#/definitions/Account'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Account'
      deprecated: false
    patch:
      tags:
        - Account
      summary: >-
        Patch attributes for a model instance and persist it into the data
        source.
      operationId: 'Account.prototype.updateAttributes__patch_accounts_{id}'
      parameters:
        - name: id
          in: path
          description: Account id
          required: true
          type: string
          format: JSON
        - name: data
          in: body
          description: An object of model property name/value pairs
          required: false
          schema:
            description: An object of model property name/value pairs
            $ref: '#/definitions/Account'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Account'
      deprecated: false
  /accounts/login:
    post:
      tags:
        - Account
      summary: Login a user with username/email and password.
      operationId: Account.login
      parameters:
        - name: credentials
          in: body
          required: true
          schema:
            $ref: '#/definitions/LoginCredentials'
      responses:
        '200':
          description: Request was successful
          schema:
            description: >+
              The response body contains properties of the AccessToken created
              on login.

              Depending on the value of `include` parameter, the body may
              contain additional properties:

                - `user` - `U+007BUserU+007D` - Data of the currently logged in user. (`include=user`)

            type: object
      deprecated: false
  /accounts/logout:
    post:
      tags:
        - Account
      summary: Logout a user with access token.
      operationId: Account.logout
      parameters: []
      responses:
        '204':
          description: Request was successful
      deprecated: false
  '/accounts/{id}/changePassword':
    post:
      tags:
        - Account
      summary: Change account password
      operationId: Account.changePassword
      parameters:
        - name: id
          in: path
          required: true
          type: number
          format: double
        - name: data
          in: body
          required: true
          schema:
            $ref: '#/definitions/ChangePassword'
        - name: authorization
          in: query
          required: false
          type: string
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              message:
                type: string
              success:
                type: boolean
      deprecated: false
  '/accounts/{id}/verifyEmail':
    get:
      tags:
        - Account
      summary: Verify email using a verification token
      operationId: Account.verifyEmail
      parameters:
        - name: id
          in: path
          required: true
          type: number
          format: double
        - name: token
          in: query
          required: false
          type: string
        - name: apiKey
          in: query
          required: false
          type: string
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              message:
                type: string
              success:
                type: boolean
      deprecated: false
  '/accounts/{id}/verifyPhoneNumber':
    post:
      tags:
        - Account
      summary: Verify phone number using a verification token
      operationId: Account.verifyPhoneNumber
      parameters:
        - name: id
          in: path
          required: true
          type: number
          format: double
        - name: token
          in: body
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              message:
                type: string
              success:
                type: boolean
      deprecated: false
  '/accounts/{id}/resetVerificationToken':
    post:
      tags:
        - Account
      summary: Reset and resend verification tokens
      operationId: Account.resetVerificationToken
      parameters:
        - name: id
          in: path
          required: true
          type: number
          format: double
        - name: token
          in: body
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              message:
                type: string
              success:
                type: boolean
      deprecated: false
  '/accounts/{id}/paymentMethods':
    get:
      tags:
        - Account
      summary: Return registered payment methods for an account
      operationId: Account.paymentMethods
      parameters:
        - name: id
          in: path
          required: true
          type: number
          format: double
        - name: authorization
          in: query
          required: false
          type: string
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              message:
                type: string
              prefferedPaymentMethod:
                type: string
              wallets:
                type: array
                items:
                  type: object
              cards:
                type: array
                items:
                  type: object
              banks:
                type: array
                items:
                  type: object
              gifts:
                type: array
                items:
                  type: object
      deprecated: false
  /accounts/forgotPassword:
    get:
      tags:
        - Account
      summary: Send password reset link to email
      operationId: Account.forgotPassword
      parameters:
        - name: email
          in: query
          required: false
          type: string
        - name: apiKey
          in: query
          required: false
          type: string
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              message:
                type: string
              success:
                type: boolean
      deprecated: false
  /accounts/passwordReset:
    post:
      tags:
        - Account
      summary: Reset account password with email
      operationId: Account.passwordReset
      parameters:
        - name: email
          in: body
          required: false
          schema:
            type: string
        - name: password
          in: body
          required: false
          schema:
            type: string
        - name: token
          in: body
          required: false
          schema:
            type: string
        - name: apiKey
          in: query
          required: false
          type: string
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              message:
                type: string
              success:
                type: boolean
      deprecated: false
  '/accounts/{id}/avatar':
    post:
      tags:
        - Account
      summary: Upload account profile picture
      operationId: Account.avatar
      parameters:
        - name: id
          in: path
          required: true
          type: number
          format: double
        - name: image
          in: body
          required: false
          schema:
            type: object
        - name: authorization
          in: query
          required: false
          type: string
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              message:
                type: string
              success:
                type: boolean
      deprecated: false
  '/accounts/{id}/cards':
    post:
      tags:
        - Account
      summary: Add credit card
      operationId: Account.addCreditCard
      parameters:
        - name: id
          in: path
          required: true
          type: number
          format: double
        - name: data
          in: body
          required: true
          schema:
            $ref: '#/definitions/StripeSource'
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              message:
                type: string
              card:
                type: object
      deprecated: false
    get:
      tags:
        - Account
      summary: Find credit cards
      operationId: Account.findCreditCards
      parameters:
        - name: id
          in: path
          required: true
          type: number
          format: double
        - name: limit
          in: query
          required: false
          type: number
          format: double
        - name: authorization
          in: query
          required: false
          type: string
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              object:
                type: string
              data:
                type: object
      deprecated: false
  '/accounts/{id}/cards/{card}':
    get:
      tags:
        - Account
      summary: Find credit card by Id
      operationId: Account.findCreditCardById
      parameters:
        - name: id
          in: path
          required: true
          type: number
          format: double
        - name: card
          in: path
          required: true
          type: string
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              card:
                type: object
      deprecated: false
    delete:
      tags:
        - Account
      summary: Delete credit card by Id
      operationId: Account.deleteCreditCard
      parameters:
        - name: id
          in: path
          required: true
          type: number
          format: double
        - name: card
          in: path
          required: true
          type: string
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              deleted:
                type: boolean
              cardId:
                type: string
      deprecated: false
    put:
      tags:
        - Account
      summary: Update credit card by Id
      operationId: Account.updateCreditCard
      parameters:
        - name: id
          in: path
          required: true
          type: number
          format: double
        - name: card
          in: path
          required: true
          type: string
        - name: data
          in: body
          required: true
          schema:
            $ref: '#/definitions/StripeSource'
        - name: authorization
          in: query
          required: false
          type: string
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              message:
                type: string
              card:
                type: object
      deprecated: false
  '/accounts/{id}/history':
    get:
      tags:
        - Account
      summary: Account transaction history
      operationId: Account.history
      parameters:
        - name: id
          in: path
          required: true
          type: number
          format: double
        - name: limit
          in: query
          required: false
          type: string
        - name: authorization
          in: query
          required: false
          type: string
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              message:
                type: string
              wallets:
                type: array
                items:
                  type: object
              cards:
                type: array
                items:
                  type: object
              bank_accounts:
                type: array
                items:
                  type: object
      deprecated: false
  '/accounts/{id}/banks':
    post:
      tags:
        - Account
      summary: Add bank account
      operationId: Account.addBankAccount
      parameters:
        - name: id
          in: path
          required: true
          type: number
          format: double
        - name: data
          in: body
          required: true
          schema:
            $ref: '#/definitions/StripeSource'
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              message:
                type: string
              bank:
                type: object
      deprecated: false
    get:
      tags:
        - Account
      summary: Find bank accounts
      operationId: Account.findBankAccounts
      parameters:
        - name: id
          in: path
          required: true
          type: number
          format: double
        - name: limit
          in: query
          required: false
          type: number
          format: double
        - name: authorization
          in: query
          required: false
          type: string
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              object:
                type: string
              data:
                type: array
                items:
                  type: object
      deprecated: false
  '/accounts/{id}/banks/{bank}':
    get:
      tags:
        - Account
      summary: Find bank account by Id
      operationId: Account.findBankAccountById
      parameters:
        - name: id
          in: path
          required: true
          type: number
          format: double
        - name: bank
          in: path
          required: true
          type: string
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              bank:
                type: object
      deprecated: false
    delete:
      tags:
        - Account
      summary: Delete bank account by Id
      operationId: Account.deleteBankAccount
      parameters:
        - name: id
          in: path
          required: true
          type: number
          format: double
        - name: bank
          in: path
          required: true
          type: string
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              deleted:
                type: boolean
              bankId:
                type: string
      deprecated: false
    put:
      tags:
        - Account
      summary: Update bank account by Id
      operationId: Account.updateBankAccount
      parameters:
        - name: id
          in: path
          required: true
          type: number
          format: double
        - name: bank
          in: path
          required: true
          type: string
        - name: data
          in: body
          required: true
          schema:
            $ref: '#/definitions/StripeSource'
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              message:
                type: string
              bank:
                type: object
      deprecated: false
  '/accounts/{id}/banks/{bank}/verify':
    post:
      tags:
        - Account
      summary: Verify bank account
      operationId: Account.verifyBankAccount
      parameters:
        - name: id
          in: path
          required: true
          type: number
          format: double
        - name: bank
          in: path
          required: true
          type: string
        - name: token
          in: query
          required: false
          type: string
        - name: authorization
          in: query
          required: false
          type: string
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              message:
                type: string
              data:
                type: object
      deprecated: false
  '/contacts/{id}/account':
    get:
      tags:
        - Contact
      summary: Fetches belongsTo relation account.
      operationId: Contact.prototype.__get__account
      parameters:
        - name: id
          in: path
          description: Contact id
          required: true
          type: string
          format: JSON
        - name: refresh
          in: query
          required: false
          type: boolean
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Account'
      deprecated: false
  /contacts:
    post:
      tags:
        - Contact
      summary: Create a new instance of the model and persist it into the data source.
      operationId: Contact.create
      parameters:
        - name: data
          in: body
          description: Model instance data
          required: false
          schema:
            description: Model instance data
            $ref: '#/definitions/Contact'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Contact'
      deprecated: false
    get:
      tags:
        - Contact
      summary: Find all instances of the model matched by filter from the data source.
      operationId: Contact.find
      parameters:
        - name: filter
          in: query
          description: >-
            Filter defining fields, where, include, order, offset, and limit -
            must be a JSON-encoded string ({"something":"value"})
          required: false
          type: string
          format: JSON
      responses:
        '200':
          description: Request was successful
          schema:
            type: array
            items:
              $ref: '#/definitions/Contact'
      deprecated: false
  '/contacts/{id}':
    get:
      tags:
        - Contact
      summary: 'Find a model instance by {{id}} from the data source.'
      operationId: Contact.findById
      parameters:
        - name: id
          in: path
          description: Model id
          required: true
          type: string
          format: JSON
        - name: filter
          in: query
          description: >-
            Filter defining fields and include - must be a JSON-encoded string
            ({"something":"value"})
          required: false
          type: string
          format: JSON
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Contact'
      deprecated: false
    delete:
      tags:
        - Contact
      summary: 'Delete a model instance by {{id}} from the data source.'
      operationId: Contact.deleteById
      parameters:
        - name: id
          in: path
          description: Model id
          required: true
          type: string
          format: JSON
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
      deprecated: false
    put:
      tags:
        - Contact
      summary: >-
        Patch attributes for a model instance and persist it into the data
        source.
      operationId: 'Contact.prototype.updateAttributes__put_contacts_{id}'
      parameters:
        - name: id
          in: path
          description: Contact id
          required: true
          type: string
          format: JSON
        - name: data
          in: body
          description: An object of model property name/value pairs
          required: false
          schema:
            description: An object of model property name/value pairs
            $ref: '#/definitions/Contact'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Contact'
      deprecated: false
    patch:
      tags:
        - Contact
      summary: >-
        Patch attributes for a model instance and persist it into the data
        source.
      operationId: 'Contact.prototype.updateAttributes__patch_contacts_{id}'
      parameters:
        - name: id
          in: path
          description: Contact id
          required: true
          type: string
          format: JSON
        - name: data
          in: body
          description: An object of model property name/value pairs
          required: false
          schema:
            description: An object of model property name/value pairs
            $ref: '#/definitions/Contact'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Contact'
      deprecated: false
  '/contacts/{id}/avatar':
    post:
      tags:
        - Contact
      summary: Upload contact profile picture
      operationId: Contact.avatar
      parameters:
        - name: id
          in: path
          required: true
          type: number
          format: double
        - name: accountId
          in: body
          required: false
          schema:
            type: number
            format: double
        - name: authorization
          in: query
          required: false
          type: string
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              message:
                type: string
              data:
                type: object
      deprecated: false
  '/contacts/{id}/requestMoney':
    post:
      tags:
        - Contact
      summary: Request money from contact
      operationId: Contact.requestMoney
      parameters:
        - name: id
          in: path
          required: true
          type: number
          format: double
        - name: data
          in: body
          required: true
          schema:
            $ref: '#/definitions/RequestMoney'
        - name: authorization
          in: query
          required: false
          type: string
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              message:
                type: string
              data:
                type: object
      deprecated: false
  '/merchants/{id}/locations/{fk}':
    get:
      tags:
        - Merchant
      summary: Find a related item by id for locations.
      operationId: Merchant.prototype.__findById__locations
      parameters:
        - name: id
          in: path
          description: Merchant id
          required: true
          type: string
          format: JSON
        - name: fk
          in: path
          description: Foreign key for locations
          required: true
          type: string
          format: JSON
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Location'
      deprecated: false
    delete:
      tags:
        - Merchant
      summary: Delete a related item by id for locations.
      operationId: Merchant.prototype.__destroyById__locations
      parameters:
        - name: id
          in: path
          description: Merchant id
          required: true
          type: string
          format: JSON
        - name: fk
          in: path
          description: Foreign key for locations
          required: true
          type: string
          format: JSON
      responses:
        '204':
          description: Request was successful
      deprecated: false
    put:
      tags:
        - Merchant
      summary: Update a related item by id for locations.
      operationId: Merchant.prototype.__updateById__locations
      parameters:
        - name: id
          in: path
          description: Merchant id
          required: true
          type: string
          format: JSON
        - name: fk
          in: path
          description: Foreign key for locations
          required: true
          type: string
          format: JSON
        - name: data
          in: body
          required: false
          schema:
            $ref: '#/definitions/Location'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Location'
      deprecated: false
  '/merchants/{id}/products/{fk}':
    get:
      tags:
        - Merchant
      summary: Find a related item by id for products.
      operationId: Merchant.prototype.__findById__products
      parameters:
        - name: id
          in: path
          description: Merchant id
          required: true
          type: string
          format: JSON
        - name: fk
          in: path
          description: Foreign key for products
          required: true
          type: string
          format: JSON
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/ProductItem'
      deprecated: false
    delete:
      tags:
        - Merchant
      summary: Delete a related item by id for products.
      operationId: Merchant.prototype.__destroyById__products
      parameters:
        - name: id
          in: path
          description: Merchant id
          required: true
          type: string
          format: JSON
        - name: fk
          in: path
          description: Foreign key for products
          required: true
          type: string
          format: JSON
      responses:
        '204':
          description: Request was successful
      deprecated: false
    put:
      tags:
        - Merchant
      summary: Update a related item by id for products.
      operationId: Merchant.prototype.__updateById__products
      parameters:
        - name: id
          in: path
          description: Merchant id
          required: true
          type: string
          format: JSON
        - name: fk
          in: path
          description: Foreign key for products
          required: true
          type: string
          format: JSON
        - name: data
          in: body
          required: false
          schema:
            $ref: '#/definitions/ProductItem'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/ProductItem'
      deprecated: false
  '/merchants/{id}/vouchers/{fk}':
    get:
      tags:
        - Merchant
      summary: Find a related item by id for vouchers.
      operationId: Merchant.prototype.__findById__vouchers
      parameters:
        - name: id
          in: path
          description: Merchant id
          required: true
          type: string
          format: JSON
        - name: fk
          in: path
          description: Foreign key for vouchers
          required: true
          type: string
          format: JSON
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Voucher'
      deprecated: false
    delete:
      tags:
        - Merchant
      summary: Delete a related item by id for vouchers.
      operationId: Merchant.prototype.__destroyById__vouchers
      parameters:
        - name: id
          in: path
          description: Merchant id
          required: true
          type: string
          format: JSON
        - name: fk
          in: path
          description: Foreign key for vouchers
          required: true
          type: string
          format: JSON
      responses:
        '204':
          description: Request was successful
      deprecated: false
    put:
      tags:
        - Merchant
      summary: Update a related item by id for vouchers.
      operationId: Merchant.prototype.__updateById__vouchers
      parameters:
        - name: id
          in: path
          description: Merchant id
          required: true
          type: string
          format: JSON
        - name: fk
          in: path
          description: Foreign key for vouchers
          required: true
          type: string
          format: JSON
        - name: data
          in: body
          required: false
          schema:
            $ref: '#/definitions/Voucher'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Voucher'
      deprecated: false
  '/merchants/{id}/locations':
    get:
      tags:
        - Merchant
      summary: Queries locations of Merchant.
      operationId: Merchant.prototype.__get__locations
      parameters:
        - name: id
          in: path
          description: Merchant id
          required: true
          type: string
          format: JSON
        - name: filter
          in: query
          required: false
          type: string
          format: JSON
      responses:
        '200':
          description: Request was successful
          schema:
            type: array
            items:
              $ref: '#/definitions/Location'
      deprecated: false
    post:
      tags:
        - Merchant
      summary: Creates a new instance in locations of this model.
      operationId: Merchant.prototype.__create__locations
      parameters:
        - name: id
          in: path
          description: Merchant id
          required: true
          type: string
          format: JSON
        - name: data
          in: body
          required: false
          schema:
            $ref: '#/definitions/Location'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Location'
      deprecated: false
  '/merchants/{id}/locations/count':
    get:
      tags:
        - Merchant
      summary: Counts locations of Merchant.
      operationId: Merchant.prototype.__count__locations
      parameters:
        - name: id
          in: path
          description: Merchant id
          required: true
          type: string
          format: JSON
        - name: where
          in: query
          description: Criteria to match model instances
          required: false
          type: string
          format: JSON
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              count:
                type: number
                format: double
      deprecated: false
  '/merchants/{id}/products':
    get:
      tags:
        - Merchant
      summary: Queries products of Merchant.
      operationId: Merchant.prototype.__get__products
      parameters:
        - name: id
          in: path
          description: Merchant id
          required: true
          type: string
          format: JSON
        - name: filter
          in: query
          required: false
          type: string
          format: JSON
      responses:
        '200':
          description: Request was successful
          schema:
            type: array
            items:
              $ref: '#/definitions/ProductItem'
      deprecated: false
    post:
      tags:
        - Merchant
      summary: Creates a new instance in products of this model.
      operationId: Merchant.prototype.__create__products
      parameters:
        - name: id
          in: path
          description: Merchant id
          required: true
          type: string
          format: JSON
        - name: data
          in: body
          required: false
          schema:
            $ref: '#/definitions/ProductItem'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/ProductItem'
      deprecated: false
  '/merchants/{id}/vouchers':
    get:
      tags:
        - Merchant
      summary: Queries vouchers of Merchant.
      operationId: Merchant.prototype.__get__vouchers
      parameters:
        - name: id
          in: path
          description: Merchant id
          required: true
          type: string
          format: JSON
        - name: filter
          in: query
          required: false
          type: string
          format: JSON
      responses:
        '200':
          description: Request was successful
          schema:
            type: array
            items:
              $ref: '#/definitions/Voucher'
      deprecated: false
    post:
      tags:
        - Merchant
      summary: Creates a new instance in vouchers of this model.
      operationId: Merchant.prototype.__create__vouchers
      parameters:
        - name: id
          in: path
          description: Merchant id
          required: true
          type: string
          format: JSON
        - name: data
          in: body
          required: false
          schema:
            $ref: '#/definitions/Voucher'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Voucher'
      deprecated: false
    delete:
      tags:
        - Merchant
      summary: Deletes all vouchers of this model.
      operationId: Merchant.prototype.__delete__vouchers
      parameters:
        - name: id
          in: path
          description: Merchant id
          required: true
          type: string
          format: JSON
      responses:
        '204':
          description: Request was successful
      deprecated: false
  '/merchants/{id}/vouchers/count':
    get:
      tags:
        - Merchant
      summary: Counts vouchers of Merchant.
      operationId: Merchant.prototype.__count__vouchers
      parameters:
        - name: id
          in: path
          description: Merchant id
          required: true
          type: string
          format: JSON
        - name: where
          in: query
          description: Criteria to match model instances
          required: false
          type: string
          format: JSON
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              count:
                type: number
                format: double
      deprecated: false
  /merchants:
    post:
      tags:
        - Merchant
      summary: Create a new instance of the model and persist it into the data source.
      operationId: Merchant.create
      parameters:
        - name: data
          in: body
          description: Model instance data
          required: false
          schema:
            description: Model instance data
            $ref: '#/definitions/Merchant'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Merchant'
      deprecated: false
    get:
      tags:
        - Merchant
      summary: Find all instances of the model matched by filter from the data source.
      operationId: Merchant.find
      parameters:
        - name: filter
          in: query
          description: >-
            Filter defining fields, where, include, order, offset, and limit -
            must be a JSON-encoded string ({"something":"value"})
          required: false
          type: string
          format: JSON
      responses:
        '200':
          description: Request was successful
          schema:
            type: array
            items:
              $ref: '#/definitions/Merchant'
      deprecated: false
  '/merchants/{id}':
    get:
      tags:
        - Merchant
      summary: 'Find a model instance by {{id}} from the data source.'
      operationId: Merchant.findById
      parameters:
        - name: id
          in: path
          description: Model id
          required: true
          type: string
          format: JSON
        - name: filter
          in: query
          description: >-
            Filter defining fields and include - must be a JSON-encoded string
            ({"something":"value"})
          required: false
          type: string
          format: JSON
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Merchant'
      deprecated: false
    put:
      tags:
        - Merchant
      summary: >-
        Patch attributes for a model instance and persist it into the data
        source.
      operationId: 'Merchant.prototype.updateAttributes__put_merchants_{id}'
      parameters:
        - name: id
          in: path
          description: Merchant id
          required: true
          type: string
          format: JSON
        - name: data
          in: body
          description: An object of model property name/value pairs
          required: false
          schema:
            description: An object of model property name/value pairs
            $ref: '#/definitions/Merchant'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Merchant'
      deprecated: false
    patch:
      tags:
        - Merchant
      summary: >-
        Patch attributes for a model instance and persist it into the data
        source.
      operationId: 'Merchant.prototype.updateAttributes__patch_merchants_{id}'
      parameters:
        - name: id
          in: path
          description: Merchant id
          required: true
          type: string
          format: JSON
        - name: data
          in: body
          description: An object of model property name/value pairs
          required: false
          schema:
            description: An object of model property name/value pairs
            $ref: '#/definitions/Merchant'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Merchant'
      deprecated: false
  '/merchants/{id}/credentials':
    put:
      tags:
        - Merchant
      summary: Set Merchant credentials
      operationId: Merchant.setCredentials
      parameters:
        - name: id
          in: path
          required: true
          type: number
          format: double
        - name: data
          in: body
          required: false
          schema:
            $ref: '#/definitions/Merchant'
        - name: authorization
          in: query
          required: false
          type: string
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              message:
                type: string
              merchantName:
                type: string
      deprecated: false
  '/merchants/{id}/transactionCode':
    post:
      tags:
        - Merchant
      summary: Request a merchant transaction code
      operationId: Merchant.transactionCode
      parameters:
        - name: data
          in: body
          required: false
          schema:
            $ref: '#/definitions/GetCode'
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              message:
                type: string
              merchantId:
                type: string
              phoneNumber:
                type: string
              amount:
                type: string
      deprecated: false
  '/agents/{id}/locations/{fk}':
    get:
      tags:
        - Agent
      summary: Find a related item by id for locations.
      operationId: Agent.prototype.__findById__locations
      parameters:
        - name: id
          in: path
          description: Agent id
          required: true
          type: string
          format: JSON
        - name: fk
          in: path
          description: Foreign key for locations
          required: true
          type: string
          format: JSON
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Location'
      deprecated: false
    delete:
      tags:
        - Agent
      summary: Delete a related item by id for locations.
      operationId: Agent.prototype.__destroyById__locations
      parameters:
        - name: id
          in: path
          description: Agent id
          required: true
          type: string
          format: JSON
        - name: fk
          in: path
          description: Foreign key for locations
          required: true
          type: string
          format: JSON
      responses:
        '204':
          description: Request was successful
      deprecated: false
    put:
      tags:
        - Agent
      summary: Update a related item by id for locations.
      operationId: Agent.prototype.__updateById__locations
      parameters:
        - name: id
          in: path
          description: Agent id
          required: true
          type: string
          format: JSON
        - name: fk
          in: path
          description: Foreign key for locations
          required: true
          type: string
          format: JSON
        - name: data
          in: body
          required: false
          schema:
            $ref: '#/definitions/Location'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Location'
      deprecated: false
  '/agents/{id}/locations':
    get:
      tags:
        - Agent
      summary: Queries locations of Agent.
      operationId: Agent.prototype.__get__locations
      parameters:
        - name: id
          in: path
          description: Agent id
          required: true
          type: string
          format: JSON
        - name: filter
          in: query
          required: false
          type: string
          format: JSON
      responses:
        '200':
          description: Request was successful
          schema:
            type: array
            items:
              $ref: '#/definitions/Location'
      deprecated: false
    post:
      tags:
        - Agent
      summary: Creates a new instance in locations of this model.
      operationId: Agent.prototype.__create__locations
      parameters:
        - name: id
          in: path
          description: Agent id
          required: true
          type: string
          format: JSON
        - name: data
          in: body
          required: false
          schema:
            $ref: '#/definitions/Location'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Location'
      deprecated: false
  '/agents/{id}/locations/count':
    get:
      tags:
        - Agent
      summary: Counts locations of Agent.
      operationId: Agent.prototype.__count__locations
      parameters:
        - name: id
          in: path
          description: Agent id
          required: true
          type: string
          format: JSON
        - name: where
          in: query
          description: Criteria to match model instances
          required: false
          type: string
          format: JSON
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              count:
                type: number
                format: double
      deprecated: false
  /agents:
    post:
      tags:
        - Agent
      summary: Create a new instance of the model and persist it into the data source.
      operationId: Agent.create
      parameters:
        - name: data
          in: body
          description: Model instance data
          required: false
          schema:
            description: Model instance data
            $ref: '#/definitions/Agent'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Agent'
      deprecated: false
    get:
      tags:
        - Agent
      summary: Find all instances of the model matched by filter from the data source.
      operationId: Agent.find
      parameters:
        - name: filter
          in: query
          description: >-
            Filter defining fields, where, include, order, offset, and limit -
            must be a JSON-encoded string ({"something":"value"})
          required: false
          type: string
          format: JSON
      responses:
        '200':
          description: Request was successful
          schema:
            type: array
            items:
              $ref: '#/definitions/Agent'
      deprecated: false
  '/agents/{id}':
    get:
      tags:
        - Agent
      summary: 'Find a model instance by {{id}} from the data source.'
      operationId: Agent.findById
      parameters:
        - name: id
          in: path
          description: Model id
          required: true
          type: string
          format: JSON
        - name: filter
          in: query
          description: >-
            Filter defining fields and include - must be a JSON-encoded string
            ({"something":"value"})
          required: false
          type: string
          format: JSON
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Agent'
      deprecated: false
    put:
      tags:
        - Agent
      summary: >-
        Patch attributes for a model instance and persist it into the data
        source.
      operationId: 'Agent.prototype.updateAttributes__put_agents_{id}'
      parameters:
        - name: id
          in: path
          description: Agent id
          required: true
          type: string
          format: JSON
        - name: data
          in: body
          description: An object of model property name/value pairs
          required: false
          schema:
            description: An object of model property name/value pairs
            $ref: '#/definitions/Agent'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Agent'
      deprecated: false
    patch:
      tags:
        - Agent
      summary: >-
        Patch attributes for a model instance and persist it into the data
        source.
      operationId: 'Agent.prototype.updateAttributes__patch_agents_{id}'
      parameters:
        - name: id
          in: path
          description: Agent id
          required: true
          type: string
          format: JSON
        - name: data
          in: body
          description: An object of model property name/value pairs
          required: false
          schema:
            description: An object of model property name/value pairs
            $ref: '#/definitions/Agent'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Agent'
      deprecated: false
  '/agents/{id}/credentials':
    put:
      tags:
        - Agent
      summary: Set Agent credentials
      operationId: Agent.setCredentials
      parameters:
        - name: id
          in: path
          required: true
          type: number
          format: double
        - name: data
          in: body
          required: false
          schema:
            $ref: '#/definitions/Agent'
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              message:
                type: string
      deprecated: false
  '/agents/{id}/billPayment':
    post:
      tags:
        - Agent
      summary: Bill payment
      operationId: Agent.billPayment
      parameters:
        - name: data
          in: body
          required: false
          schema:
            $ref: '#/definitions/Bill'
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              agentId:
                type: number
                format: double
              merchantId:
                type: number
                format: double
              phoneNumber:
                type: string
              amount:
                type: number
                format: double
              result:
                type: string
      deprecated: false
  '/agents/{id}/transfer':
    post:
      tags:
        - Agent
      summary: Agent to Agent transfer
      operationId: Agent.transfer
      parameters:
        - name: data
          in: body
          required: false
          schema:
            $ref: '#/definitions/Bill'
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              message:
                type: string
              sender:
                type: string
              senderRefId:
                type: number
                format: double
              receiver:
                type: string
              receiverRefId:
                type: number
                format: double
              amount:
                type: number
                format: double
              currency:
                type: string
              created:
                type: object
      deprecated: false
  /exchange-rates:
    post:
      tags:
        - Exchange
      summary: Create a new instance of the model and persist it into the data source.
      operationId: Exchange.create
      parameters:
        - name: data
          in: body
          description: Model instance data
          required: false
          schema:
            description: Model instance data
            $ref: '#/definitions/Exchange'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Exchange'
      deprecated: false
    get:
      tags:
        - Exchange
      summary: Find all instances of the model matched by filter from the data source.
      operationId: Exchange.find
      parameters:
        - name: filter
          in: query
          description: >-
            Filter defining fields, where, include, order, offset, and limit -
            must be a JSON-encoded string ({"something":"value"})
          required: false
          type: string
          format: JSON
      responses:
        '200':
          description: Request was successful
          schema:
            type: array
            items:
              $ref: '#/definitions/Exchange'
      deprecated: false
  '/exchange-rates/{id}':
    get:
      tags:
        - Exchange
      summary: 'Find a model instance by {{id}} from the data source.'
      operationId: Exchange.findById
      parameters:
        - name: id
          in: path
          description: Model id
          required: true
          type: string
          format: JSON
        - name: filter
          in: query
          description: >-
            Filter defining fields and include - must be a JSON-encoded string
            ({"something":"value"})
          required: false
          type: string
          format: JSON
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Exchange'
      deprecated: false
    put:
      tags:
        - Exchange
      summary: >-
        Patch attributes for a model instance and persist it into the data
        source.
      operationId: 'Exchange.prototype.updateAttributes__put_exchange-rates_{id}'
      parameters:
        - name: id
          in: path
          description: Exchange id
          required: true
          type: string
          format: JSON
        - name: data
          in: body
          description: An object of model property name/value pairs
          required: false
          schema:
            description: An object of model property name/value pairs
            $ref: '#/definitions/Exchange'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Exchange'
      deprecated: false
    patch:
      tags:
        - Exchange
      summary: >-
        Patch attributes for a model instance and persist it into the data
        source.
      operationId: 'Exchange.prototype.updateAttributes__patch_exchange-rates_{id}'
      parameters:
        - name: id
          in: path
          description: Exchange id
          required: true
          type: string
          format: JSON
        - name: data
          in: body
          description: An object of model property name/value pairs
          required: false
          schema:
            description: An object of model property name/value pairs
            $ref: '#/definitions/Exchange'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Exchange'
      deprecated: false
  /locations:
    post:
      tags:
        - Location
      summary: Create a new instance of the model and persist it into the data source.
      operationId: Location.create
      parameters:
        - name: data
          in: body
          description: Model instance data
          required: false
          schema:
            description: Model instance data
            $ref: '#/definitions/Location'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Location'
      deprecated: false
    get:
      tags:
        - Location
      summary: Find all instances of the model matched by filter from the data source.
      operationId: Location.find
      parameters:
        - name: filter
          in: query
          description: >-
            Filter defining fields, where, include, order, offset, and limit -
            must be a JSON-encoded string ({"something":"value"})
          required: false
          type: string
          format: JSON
      responses:
        '200':
          description: Request was successful
          schema:
            type: array
            items:
              $ref: '#/definitions/Location'
      deprecated: false
  '/locations/{id}':
    get:
      tags:
        - Location
      summary: 'Find a model instance by {{id}} from the data source.'
      operationId: Location.findById
      parameters:
        - name: id
          in: path
          description: Model id
          required: true
          type: string
          format: JSON
        - name: filter
          in: query
          description: >-
            Filter defining fields and include - must be a JSON-encoded string
            ({"something":"value"})
          required: false
          type: string
          format: JSON
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Location'
      deprecated: false
    put:
      tags:
        - Location
      summary: >-
        Patch attributes for a model instance and persist it into the data
        source.
      operationId: 'Location.prototype.updateAttributes__put_locations_{id}'
      parameters:
        - name: id
          in: path
          description: Location id
          required: true
          type: string
          format: JSON
        - name: data
          in: body
          description: An object of model property name/value pairs
          required: false
          schema:
            description: An object of model property name/value pairs
            $ref: '#/definitions/Location'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Location'
      deprecated: false
    patch:
      tags:
        - Location
      summary: >-
        Patch attributes for a model instance and persist it into the data
        source.
      operationId: 'Location.prototype.updateAttributes__patch_locations_{id}'
      parameters:
        - name: id
          in: path
          description: Location id
          required: true
          type: string
          format: JSON
        - name: data
          in: body
          description: An object of model property name/value pairs
          required: false
          schema:
            description: An object of model property name/value pairs
            $ref: '#/definitions/Location'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Location'
      deprecated: false
  '/locations/{id}/credentials':
    put:
      tags:
        - Location
      summary: Set Location credentials
      operationId: Location.setCredentials
      parameters:
        - name: id
          in: path
          required: true
          type: number
          format: double
        - name: data
          in: body
          required: false
          schema:
            $ref: '#/definitions/Location'
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              message:
                type: string
      deprecated: false
  /topup:
    post:
      tags:
        - Topup
      summary: Create a new instance of the model and persist it into the data source.
      operationId: Topup.create
      parameters:
        - name: data
          in: body
          description: Model instance data
          required: false
          schema:
            description: Model instance data
            $ref: '#/definitions/Topup'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Topup'
      deprecated: false
    get:
      tags:
        - Topup
      summary: Find all instances of the model matched by filter from the data source.
      operationId: Topup.find
      parameters:
        - name: filter
          in: query
          description: >-
            Filter defining fields, where, include, order, offset, and limit -
            must be a JSON-encoded string ({"something":"value"})
          required: false
          type: string
          format: JSON
      responses:
        '200':
          description: Request was successful
          schema:
            type: array
            items:
              $ref: '#/definitions/Topup'
      deprecated: false
  '/topup/{id}':
    get:
      tags:
        - Topup
      summary: 'Find a model instance by {{id}} from the data source.'
      operationId: Topup.findById
      parameters:
        - name: id
          in: path
          description: Model id
          required: true
          type: string
          format: JSON
        - name: filter
          in: query
          description: >-
            Filter defining fields and include - must be a JSON-encoded string
            ({"something":"value"})
          required: false
          type: string
          format: JSON
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Topup'
      deprecated: false
    put:
      tags:
        - Topup
      summary: >-
        Patch attributes for a model instance and persist it into the data
        source.
      operationId: 'Topup.prototype.updateAttributes__put_topup_{id}'
      parameters:
        - name: id
          in: path
          description: Topup id
          required: true
          type: string
          format: JSON
        - name: data
          in: body
          description: An object of model property name/value pairs
          required: false
          schema:
            description: An object of model property name/value pairs
            $ref: '#/definitions/Topup'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Topup'
      deprecated: false
    patch:
      tags:
        - Topup
      summary: >-
        Patch attributes for a model instance and persist it into the data
        source.
      operationId: 'Topup.prototype.updateAttributes__patch_topup_{id}'
      parameters:
        - name: id
          in: path
          description: Topup id
          required: true
          type: string
          format: JSON
        - name: data
          in: body
          description: An object of model property name/value pairs
          required: false
          schema:
            description: An object of model property name/value pairs
            $ref: '#/definitions/Topup'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Topup'
      deprecated: false
  /topup/packages:
    get:
      tags:
        - Topup
      summary: Return available topup packages
      operationId: Topup.packages
      parameters:
        - name: realm
          in: query
          required: false
          type: string
        - name: category
          in: query
          required: false
          type: string
        - name: authorization
          in: query
          required: false
          type: string
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              success:
                type: boolean
              packages:
                type: array
                items:
                  type: object
      deprecated: false
  '/bills/{id}/agent':
    get:
      tags:
        - Bill
      summary: Fetches belongsTo relation agent.
      operationId: Bill.prototype.__get__agent
      parameters:
        - name: id
          in: path
          description: Bill id
          required: true
          type: string
          format: JSON
        - name: refresh
          in: query
          required: false
          type: boolean
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Agent'
      deprecated: false
  /bills:
    post:
      tags:
        - Bill
      summary: Create a new instance of the model and persist it into the data source.
      operationId: Bill.create
      parameters:
        - name: data
          in: body
          description: Model instance data
          required: false
          schema:
            description: Model instance data
            $ref: '#/definitions/Bill'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Bill'
      deprecated: false
    get:
      tags:
        - Bill
      summary: Find all instances of the model matched by filter from the data source.
      operationId: Bill.find
      parameters:
        - name: filter
          in: query
          description: >-
            Filter defining fields, where, include, order, offset, and limit -
            must be a JSON-encoded string ({"something":"value"})
          required: false
          type: string
          format: JSON
      responses:
        '200':
          description: Request was successful
          schema:
            type: array
            items:
              $ref: '#/definitions/Bill'
      deprecated: false
  '/bills/{id}':
    get:
      tags:
        - Bill
      summary: 'Find a model instance by {{id}} from the data source.'
      operationId: Bill.findById
      parameters:
        - name: id
          in: path
          description: Model id
          required: true
          type: string
          format: JSON
        - name: filter
          in: query
          description: >-
            Filter defining fields and include - must be a JSON-encoded string
            ({"something":"value"})
          required: false
          type: string
          format: JSON
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Bill'
      deprecated: false
    put:
      tags:
        - Bill
      summary: >-
        Patch attributes for a model instance and persist it into the data
        source.
      operationId: 'Bill.prototype.updateAttributes__put_bills_{id}'
      parameters:
        - name: id
          in: path
          description: Bill id
          required: true
          type: string
          format: JSON
        - name: data
          in: body
          description: An object of model property name/value pairs
          required: false
          schema:
            description: An object of model property name/value pairs
            $ref: '#/definitions/Bill'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Bill'
      deprecated: false
    patch:
      tags:
        - Bill
      summary: >-
        Patch attributes for a model instance and persist it into the data
        source.
      operationId: 'Bill.prototype.updateAttributes__patch_bills_{id}'
      parameters:
        - name: id
          in: path
          description: Bill id
          required: true
          type: string
          format: JSON
        - name: data
          in: body
          description: An object of model property name/value pairs
          required: false
          schema:
            description: An object of model property name/value pairs
            $ref: '#/definitions/Bill'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Bill'
      deprecated: false
  /deliveries:
    post:
      tags:
        - Delivery
      summary: Create a new instance of the model and persist it into the data source.
      operationId: Delivery.create
      parameters:
        - name: data
          in: body
          description: Model instance data
          required: false
          schema:
            description: Model instance data
            $ref: '#/definitions/Delivery'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Delivery'
      deprecated: false
    get:
      tags:
        - Delivery
      summary: Find all instances of the model matched by filter from the data source.
      operationId: Delivery.find
      parameters:
        - name: filter
          in: query
          description: >-
            Filter defining fields, where, include, order, offset, and limit -
            must be a JSON-encoded string ({"something":"value"})
          required: false
          type: string
          format: JSON
      responses:
        '200':
          description: Request was successful
          schema:
            type: array
            items:
              $ref: '#/definitions/Delivery'
      deprecated: false
  '/deliveries/{id}':
    get:
      tags:
        - Delivery
      summary: 'Find a model instance by {{id}} from the data source.'
      operationId: Delivery.findById
      parameters:
        - name: id
          in: path
          description: Model id
          required: true
          type: string
          format: JSON
        - name: filter
          in: query
          description: >-
            Filter defining fields and include - must be a JSON-encoded string
            ({"something":"value"})
          required: false
          type: string
          format: JSON
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Delivery'
      deprecated: false
    put:
      tags:
        - Delivery
      summary: >-
        Patch attributes for a model instance and persist it into the data
        source.
      operationId: 'Delivery.prototype.updateAttributes__put_deliveries_{id}'
      parameters:
        - name: id
          in: path
          description: Delivery id
          required: true
          type: string
          format: JSON
        - name: data
          in: body
          description: An object of model property name/value pairs
          required: false
          schema:
            description: An object of model property name/value pairs
            $ref: '#/definitions/Delivery'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Delivery'
      deprecated: false
    patch:
      tags:
        - Delivery
      summary: >-
        Patch attributes for a model instance and persist it into the data
        source.
      operationId: 'Delivery.prototype.updateAttributes__patch_deliveries_{id}'
      parameters:
        - name: id
          in: path
          description: Delivery id
          required: true
          type: string
          format: JSON
        - name: data
          in: body
          description: An object of model property name/value pairs
          required: false
          schema:
            description: An object of model property name/value pairs
            $ref: '#/definitions/Delivery'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Delivery'
      deprecated: false
  '/wallet/{id}/account':
    get:
      tags:
        - Wallet
      summary: Fetches belongsTo relation account.
      operationId: Wallet.prototype.__get__account
      parameters:
        - name: id
          in: path
          description: Wallet id
          required: true
          type: string
          format: JSON
        - name: refresh
          in: query
          required: false
          type: boolean
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Account'
      deprecated: false
  '/wallet/{id}/vouchers/{fk}':
    get:
      tags:
        - Wallet
      summary: Find a related item by id for vouchers.
      operationId: Wallet.prototype.__findById__vouchers
      parameters:
        - name: id
          in: path
          description: Wallet id
          required: true
          type: string
          format: JSON
        - name: fk
          in: path
          description: Foreign key for vouchers
          required: true
          type: string
          format: JSON
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Voucher'
      deprecated: false
    delete:
      tags:
        - Wallet
      summary: Delete a related item by id for vouchers.
      operationId: Wallet.prototype.__destroyById__vouchers
      parameters:
        - name: id
          in: path
          description: Wallet id
          required: true
          type: string
          format: JSON
        - name: fk
          in: path
          description: Foreign key for vouchers
          required: true
          type: string
          format: JSON
      responses:
        '204':
          description: Request was successful
      deprecated: false
    put:
      tags:
        - Wallet
      summary: Update a related item by id for vouchers.
      operationId: Wallet.prototype.__updateById__vouchers
      parameters:
        - name: id
          in: path
          description: Wallet id
          required: true
          type: string
          format: JSON
        - name: fk
          in: path
          description: Foreign key for vouchers
          required: true
          type: string
          format: JSON
        - name: data
          in: body
          required: false
          schema:
            $ref: '#/definitions/Voucher'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Voucher'
      deprecated: false
  '/wallet/{id}/vouchers':
    get:
      tags:
        - Wallet
      summary: Fetch wallet vouchers (gift cards)
      operationId: Wallet.prototype.giftCards
      parameters:
        - name: id
          in: path
          description: Wallet id
          required: true
          type: string
          format: JSON
        - name: phoneNumber
          in: query
          required: true
          type: string
        - name: pincode
          in: query
          required: true
          type: string
        - name: authorization
          in: query
          required: false
          type: string
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              message:
                type: string
              data:
                type: object
      deprecated: false
    post:
      tags:
        - Wallet
      summary: Creates a new instance in vouchers of this model.
      operationId: Wallet.prototype.__create__vouchers
      parameters:
        - name: id
          in: path
          description: Wallet id
          required: true
          type: string
          format: JSON
        - name: data
          in: body
          required: false
          schema:
            $ref: '#/definitions/Voucher'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Voucher'
      deprecated: false
    delete:
      tags:
        - Wallet
      summary: Deletes all vouchers of this model.
      operationId: Wallet.prototype.__delete__vouchers
      parameters:
        - name: id
          in: path
          description: Wallet id
          required: true
          type: string
          format: JSON
      responses:
        '204':
          description: Request was successful
      deprecated: false
  '/wallet/{id}/vouchers/count':
    get:
      tags:
        - Wallet
      summary: Counts vouchers of Wallet.
      operationId: Wallet.prototype.__count__vouchers
      parameters:
        - name: id
          in: path
          description: Wallet id
          required: true
          type: string
          format: JSON
        - name: where
          in: query
          description: Criteria to match model instances
          required: false
          type: string
          format: JSON
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              count:
                type: number
                format: double
      deprecated: false
  '/wallet/{id}':
    get:
      tags:
        - Wallet
      summary: 'Find a model instance by {{id}} from the data source.'
      operationId: Wallet.findById
      parameters:
        - name: id
          in: path
          description: Model id
          required: true
          type: string
          format: JSON
        - name: filter
          in: query
          description: >-
            Filter defining fields and include - must be a JSON-encoded string
            ({"something":"value"})
          required: false
          type: string
          format: JSON
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Wallet'
      deprecated: false
    delete:
      tags:
        - Wallet
      summary: 'Delete a model instance by {{id}} from the data source.'
      operationId: Wallet.deleteById
      parameters:
        - name: id
          in: path
          description: Model id
          required: true
          type: string
          format: JSON
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
      deprecated: false
  /wallet:
    post:
      tags:
        - Wallet
      summary: Register and link wallet
      operationId: Wallet.link
      parameters:
        - name: data
          in: body
          required: true
          schema:
            $ref: '#/definitions/Wallet'
        - name: authorization
          in: query
          required: false
          type: string
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              message:
                type: string
              data:
                type: object
      deprecated: false
  /wallet/vouchers:
    post:
      tags:
        - Wallet
      summary: Send dedicated amount with Merchant account (gift card)
      operationId: Wallet.sendGift
      parameters:
        - name: data
          in: body
          required: true
          schema:
            $ref: '#/definitions/Wallet'
        - name: authorization
          in: query
          required: false
          type: string
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              message:
                type: string
              data:
                type: object
      deprecated: false
  /wallet/transfer:
    post:
      tags:
        - Wallet
      summary: Moving funds from sender to receiver wallet with Merchant account
      operationId: Wallet.transfer
      parameters:
        - name: data
          in: body
          required: true
          schema:
            $ref: '#/definitions/Wallet'
        - name: authorization
          in: query
          required: false
          type: string
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              message:
                type: string
              data:
                type: object
      deprecated: false
  /wallet/debit:
    post:
      tags:
        - Wallet
      summary: Debit wallet with Merchant or Agent account
      operationId: Wallet.debit
      parameters:
        - name: data
          in: body
          required: true
          schema:
            $ref: '#/definitions/Wallet'
        - name: authorization
          in: query
          required: false
          type: string
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              message:
                type: string
              data:
                type: object
      deprecated: false
  /wallet/credit:
    post:
      tags:
        - Wallet
      summary: Credit wallet with Merchant or Agent account
      operationId: Wallet.credit
      parameters:
        - name: data
          in: body
          required: true
          schema:
            $ref: '#/definitions/Wallet'
        - name: authorization
          in: query
          required: false
          type: string
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              message:
                type: string
              data:
                type: object
      deprecated: false
  /wallet/status:
    get:
      tags:
        - Wallet
      summary: Get wallet status
      operationId: Wallet.status
      parameters:
        - name: phoneNumber
          in: query
          required: true
          type: string
        - name: pincode
          in: query
          required: true
          type: string
        - name: authorization
          in: query
          required: false
          type: string
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              message:
                type: string
              data:
                type: object
      deprecated: false
  /wallet/history:
    get:
      tags:
        - Wallet
      summary: Fetch wallet transaction history
      operationId: Wallet.history
      parameters:
        - name: phoneNumber
          in: query
          required: true
          type: string
        - name: pincode
          in: query
          required: true
          type: string
        - name: authorization
          in: query
          required: false
          type: string
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              message:
                type: string
              data:
                type: object
      deprecated: false
  /notifications:
    post:
      tags:
        - Notifications
      summary: Create a new instance of the model and persist it into the data source.
      operationId: Notifications.create
      parameters:
        - name: data
          in: body
          description: Model instance data
          required: false
          schema:
            description: Model instance data
            $ref: '#/definitions/Notifications'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Notifications'
      deprecated: false
    get:
      tags:
        - Notifications
      summary: Find all instances of the model matched by filter from the data source.
      operationId: Notifications.find
      parameters:
        - name: filter
          in: query
          description: >-
            Filter defining fields, where, include, order, offset, and limit -
            must be a JSON-encoded string ({"something":"value"})
          required: false
          type: string
          format: JSON
      responses:
        '200':
          description: Request was successful
          schema:
            type: array
            items:
              $ref: '#/definitions/Notifications'
      deprecated: false
  '/notifications/{id}':
    get:
      tags:
        - Notifications
      summary: 'Find a model instance by {{id}} from the data source.'
      operationId: Notifications.findById
      parameters:
        - name: id
          in: path
          description: Model id
          required: true
          type: string
          format: JSON
        - name: filter
          in: query
          description: >-
            Filter defining fields and include - must be a JSON-encoded string
            ({"something":"value"})
          required: false
          type: string
          format: JSON
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Notifications'
      deprecated: false
    put:
      tags:
        - Notifications
      summary: >-
        Patch attributes for a model instance and persist it into the data
        source.
      operationId: 'Notifications.prototype.updateAttributes__put_notifications_{id}'
      parameters:
        - name: id
          in: path
          description: Notifications id
          required: true
          type: string
          format: JSON
        - name: data
          in: body
          description: An object of model property name/value pairs
          required: false
          schema:
            description: An object of model property name/value pairs
            $ref: '#/definitions/Notifications'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Notifications'
      deprecated: false
    patch:
      tags:
        - Notifications
      summary: >-
        Patch attributes for a model instance and persist it into the data
        source.
      operationId: 'Notifications.prototype.updateAttributes__patch_notifications_{id}'
      parameters:
        - name: id
          in: path
          description: Notifications id
          required: true
          type: string
          format: JSON
        - name: data
          in: body
          description: An object of model property name/value pairs
          required: false
          schema:
            description: An object of model property name/value pairs
            $ref: '#/definitions/Notifications'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Notifications'
      deprecated: false
  '/purchases/{id}/dispute':
    get:
      tags:
        - Purchase
      summary: Fetches hasOne relation dispute.
      operationId: Purchase.prototype.__get__dispute
      parameters:
        - name: id
          in: path
          description: Purchase id
          required: true
          type: string
          format: JSON
        - name: refresh
          in: query
          required: false
          type: boolean
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Dispute'
      deprecated: false
    post:
      tags:
        - Purchase
      summary: Creates a new instance in dispute of this model.
      operationId: Purchase.prototype.__create__dispute
      parameters:
        - name: id
          in: path
          description: Purchase id
          required: true
          type: string
          format: JSON
        - name: data
          in: body
          required: false
          schema:
            $ref: '#/definitions/Dispute'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Dispute'
      deprecated: false
    put:
      tags:
        - Purchase
      summary: Update dispute of this model.
      operationId: Purchase.prototype.__update__dispute
      parameters:
        - name: id
          in: path
          description: Purchase id
          required: true
          type: string
          format: JSON
        - name: data
          in: body
          required: false
          schema:
            $ref: '#/definitions/Dispute'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Dispute'
      deprecated: false
  '/purchases/{id}/products/{fk}':
    get:
      tags:
        - Purchase
      summary: Find a related item by id for products.
      operationId: Purchase.prototype.__findById__products
      parameters:
        - name: id
          in: path
          description: Purchase id
          required: true
          type: string
          format: JSON
        - name: fk
          in: path
          description: Foreign key for products
          required: true
          type: string
          format: JSON
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/ProductItem'
      deprecated: false
  '/purchases/{id}/products':
    get:
      tags:
        - Purchase
      summary: Queries products of Purchase.
      operationId: Purchase.prototype.__get__products
      parameters:
        - name: id
          in: path
          description: Purchase id
          required: true
          type: string
          format: JSON
        - name: filter
          in: query
          required: false
          type: string
          format: JSON
      responses:
        '200':
          description: Request was successful
          schema:
            type: array
            items:
              $ref: '#/definitions/ProductItem'
      deprecated: false
  /purchases:
    post:
      tags:
        - Purchase
      summary: Create a new instance of the model and persist it into the data source.
      operationId: Purchase.create
      parameters:
        - name: data
          in: body
          description: Model instance data
          required: false
          schema:
            description: Model instance data
            $ref: '#/definitions/Purchase'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Purchase'
      deprecated: false
    get:
      tags:
        - Purchase
      summary: Find all instances of the model matched by filter from the data source.
      operationId: Purchase.find
      parameters:
        - name: filter
          in: query
          description: >-
            Filter defining fields, where, include, order, offset, and limit -
            must be a JSON-encoded string ({"something":"value"})
          required: false
          type: string
          format: JSON
      responses:
        '200':
          description: Request was successful
          schema:
            type: array
            items:
              $ref: '#/definitions/Purchase'
      deprecated: false
  '/purchases/{id}':
    get:
      tags:
        - Purchase
      summary: 'Find a model instance by {{id}} from the data source.'
      operationId: Purchase.findById
      parameters:
        - name: id
          in: path
          description: Model id
          required: true
          type: string
          format: JSON
        - name: filter
          in: query
          description: >-
            Filter defining fields and include - must be a JSON-encoded string
            ({"something":"value"})
          required: false
          type: string
          format: JSON
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Purchase'
      deprecated: false
  /developers:
    post:
      tags:
        - Developer
      summary: Create a new instance of the model and persist it into the data source.
      operationId: Developer.create
      parameters:
        - name: data
          in: body
          description: Model instance data
          required: false
          schema:
            description: Model instance data
            $ref: '#/definitions/Developer'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Developer'
      deprecated: false
    get:
      tags:
        - Developer
      summary: Find all instances of the model matched by filter from the data source.
      operationId: Developer.find
      parameters:
        - name: filter
          in: query
          description: >-
            Filter defining fields, where, include, order, offset, and limit -
            must be a JSON-encoded string ({"something":"value"})
          required: false
          type: string
          format: JSON
      responses:
        '200':
          description: Request was successful
          schema:
            type: array
            items:
              $ref: '#/definitions/Developer'
      deprecated: false
  '/developers/{id}':
    get:
      tags:
        - Developer
      summary: 'Find a model instance by {{id}} from the data source.'
      operationId: Developer.findById
      parameters:
        - name: id
          in: path
          description: Model id
          required: true
          type: string
          format: JSON
        - name: filter
          in: query
          description: >-
            Filter defining fields and include - must be a JSON-encoded string
            ({"something":"value"})
          required: false
          type: string
          format: JSON
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Developer'
      deprecated: false
    put:
      tags:
        - Developer
      summary: >-
        Patch attributes for a model instance and persist it into the data
        source.
      operationId: 'Developer.prototype.updateAttributes__put_developers_{id}'
      parameters:
        - name: id
          in: path
          description: Developer id
          required: true
          type: string
          format: JSON
        - name: data
          in: body
          description: An object of model property name/value pairs
          required: false
          schema:
            description: An object of model property name/value pairs
            $ref: '#/definitions/Developer'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Developer'
      deprecated: false
    patch:
      tags:
        - Developer
      summary: >-
        Patch attributes for a model instance and persist it into the data
        source.
      operationId: 'Developer.prototype.updateAttributes__patch_developers_{id}'
      parameters:
        - name: id
          in: path
          description: Developer id
          required: true
          type: string
          format: JSON
        - name: data
          in: body
          description: An object of model property name/value pairs
          required: false
          schema:
            description: An object of model property name/value pairs
            $ref: '#/definitions/Developer'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Developer'
      deprecated: false
  '/vouchers/{id}/wallet':
    get:
      tags:
        - Voucher
      summary: Fetches belongsTo relation wallet.
      operationId: Voucher.prototype.__get__wallet
      parameters:
        - name: id
          in: path
          description: Voucher id
          required: true
          type: string
          format: JSON
        - name: refresh
          in: query
          required: false
          type: boolean
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Wallet'
      deprecated: false
  '/vouchers/{id}/merchant':
    get:
      tags:
        - Voucher
      summary: Fetches belongsTo relation merchant.
      operationId: Voucher.prototype.__get__merchant
      parameters:
        - name: id
          in: path
          description: Voucher id
          required: true
          type: string
          format: JSON
        - name: refresh
          in: query
          required: false
          type: boolean
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Merchant'
      deprecated: false
  '/vouchers/{id}/developer':
    get:
      tags:
        - Voucher
      summary: Fetches belongsTo relation developer.
      operationId: Voucher.prototype.__get__developer
      parameters:
        - name: id
          in: path
          description: Voucher id
          required: true
          type: string
          format: JSON
        - name: refresh
          in: query
          required: false
          type: boolean
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Developer'
      deprecated: false
  /vouchers:
    post:
      tags:
        - Voucher
      summary: Create a new instance of the model and persist it into the data source.
      operationId: Voucher.create
      parameters:
        - name: data
          in: body
          description: Model instance data
          required: false
          schema:
            description: Model instance data
            $ref: '#/definitions/Voucher'
      responses:
        '200':
          description: Request was successful
          schema:
            $ref: '#/definitions/Voucher'
      deprecated: false
    get:
      tags:
        - Voucher
      summary: Find all instances of the model matched by filter from the data source.
      operationId: Voucher.find
      parameters:
        - name: filter
          in: query
          description: >-
            Filter defining fields, where, include, order, offset, and limit -
            must be a JSON-encoded string ({"something":"value"})
          required: false
          type: string
          format: JSON
      responses:
        '200':
          description: Request was successful
          schema:
            type: array
            items:
              $ref: '#/definitions/Voucher'
      deprecated: false
  '/vouchers/{id}/activate':
    get:
      tags:
        - Voucher
      summary: 'Activate a voucher by {{id}} or {{code}}'
      operationId: 'Voucher.activate__get_vouchers_{id}_activate'
      parameters:
        - name: id
          in: path
          required: true
          type: string
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              message:
                type: string
              voucher:
                type: object
      deprecated: false
  /vouchers/activate:
    post:
      tags:
        - Voucher
      summary: 'Activate a voucher by {{id}} or {{code}}'
      operationId: Voucher.activate__post_vouchers_activate
      parameters:
        - name: id
          in: body
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              message:
                type: string
              voucher:
                type: object
      deprecated: false
  /vouchers/findOne:
    get:
      tags:
        - Voucher
      summary: Find an available voucher
      operationId: Voucher.find_one
      parameters:
        - name: merchant
          in: query
          description: 'The merchant name, code or ID'
          required: true
          type: string
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              message:
                type: string
              voucher:
                type: object
      deprecated: false
  '/vouchers/{id}':
    get:
      tags:
        - Voucher
      summary: 'Find a voucher by {{id}} or {{code}}'
      operationId: Voucher.byCode
      parameters:
        - name: id
          in: path
          required: true
          type: string
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              message:
                type: string
              voucher:
                type: object
      deprecated: false
  '/lottery/operator/{id}':
    get:
      tags:
        - Lottery
      summary: 'Find lottery operator by {{id}}'
      operationId: Lottery.findOneById
      parameters:
        - name: id
          in: path
          required: true
          type: number
          format: double
        - name: authorization
          in: query
          required: false
          type: string
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              operator:
                type: object
      deprecated: false
  '/lottery/operator/{id}/credentials':
    put:
      tags:
        - Lottery
      summary: Update lottery operator credentials
      operationId: Lottery.setCredentials
      parameters:
        - name: id
          in: path
          required: true
          type: number
          format: double
        - name: authorization
          in: query
          required: false
          type: string
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              operator:
                type: object
      deprecated: false
  /lottery/operator:
    post:
      tags:
        - Lottery
      summary: Create a `Tenancier` or `Seller` agent account
      operationId: Lottery.createOperator
      parameters:
        - name: data
          in: body
          required: false
          schema:
            $ref: '#/definitions/LotteryOperator'
        - name: authorization
          in: query
          required: false
          type: string
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              operator:
                type: object
      deprecated: false
  /lottery/transaction:
    post:
      tags:
        - Lottery
      summary: Moving money between Tenancier and Seller accounts
      operationId: Lottery.transaction
      parameters:
        - name: data
          in: body
          required: false
          schema:
            $ref: '#/definitions/LotteryTransaction'
        - name: authorization
          in: query
          required: false
          type: string
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              message:
                type: string
              result:
                type: string
              account:
                type: string
              transaction:
                type: string
              transactionId:
                type: number
                format: double
              amount:
                type: number
                format: double
              currency:
                type: string
              phoneNumber:
                type: string
              description:
                type: string
      deprecated: false
  /lottery/games:
    post:
      tags:
        - Lottery
      summary: Handling lotto games and Seller to Tenancier payment
      operationId: Lottery.games
      parameters:
        - name: data
          in: body
          required: false
          schema:
            $ref: '#/definitions/LotteryGame'
        - name: authorization
          in: query
          required: false
          type: string
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              message:
                type: string
              result:
                type: object
      deprecated: false
  /transactions:
    post:
      tags:
        - Transaction
      summary: Make a transaction (credit card or bank account)
      operationId: Transaction.transaction
      parameters:
        - name: data
          in: body
          required: false
          schema:
            $ref: '#/definitions/Transaction'
        - name: authorization
          in: query
          required: true
          type: string
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              message:
                type: string
              data:
                type: object
      deprecated: false
    get:
      tags:
        - Transaction
      summary: 'Find transactions by {{accountId}}'
      operationId: Transaction.retrieveAll
      parameters:
        - name: accountId
          in: query
          required: true
          type: number
          format: double
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              message:
                type: string
              transactions:
                type: array
                items:
                  type: object
      deprecated: false
  '/transactions/{id}':
    get:
      tags:
        - Transaction
      summary: Find a credit card or bank account transaction by ID
      operationId: Transaction.retrieveOne
      parameters:
        - name: id
          in: path
          required: true
          type: string
        - name: accountId
          in: query
          required: true
          type: number
          format: double
        - name: authorization
          in: query
          required: true
          type: string
      responses:
        '200':
          description: Request was successful
          schema:
            type: object
            properties:
              message:
                type: string
              success:
                type: string
      deprecated: false
tags:
  - name: Account
  - name: Contact
  - name: Merchant
  - name: Agent
  - name: Exchange
  - name: Location
  - name: Topup
  - name: Bill
  - name: Delivery
  - name: Wallet
  - name: Notifications
  - name: Purchase
  - name: Developer
  - name: Voucher
  - name: Lottery
  - name: Transaction
consumes:
  - application/json
  - application/x-www-form-urlencoded
  - application/xml
  - text/xml
produces:
  - application/json
  - application/xml
  - text/xml
  - application/javascript
  - text/javascript
definitions:
  Account:
    properties:
      email:
        type: string
      realm:
        enum:
          - developer
          - client
          - administrator
          - merchant
          - agent
          - application
          - employee
        type: string
      stripeCustomerId:
        description: Stripe Customer ID
        type: string
      firstName:
        type: string
      lastName:
        type: string
      country:
        type: string
      countryCode:
        type: string
      phoneNumber:
        type: string
      phoneNumberVerified:
        type: boolean
      emailVerified:
        type: boolean
      resetPasswordToken:
        type: string
      avatarUrl:
        type: string
      status:
        type: string
      created:
        type: string
        format: date-time
      lastUpdated:
        type: string
        format: date-time
      id:
        type: number
        format: integer
    required:
      - username
      - email
      - firstName
      - lastName
      - country
      - countryCode
      - phoneNumber
      - status
      - created
      - lastUpdated
    additionalProperties: false
  x-any:
    properties: {}
  ChangePassword:
    properties:
      oldPassword:
        type: string
      newPassword:
        type: string
    additionalProperties: false
  StripeSource:
    properties:
      object:
        default: card
        type: string
      exp_month:
        type: string
      exp_year:
        type: string
      number:
        type: string
      cvc:
        type: string
      name:
        type: string
      address_city:
        type: string
      address_country:
        type: string
      address_line1:
        type: string
      address_line2:
        type: string
      address_state:
        type: string
      address_zip:
        type: string
      metadata:
        type: object
    required:
      - object
      - exp_month
      - exp_year
      - number
      - cvc
      - name
    additionalProperties: false
  Contact:
    properties:
      firstName:
        type: string
      lastName:
        type: string
      phoneNumber:
        type: string
      email:
        type: string
      avatarUrl:
        type: string
      favorite:
        type: boolean
      created:
        type: string
        format: date-time
      lastUpdated:
        type: string
        format: date-time
      id:
        type: number
        format: double
      accountId:
        type: number
        format: double
      locationId:
        type: number
        format: double
    required:
      - firstName
      - phoneNumber
      - created
      - lastUpdated
    additionalProperties: false
  RequestMoney:
    properties:
      accountId:
        type: number
        format: double
      amount:
        type: number
        format: double
      currency:
        type: string
      description:
        type: string
    required:
      - accountId
      - amount
      - currency
    additionalProperties: false
  Location:
    properties:
      locationName:
        type: string
      locationType:
        type: string
      addressLine1:
        type: string
      addressLine2:
        type: string
      state:
        type: string
      city:
        type: string
      email:
        type: string
      phone:
        type: string
      zipCode:
        type: string
      country:
        type: string
      countryCode:
        type: string
      gpsCoords:
        $ref: '#/definitions/GeoPoint'
      status:
        type: string
      openHours:
        type: array
        items:
          type: object
      rating:
        type: number
        format: double
      delivery:
        type: boolean
      takeAway:
        type: boolean
      description:
        type: string
      created:
        type: string
        format: date-time
      lastUpdated:
        type: string
        format: date-time
      id:
        type: number
        format: double
      merchantId:
        type: number
        format: double
      agentId:
        type: number
        format: double
    required:
      - locationName
      - locationType
      - addressLine1
      - state
      - city
      - email
      - phone
      - country
      - countryCode
      - status
      - created
      - lastUpdated
    additionalProperties: false
  ProductItem:
    properties:
      name:
        type: string
      url:
        type: string
      imageUrl:
        type: string
      status:
        type: string
      price:
        type: number
        format: double
      priceCurrency:
        type: string
      value:
        type: number
        format: double
      valueCurrency:
        type: string
      featured:
        type: boolean
      category:
        type: string
      deliveryType:
        type: string
      delivered:
        type: boolean
      deliveryAddress:
        type: string
      transactionId:
        type: number
        format: double
      processed:
        type: boolean
      id:
        type: number
        format: double
      merchantId:
        type: number
        format: double
      purchaseId:
        type: number
        format: double
    required:
      - name
      - status
      - price
      - priceCurrency
    additionalProperties: false
  Voucher:
    properties:
      category:
        type: string
      value:
        type: number
        format: double
      valueCurrency:
        type: string
      price:
        type: number
        format: double
      priceCurrency:
        type: string
      description:
        type: string
      phoneNumber:
        description: The beneficiary of the voucher
        type: string
      valid:
        type: boolean
      merchantName:
        type: string
      apiKey:
        type: string
      refId:
        description: The payment reference ID
        type: string
      status:
        default: available
        type: string
      walletId:
        type: number
        format: double
      merchantId:
        type: number
        format: double
      developerId:
        type: number
        format: double
    required:
      - category
      - price
      - status
    additionalProperties: false
  Merchant:
    properties:
      category:
        type: string
      merchantName:
        type: string
      slogan:
        type: string
      city:
        type: string
      email:
        type: string
      phoneNumber:
        type: string
      country:
        type: string
      countryCode:
        type: string
      state:
        type: string
      zipCode:
        type: string
      logoUrl:
        type: string
      addressLine1:
        type: string
      addressLine2:
        type: string
      gpsCoords:
        $ref: '#/definitions/GeoPoint'
      openHours:
        type: array
        items:
          type: object
      currency:
        type: array
        items:
          type: string
      products:
        type: array
        items:
          $ref: '#/definitions/ProductItem'
      locations:
        type: array
        items:
          $ref: '#/definitions/Location'
      status:
        default: pending
        type: string
      rating:
        type: number
        format: double
      defaultMerchant:
        type: boolean
      id:
        type: number
        format: double
      accountId:
        type: number
        format: double
      operatorId:
        type: number
        format: double
    required:
      - category
      - merchantName
      - email
      - phoneNumber
      - country
      - countryCode
      - status
    additionalProperties: false
  GetCode:
    properties:
      merchantId:
        type: number
        format: double
      phoneNumber:
        type: string
      amount:
        type: number
        format: double
      pincode:
        type: string
    required:
      - merchantId
      - phoneNumber
      - amount
      - pincode
    additionalProperties: false
  Agent:
    properties:
      brandName:
        type: string
      agentName:
        type: string
      firstName:
        type: string
      lastName:
        type: string
      idNumber:
        type: string
      category:
        type: string
      balance:
        type: array
        items:
          type: object
      status:
        type: string
      defaultAgent:
        type: boolean
      tpId:
        type: string
      tpPassword:
        type: string
      tpRef:
        type: string
      created:
        type: string
        format: date-time
      lastUpdated:
        type: string
        format: date-time
      id:
        type: number
        format: double
      accountId:
        type: number
        format: double
      operatorId:
        type: number
        format: double
    required:
      - brandName
      - category
      - created
      - lastUpdated
    additionalProperties: false
  Bill:
    properties:
      agentName:
        type: string
      merchantName:
        type: string
      billId:
        type: string
      paymentMethod:
        enum:
          - cash
          - account
        type: string
      transactionMode:
        type: string
      phoneNumber:
        type: number
        format: double
      amount:
        type: number
        format: double
      category:
        type: string
      clientFees:
        type: number
        format: double
      agentFees:
        type: number
        format: double
      transactionId:
        type: number
        format: double
      gatewayResponse:
        type: object
      agentId:
        type: number
        format: double
      merchantId:
        type: number
        format: double
    required:
      - agentName
      - merchantName
      - transactionMode
      - phoneNumber
      - amount
      - category
    additionalProperties: false
  Exchange:
    properties:
      conversion:
        type: string
      rates:
        type: object
      created:
        type: string
        format: date-time
      lastUpdated:
        type: string
        format: date-time
      id:
        type: number
        format: double
    required:
      - conversion
      - rates
    additionalProperties: false
  Topup:
    properties:
      category:
        type: string
      amount:
        type: number
        format: double
      currency:
        type: string
      sender:
        type: string
      receiver:
        type: string
      refId:
        type: string
      network:
        type: string
      status:
        type: string
      gatewayResponse:
        type: object
      created:
        type: string
        format: date-time
      lastUpdated:
        type: string
        format: date-time
      id:
        type: number
        format: double
      senderId:
        type: number
        format: double
      receiverId:
        type: number
        format: double
    required:
      - category
      - amount
      - currency
      - created
      - lastUpdated
    additionalProperties: false
  Delivery:
    properties:
      id:
        type: number
        format: double
      accountId:
        type: number
        format: double
      merchantId:
        type: number
        format: double
    additionalProperties: false
  Wallet:
    properties:
      phoneNumber:
        type: string
      firstName:
        type: string
      lastName:
        type: string
      provider:
        type: string
      created:
        type: string
        format: date-time
      lastUpdated:
        type: string
        format: date-time
      id:
        type: number
        format: double
      accountId:
        type: number
        format: double
    required:
      - phoneNumber
      - firstName
      - lastName
      - provider
      - created
      - lastUpdated
    additionalProperties: false
  Notifications:
    properties:
      alert:
        $ref: '#/definitions/x-any'
      badge:
        type: number
        format: double
      category:
        type: string
      collapseKey:
        type: string
      contentAvailable:
        type: boolean
      created:
        type: string
        format: date-time
      delayWhileIdle:
        type: boolean
      deviceToken:
        type: string
      deviceType:
        type: string
      expirationInterval:
        type: number
        format: double
      expirationTime:
        type: string
        format: date-time
      modified:
        type: string
        format: date-time
      scheduledTime:
        type: string
        format: date-time
      sound:
        type: string
      status:
        type: string
      urlArgs:
        type: array
        items:
          type: string
      id:
        type: number
        format: double
    required:
      - deviceToken
      - deviceType
    additionalProperties: false
  Dispute:
    properties:
      title:
        type: string
      reason:
        type: string
      description:
        type: string
      updates:
        type: array
        items:
          type: object
      status:
        type: string
      created:
        type: string
        format: date-time
      lastUpdated:
        type: string
        format: date-time
      id:
        type: number
        format: double
      purchaseId:
        type: number
        format: double
      paymentId:
        type: number
        format: double
    required:
      - title
      - reason
      - updates
      - status
      - created
      - lastUpdated
    additionalProperties: false
  Purchase:
    properties:
      requestId:
        type: string
      payment:
        type: object
      items:
        type: array
        items:
          $ref: '#/definitions/ProductItem'
      total:
        type: number
        format: double
      currency:
        type: string
      status:
        type: string
      source:
        type: string
      created:
        type: string
        format: date-time
      lastUpdated:
        type: string
        format: date-time
      id:
        type: number
        format: double
      accountId:
        type: number
        format: double
    required:
      - requestId
      - payment
      - items
      - total
      - currency
      - status
      - created
      - lastUpdated
    additionalProperties: false
  Developer:
    properties:
      apiKey:
        type: string
      brandName:
        type: string
      authorizedEndpoints:
        type: array
        items:
          type: string
      status:
        type: string
      created:
        type: string
        format: date-time
      lastUpdated:
        type: string
        format: date-time
      id:
        type: number
        format: double
      accountId:
        type: number
        format: double
    required:
      - apiKey
      - brandName
      - authorizedEndpoints
      - status
      - created
      - lastUpdated
    additionalProperties: false
  LotteryOperator:
    properties:
      brandName:
        type: string
      agentName:
        type: string
      firstName:
        type: string
      lastName:
        type: string
      idNumber:
        type: string
      category:
        type: string
      credentials:
        type: object
      balance:
        type: array
        items:
          type: object
      status:
        type: string
      created:
        type: string
        format: date-time
      lastUpdated:
        type: string
        format: date-time
      id:
        type: number
        format: double
    required:
      - brandName
      - category
      - created
      - lastUpdated
    additionalProperties: false
  LotteryTransaction:
    properties:
      tenancierId:
        type: number
        format: double
      sellerId:
        type: number
        format: double
      transaction:
        type: string
      account:
        type: string
      amount:
        type: number
        format: double
      currency:
        type: string
    required:
      - tenancierId
      - transaction
      - account
      - amount
      - currency
    additionalProperties: false
  LotteryGame:
    properties:
      tenancierId:
        type: number
        format: double
      sellerId:
        type: number
        format: double
      transactions:
        type: array
        items:
          $ref: '#/definitions/LotteryItem'
    required:
      - tenancierId
      - sellerId
      - transactions
    additionalProperties: false
  Transaction:
    properties:
      transactionId:
        type: string
      payment:
        type: object
      amount:
        type: number
        format: double
      currency:
        type: string
      status:
        type: string
      created:
        type: string
        format: date-time
      lastUpdated:
        type: string
        format: date-time
      accountId:
        type: number
        format: double
    required:
      - transactionId
      - payment
      - amount
      - currency
      - status
      - created
      - lastUpdated
    additionalProperties: false
  GeoPoint:
    properties:
      lat:
        type: number
      lng:
        type: number
  LotteryItem:
    properties:
      item:
        type: string
      codeItem:
        type: string
      amount:
        type: number
        format: double
      currency:
        type: string
      category:
        type: string
    required:
      - item
      - amount
      - currency
      - category
    additionalProperties: false
  LoginCredentials:
    properties:
      email:
        type: string
      password:
        type: string
    required:
      - email
      - password
    additionalProperties: false
securityDefinitions:
  authorization:
    type: apiKey
    in: header
    name: authorization
  accessToken:
    type: apiKey
    in: query
    name: access_token
security:
  - authorization: []
  - accessToken: []
