openapi: 3.0.3
info:
  title: Mauzo
  description: 'This documentation aims to provide all the information you need to work with the Mauzo APIs.'
  version: 1.0.0
servers:
  -
    url: app.mymauzo.com
paths:
  /notify/merchant/campaigns:
    get:
      summary: 'Display a paginated listing of the campaigns in a merchants business.'
      operationId: displayAPaginatedListingOfTheCampaignsInAMerchantsBusiness
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Campaign
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                business_id:
                  type: string
                  description: 'The <code>app_key</code> of an existing record in the apps table.'
                  example: et
                  nullable: false
              required:
                - business_id
  /mauzo/merchant/customers:
    post:
      summary: 'Create a new customer.'
      operationId: createANewCustomer
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Customer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                phone_number:
                  type: string
                  description: ''
                  example: quia
                  nullable: false
                name:
                  type: string
                  description: ''
                  example: in
                  nullable: false
                email:
                  type: string
                  description: 'Must be a valid email address.'
                  example: lucie49@example.org
                  nullable: false
                narration:
                  type: string
                  description: ''
                  example: null
                  nullable: true
                age:
                  type: string
                  description: ''
                  example: voluptates
                  nullable: false
                city:
                  type: string
                  description: ''
                  example: dolor
                  nullable: false
                occupation:
                  type: string
                  description: ''
                  example: saepe
                  nullable: false
                gender:
                  type: string
                  description: ''
                  example: fugit
                  nullable: false
              required:
                - phone_number
                - name
                - email
                - age
                - city
                - occupation
                - gender
    get:
      summary: 'Returns  a paginated list of customers for a merchant.'
      operationId: returnsAPaginatedListOfCustomersForAMerchant
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - 'Mauzo Customer'
  /notify/merchant/messaging/send-email:
    post:
      summary: 'Send an Email Message.'
      operationId: sendAnEmailMessage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - 'Email Messaging.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                message:
                  type: string
                  description: ''
                  example: consequatur
                  nullable: false
                subject:
                  type: string
                  description: "'message_variables' => 'nullable|array',."
                  example: fugit
                  nullable: false
                service_provider:
                  type: string
                  description: 'The <code>integration_id</code> of an existing record in the email_integrations table.'
                  example: null
                  nullable: true
                recipients:
                  type: object
                  description: ''
                  example: null
                  nullable: false
                  properties: {  }
                attachment:
                  type: object
                  description: ''
                  example: null
                  nullable: true
                  properties: {  }
                business_id:
                  type: string
                  description: 'The <code>app_key</code> of an existing record in the apps table.'
                  example: dignissimos
                  nullable: false
                category:
                  type: string
                  description: ''
                  example: null
                  nullable: true
              required:
                - message
                - subject
                - business_id
  /notify/merchant/messages-history:
    get:
      summary: 'Display a paginated listing of the messages history.'
      operationId: displayAPaginatedListingOfTheMessagesHistory
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - History
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                business_id:
                  type: string
                  description: 'The <code>app_key</code> of an existing record in the apps table.'
                  example: minus
                  nullable: false
              required:
                - business_id
  '/notify/merchant/message-details/{id}':
    get:
      summary: 'Display details for a single sent message.'
      operationId: displayDetailsForASingleSentMessage
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - History
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the message detail.'
        example: amet
        required: true
        schema:
          type: string
  '/mauzo/merchant/customers/{id}':
    get:
      summary: 'Return customer details'
      operationId: returnCustomerDetails
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - 'Mauzo Customer'
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the customer.'
        example: d5f33266-85a2-4df3-ad7c-79d3b32a3e50
        required: true
        schema:
          type: string
  /mauzo/merchant/transactions:
    get:
      summary: "Display a paginated listing of the businesses Transactions.If no business id is passed returns all txns for all merchant's businesses."
      operationId: displayAPaginatedListingOfTheBusinessesTransactionsIfNoBusinessIdIsPassedReturnsAllTxnsForAllMerchantsBusinesses
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - 'Mauzo Mpesa payments Transactions.'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                business_id:
                  type: string
                  description: 'The <code>app_key</code> of an existing record in the apps table.'
                  example: null
                  nullable: true
  /mauzo/merchant/send-stk-payment-request:
    post:
      summary: 'Initialize stk push request to given phone number.'
      operationId: initializeStkPushRequestToGivenPhoneNumber
      description: ''
      parameters: []
      responses: {  }
      tags:
        - 'Mauzo Mpesa payments Transactions.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                phone_number:
                  type: string
                  description: ''
                  example: aliquid
                  nullable: false
                amount:
                  type: string
                  description: ''
                  example: modi
                  nullable: false
                business_id:
                  type: string
                  description: 'The <code>app_key</code> of an existing record in the apps table.'
                  example: debitis
                  nullable: false
              required:
                - phone_number
                - amount
                - business_id
  /mauzo/merchant/payment-links:
    get:
      summary: 'Create a payment link.'
      operationId: createAPaymentLink
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - 'Mauzo payment links'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                business_id:
                  type: string
                  description: 'The <code>app_key</code> of an existing record in the apps table.'
                  example: null
                  nullable: true
    post:
      summary: 'Create a payment link.'
      operationId: createAPaymentLink
      description: ''
      parameters: []
      responses: {  }
      tags:
        - 'Mauzo payment links'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: ''
                  example: suscipit
                  nullable: false
                description:
                  type: string
                  description: ''
                  example: exercitationem
                  nullable: false
                business_id:
                  type: string
                  description: 'The <code>app_key</code> of an existing record in the apps table.'
                  example: eaque
                  nullable: false
                amount:
                  type: string
                  description: ''
                  example: null
                  nullable: true
                redirect_url:
                  type: string
                  description: ''
                  example: null
                  nullable: true
              required:
                - name
                - description
                - business_id
  '/mauzo/merchant/payment-links/{id}':
    get:
      summary: 'Display the payment link details'
      operationId: displayThePaymentLinkDetails
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - 'Mauzo payment links'
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the payment link.'
        example: ipsa
        required: true
        schema:
          type: string
  /notify/merchant/messaging/send-sms:
    post:
      summary: 'Send an Sms Message.'
      operationId: sendAnSmsMessage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - 'SMS Messaging'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                message:
                  type: string
                  description: ''
                  example: consequatur
                  nullable: false
                service_provider:
                  type: string
                  description: "'message_variables' => 'nullable|array',. The <code>integration_id</code> of an existing record in the sms_integrations table."
                  example: null
                  nullable: true
                recipients:
                  type: object
                  description: ''
                  example: null
                  nullable: false
                  properties: {  }
                business_id:
                  type: string
                  description: 'The <code>app_key</code> of an existing record in the apps table.'
                  example: est
                  nullable: false
                category:
                  type: string
                  description: ''
                  example: null
                  nullable: true
              required:
                - message
                - business_id
  /notify/merchant/wallet-topup-details:
    get:
      summary: ''
      operationId: getNotifyMerchantWalletTopupDetails
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Wallet
  /notify/merchant/wallet-topup:
    post:
      summary: ''
      operationId: postNotifyMerchantWalletTopup
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Wallet
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                phone_number:
                  type: string
                  description: ''
                  example: enim
                  nullable: false
                amount:
                  type: string
                  description: ''
                  example: sunt
                  nullable: false
              required:
                - phone_number
                - amount
tags:
  -
    name: Campaign
    description: "\nAPIs to enable a merchant to manage Campaigns in a business."
  -
    name: Customer
    description: "\nAPIs to enable a merchant to manage a customer."
  -
    name: 'Email Messaging.'
    description: "\nMerchant apis to send an email message or schedule an email campaign."
  -
    name: History
    description: "\nMerchant api to get history of the different communnications sent."
  -
    name: 'Mauzo Customer'
    description: "\nAPIs to enable a merchant to manage a customer."
  -
    name: 'Mauzo Mpesa payments Transactions.'
    description: "\nMpesa payments APIs ."
  -
    name: 'Mauzo payment links'
    description: "\nAPIs to enable a merchant to manage payment links."
  -
    name: 'SMS Messaging'
    description: "\nMerchant apis to send an sms message or schedule an sms campaign."
  -
    name: Wallet
    description: "\nMerchant wallet API'S"
components:
  securitySchemes:
    default:
      type: http
      scheme: bearer
      description: 'You can retrieve your token by visiting your dashboard and clicking <b>Generate API KEY</b>. <br/> You also need to pass the bussiness id inthe headers as `app_key`: `app_key`'
security:
  -
    default: []
