openapi: 3.0.3
info:
  title: 'Zay Links'
  description: ''
  version: 1.0.0
servers:
  -
    url: 'https://zaylinks.com'
paths:
  /api/authenticate:
    post:
      summary: 'Authenticate the user and issue a token.'
      operationId: authenticateTheUserAndIssueAToken
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: success
                  message: 'Authentication successful.'
                  access_token: your_access_token_here
                properties:
                  status:
                    type: string
                    example: success
                  message:
                    type: string
                    example: 'Authentication successful.'
                  access_token:
                    type: string
                    example: your_access_token_here
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: error
                  message: 'The credentials you supplied do not match our record.'
                properties:
                  status:
                    type: string
                    example: error
                  message:
                    type: string
                    example: 'The credentials you supplied do not match our record.'
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: error
                  message: 'Validation errors'
                  errors:
                    client_id: 'The client id field is required.'
                    secret_key: 'The secret key field is required.'
                properties:
                  status:
                    type: string
                    example: error
                  message:
                    type: string
                    example: 'Validation errors'
                  errors:
                    type: object
                    properties:
                      client_id:
                        type: string
                        example: 'The client id field is required.'
                      secret_key:
                        type: string
                        example: 'The secret key field is required.'
      tags:
        - Authentication
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                client_id:
                  type: string
                  description: ''
                  example: deleniti
                  nullable: false
                secret_key:
                  type: string
                  description: ''
                  example: rerum
                  nullable: false
              required:
                - client_id
                - secret_key
      security: []
  /api/v1/airtime-networks:
    get:
      summary: 'Airtime Networks'
      operationId: airtimeNetworks
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: success
                  message: 'Data fetched successfully'
                  data:
                    -
                      name: 9mobile
                      serviceID: 9mobile
                    -
                      name: Airtel
                      serviceID: airtel
                    -
                      name: Glo
                      serviceID: glo
                    -
                      name: Mtn
                      serviceID: mtn
                    -
                      name: Smile
                      serviceID: smile
                properties:
                  status:
                    type: string
                    example: success
                  message:
                    type: string
                    example: 'Data fetched successfully'
                  data:
                    type: array
                    example:
                      -
                        name: 9mobile
                        serviceID: 9mobile
                      -
                        name: Airtel
                        serviceID: airtel
                      -
                        name: Glo
                        serviceID: glo
                      -
                        name: Mtn
                        serviceID: mtn
                      -
                        name: Smile
                        serviceID: smile
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          example: 9mobile
                        serviceID:
                          type: string
                          example: 9mobile
      tags:
        - Airtime
  /api/v1/airtime:
    post:
      summary: 'Vend Airtime VTU'
      operationId: vendAirtimeVTU
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: completed
                    type: object
                    example:
                      status: completed
                      message: 'Transaction successful'
                      data:
                        type: 'Airtime Purchase'
                        service: Mtn
                        amount: '100'
                        amount_payable: '100.00'
                        recipient: '08161144693'
                      reference: 20241106161127AQ7CZ0LNVHQB
                      api_response: 'Airtime Purchase of Mtn ₦100 for 08161144693 was successful. '
                    properties:
                      status:
                        type: string
                        example: completed
                      message:
                        type: string
                        example: 'Transaction successful'
                      data:
                        type: object
                        properties:
                          type:
                            type: string
                            example: 'Airtime Purchase'
                          service:
                            type: string
                            example: Mtn
                          amount:
                            type: string
                            example: '100'
                          amount_payable:
                            type: string
                            example: '100.00'
                          recipient:
                            type: string
                            example: '08161144693'
                      reference:
                        type: string
                        example: 20241106161127AQ7CZ0LNVHQB
                      api_response:
                        type: string
                        example: 'Airtime Purchase of Mtn ₦100 for 08161144693 was successful. '
                  -
                    description: pending
                    type: object
                    example:
                      status: pending
                      message: 'Transaction pending'
                      data:
                        type: 'Airtime Purchase'
                        service: Mtn
                        amount: '100'
                        amount_payable: '100.00'
                        recipient: '08161144693'
                      reference: 20241106161127AQ7CZ0LNVHQB
                      api_response: 'Airtime Purchase of Mtn ₦100 for 08161144693 was is currently being processed. Please check back after a while. '
                    properties:
                      status:
                        type: string
                        example: pending
                      message:
                        type: string
                        example: 'Transaction pending'
                      data:
                        type: object
                        properties:
                          type:
                            type: string
                            example: 'Airtime Purchase'
                          service:
                            type: string
                            example: Mtn
                          amount:
                            type: string
                            example: '100'
                          amount_payable:
                            type: string
                            example: '100.00'
                          recipient:
                            type: string
                            example: '08161144693'
                      reference:
                        type: string
                        example: 20241106161127AQ7CZ0LNVHQB
                      api_response:
                        type: string
                        example: 'Airtime Purchase of Mtn ₦100 for 08161144693 was is currently being processed. Please check back after a while. '
                  -
                    description: failed
                    type: object
                    example:
                      status: failed
                      message: 'Transaction failed'
                      data:
                        type: 'Airtime Purchase'
                        service: Mtn
                        amount: '100'
                        amount_payable: '100.00'
                        recipient: '08161144693'
                      reference: 20241106161127AQ7CZ0LNVHQB
                      api_response: 'Airtime Purchase of Mtn ₦100 for 08161144693 failed. '
                    properties:
                      status:
                        type: string
                        example: failed
                      message:
                        type: string
                        example: 'Transaction failed'
                      data:
                        type: object
                        properties:
                          type:
                            type: string
                            example: 'Airtime Purchase'
                          service:
                            type: string
                            example: Mtn
                          amount:
                            type: string
                            example: '100'
                          amount_payable:
                            type: string
                            example: '100.00'
                          recipient:
                            type: string
                            example: '08161144693'
                      reference:
                        type: string
                        example: 20241106161127AQ7CZ0LNVHQB
                      api_response:
                        type: string
                        example: 'Airtime Purchase of Mtn ₦100 for 08161144693 failed. '
        403:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: error
                  message: 'Mtn Vending service currently unavailable.'
                properties:
                  status:
                    type: string
                    example: error
                  message:
                    type: string
                    example: 'Mtn Vending service currently unavailable.'
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: error
                  message: 'Validation errors'
                  errors:
                    serviceID: 'The service i d field is required.'
                    amount: 'The amount field is required.'
                    recipient: 'The recipient field is required.'
                properties:
                  status:
                    type: string
                    example: error
                  message:
                    type: string
                    example: 'Validation errors'
                  errors:
                    type: object
                    properties:
                      serviceID:
                        type: string
                        example: 'The service i d field is required.'
                      amount:
                        type: string
                        example: 'The amount field is required.'
                      recipient:
                        type: string
                        example: 'The recipient field is required.'
      tags:
        - Airtime
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                serviceID:
                  type: string
                  description: 'The service ID of the airtime network.'
                  example: mtn
                  nullable: false
                amount:
                  type: integer
                  description: 'The amount to be purchased.'
                  example: 100
                  nullable: false
                recipient:
                  type: numeric
                  description: 'The phone number of the recipient.'
                  example: '0123456789'
                  nullable: false
              required:
                - serviceID
                - amount
                - recipient
  /api/v1/cable-services:
    get:
      summary: 'Cable Services'
      operationId: cableServices
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: success
                  message: 'Data fetched successfully'
                  data:
                    -
                      name: Dstv
                      serviceID: dstv
                    -
                      name: Gotv
                      serviceID: gotv
                    -
                      name: Showmax
                      serviceID: showmax
                    -
                      name: Startimes
                      serviceID: startimes
                properties:
                  status:
                    type: string
                    example: success
                  message:
                    type: string
                    example: 'Data fetched successfully'
                  data:
                    type: array
                    example:
                      -
                        name: Dstv
                        serviceID: dstv
                      -
                        name: Gotv
                        serviceID: gotv
                      -
                        name: Showmax
                        serviceID: showmax
                      -
                        name: Startimes
                        serviceID: startimes
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          example: Dstv
                        serviceID:
                          type: string
                          example: dstv
      tags:
        - Cable
  /api/v1/cable-plans:
    post:
      summary: 'Cable Plans'
      operationId: cablePlans
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: success
                  message: 'Data fetched successfully'
                  data:
                    -
                      planName: 'Dstv Padi'
                      planId: 1
                      cableType: Dstv
                      serviceID: dstv
                      price: '1850'
                      status: active
                    -
                      planName: 'Dstv Yanga'
                      planId: 2
                      cableType: Dstv
                      serviceID: dstv
                      price: '2565'
                      status: active
                properties:
                  status:
                    type: string
                    example: success
                  message:
                    type: string
                    example: 'Data fetched successfully'
                  data:
                    type: array
                    example:
                      -
                        planName: 'Dstv Padi'
                        planId: 1
                        cableType: Dstv
                        serviceID: dstv
                        price: '1850'
                        status: active
                      -
                        planName: 'Dstv Yanga'
                        planId: 2
                        cableType: Dstv
                        serviceID: dstv
                        price: '2565'
                        status: active
                    items:
                      type: object
                      properties:
                        planName:
                          type: string
                          example: 'Dstv Padi'
                        planId:
                          type: integer
                          example: 1
                        cableType:
                          type: string
                          example: Dstv
                        serviceID:
                          type: string
                          example: dstv
                        price:
                          type: string
                          example: '1850'
                        status:
                          type: string
                          example: active
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: error
                  message: 'Validation errors'
                  errors:
                    serviceID: 'The service i d field is required.'
                properties:
                  status:
                    type: string
                    example: error
                  message:
                    type: string
                    example: 'Validation errors'
                  errors:
                    type: object
                    properties:
                      serviceID:
                        type: string
                        example: 'The service i d field is required.'
      tags:
        - Cable
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                serviceID:
                  type: string
                  description: 'The service ID of the cable.'
                  example: dstv
                  nullable: false
              required:
                - serviceID
  /api/v1/verify-smart-card-number:
    post:
      summary: 'Verify Smart Card Number'
      operationId: verifySmartCardNumber
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: success
                  customerName: Testermetri
                  currentBouquet: 'DStv  Compact N7900 + ExtraView Access N2,500'
                properties:
                  status:
                    type: string
                    example: success
                  customerName:
                    type: string
                    example: Testermetri
                  currentBouquet:
                    type: string
                    example: 'DStv  Compact N7900 + ExtraView Access N2,500'
        403:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: error
                  message: 'Please check the Smartcard Number and Try Again'
                properties:
                  status:
                    type: string
                    example: error
                  message:
                    type: string
                    example: 'Please check the Smartcard Number and Try Again'
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: error
                  message: 'Validation errors'
                  errors:
                    serviceID: 'The service i d field is required.'
                    smartCardNumber: 'The smart card number field is required.'
                properties:
                  status:
                    type: string
                    example: error
                  message:
                    type: string
                    example: 'Validation errors'
                  errors:
                    type: object
                    properties:
                      serviceID:
                        type: string
                        example: 'The service i d field is required.'
                      smartCardNumber:
                        type: string
                        example: 'The smart card number field is required.'
      tags:
        - Cable
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                serviceID:
                  type: string
                  description: 'The service ID of the electricity.'
                  example: dstv
                  nullable: false
                smartCardNumber:
                  type: numeric
                  description: 'The meter number.'
                  example: '0123456789'
                  nullable: false
              required:
                - serviceID
                - smartCardNumber
  /api/v1/cable:
    post:
      summary: 'Vend Cable'
      operationId: vendCable
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: completed
                    type: object
                    example:
                      status: completed
                      message: 'Transaction successful'
                      data:
                        type: 'Cable Purchase'
                        service: Dstv
                        plan:
                          planName: 'Dstv Padi'
                          planId: 1
                          serviceID: dstv
                        recipient:
                          smart_card_number: '1212121212'
                          meter_type: null
                          name: Testermetri
                          previousBouquet: 'DStv  Compact N7900 + ExtraView Access N2,500'
                        subscription_type: renew
                        quantity: '1'
                        amount: 1850
                        amount_payable: 1850
                        phone_number: '08161144693'
                      reference: 20241108144552JGAYIWTU7NTY
                      api_response: 'Cable Purchase of Dstv Dstv Padi for 1212121212 (Testermetri) was successful. '
                    properties:
                      status:
                        type: string
                        example: completed
                      message:
                        type: string
                        example: 'Transaction successful'
                      data:
                        type: object
                        properties:
                          type:
                            type: string
                            example: 'Cable Purchase'
                          service:
                            type: string
                            example: Dstv
                          plan:
                            type: object
                            properties:
                              planName:
                                type: string
                                example: 'Dstv Padi'
                              planId:
                                type: integer
                                example: 1
                              serviceID:
                                type: string
                                example: dstv
                          recipient:
                            type: object
                            properties:
                              smart_card_number:
                                type: string
                                example: '1212121212'
                              meter_type:
                                type: string
                                example: null
                              name:
                                type: string
                                example: Testermetri
                              previousBouquet:
                                type: string
                                example: 'DStv  Compact N7900 + ExtraView Access N2,500'
                          subscription_type:
                            type: string
                            example: renew
                          quantity:
                            type: string
                            example: '1'
                          amount:
                            type: integer
                            example: 1850
                          amount_payable:
                            type: integer
                            example: 1850
                          phone_number:
                            type: string
                            example: '08161144693'
                      reference:
                        type: string
                        example: 20241108144552JGAYIWTU7NTY
                      api_response:
                        type: string
                        example: 'Cable Purchase of Dstv Dstv Padi for 1212121212 (Testermetri) was successful. '
                  -
                    description: pending
                    type: object
                    example:
                      status: pending
                      message: 'Transaction pending'
                      data:
                        type: 'Cable Purchase'
                        service: Dstv
                        plan:
                          planName: 'Dstv Padi'
                          planId: 1
                          serviceID: dstv
                        recipient:
                          smart_card_number: '1212121212'
                          meter_type: null
                          name: Testermetri
                          previousBouquet: 'DStv  Compact N7900 + ExtraView Access N2,500'
                        subscription_type: renew
                        quantity: '1'
                        amount: 1850
                        amount_payable: 1850
                        phone_number: '08161144693'
                      reference: 20241108144552JGAYIWTU7NTY
                      api_response: 'Cable Purchase of Dstv Dstv Padi for 1212121212 (Testermetri) is currently being processed. Please check back after a while.. '
                    properties:
                      status:
                        type: string
                        example: pending
                      message:
                        type: string
                        example: 'Transaction pending'
                      data:
                        type: object
                        properties:
                          type:
                            type: string
                            example: 'Cable Purchase'
                          service:
                            type: string
                            example: Dstv
                          plan:
                            type: object
                            properties:
                              planName:
                                type: string
                                example: 'Dstv Padi'
                              planId:
                                type: integer
                                example: 1
                              serviceID:
                                type: string
                                example: dstv
                          recipient:
                            type: object
                            properties:
                              smart_card_number:
                                type: string
                                example: '1212121212'
                              meter_type:
                                type: string
                                example: null
                              name:
                                type: string
                                example: Testermetri
                              previousBouquet:
                                type: string
                                example: 'DStv  Compact N7900 + ExtraView Access N2,500'
                          subscription_type:
                            type: string
                            example: renew
                          quantity:
                            type: string
                            example: '1'
                          amount:
                            type: integer
                            example: 1850
                          amount_payable:
                            type: integer
                            example: 1850
                          phone_number:
                            type: string
                            example: '08161144693'
                      reference:
                        type: string
                        example: 20241108144552JGAYIWTU7NTY
                      api_response:
                        type: string
                        example: 'Cable Purchase of Dstv Dstv Padi for 1212121212 (Testermetri) is currently being processed. Please check back after a while.. '
                  -
                    description: failed
                    type: object
                    example:
                      status: failed
                      message: 'Transaction failed'
                      data:
                        type: 'Cable Purchase'
                        service: Dstv
                        plan:
                          planName: 'Dstv Padi'
                          planId: 1
                          serviceID: dstv
                        recipient:
                          smart_card_number: '1212121212'
                          meter_type: null
                          name: Testermetri
                          previousBouquet: 'DStv  Compact N7900 + ExtraView Access N2,500'
                        subscription_type: renew
                        quantity: '1'
                        amount: 1850
                        amount_payable: 1850
                        phone_number: '08161144693'
                      reference: 20241108144552JGAYIWTU7NTY
                      api_response: 'Cable Purchase of Dstv Dstv Padi for 1212121212 (Testermetri) failed. '
                    properties:
                      status:
                        type: string
                        example: failed
                      message:
                        type: string
                        example: 'Transaction failed'
                      data:
                        type: object
                        properties:
                          type:
                            type: string
                            example: 'Cable Purchase'
                          service:
                            type: string
                            example: Dstv
                          plan:
                            type: object
                            properties:
                              planName:
                                type: string
                                example: 'Dstv Padi'
                              planId:
                                type: integer
                                example: 1
                              serviceID:
                                type: string
                                example: dstv
                          recipient:
                            type: object
                            properties:
                              smart_card_number:
                                type: string
                                example: '1212121212'
                              meter_type:
                                type: string
                                example: null
                              name:
                                type: string
                                example: Testermetri
                              previousBouquet:
                                type: string
                                example: 'DStv  Compact N7900 + ExtraView Access N2,500'
                          subscription_type:
                            type: string
                            example: renew
                          quantity:
                            type: string
                            example: '1'
                          amount:
                            type: integer
                            example: 1850
                          amount_payable:
                            type: integer
                            example: 1850
                          phone_number:
                            type: string
                            example: '08161144693'
                      reference:
                        type: string
                        example: 20241108144552JGAYIWTU7NTY
                      api_response:
                        type: string
                        example: 'Cable Purchase of Dstv Dstv Padi for 1212121212 (Testermetri) failed. '
        403:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: error
                  message: 'DSTV Vending service currently unavailable.'
                properties:
                  status:
                    type: string
                    example: error
                  message:
                    type: string
                    example: 'DSTV Vending service currently unavailable.'
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: error
                  message: 'Validation errors'
                  errors:
                    serviceID: 'The service i d field is required.'
                    planId: 'The plan id field is required.'
                    smartCardNumber: 'The smart card number field is required.'
                    subscriptionType: 'The subscription type field is required.'
                    quantity: 'The quantity field is required.'
                    phoneNumber: 'The phone number field is required.'
                properties:
                  status:
                    type: string
                    example: error
                  message:
                    type: string
                    example: 'Validation errors'
                  errors:
                    type: object
                    properties:
                      serviceID:
                        type: string
                        example: 'The service i d field is required.'
                      planId:
                        type: string
                        example: 'The plan id field is required.'
                      smartCardNumber:
                        type: string
                        example: 'The smart card number field is required.'
                      subscriptionType:
                        type: string
                        example: 'The subscription type field is required.'
                      quantity:
                        type: string
                        example: 'The quantity field is required.'
                      phoneNumber:
                        type: string
                        example: 'The phone number field is required.'
      tags:
        - Cable
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                serviceID:
                  type: string
                  description: 'The service ID of the data network.'
                  example: dstv
                  nullable: false
                planId:
                  type: integer
                  description: 'The id of the data plan.'
                  example: 2
                  nullable: false
                smartCardNumber:
                  type: integer
                  description: 'The smart card number.'
                  example: 123456789
                  nullable: false
                subscriptionType:
                  type: string
                  description: 'The subscription type.'
                  example: 'renew, change'
                  nullable: false
                quantity:
                  type: integer
                  description: 'The quantity to purchase.'
                  example: 1
                  nullable: false
                phoneNumber:
                  type: numeric
                  description: 'The phone number of the recipient.'
                  example: '0123456789'
                  nullable: false
              required:
                - serviceID
                - planId
                - smartCardNumber
                - subscriptionType
                - quantity
                - phoneNumber
  /api/v1/data-networks:
    get:
      summary: 'Data Networks'
      operationId: dataNetworks
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: success
                  message: 'Data fetched successfully'
                  data:
                    -
                      name: 9mobile
                      serviceID: 9mobile-data
                    -
                      name: Airtel
                      serviceID: airtel-data
                    -
                      name: Glo
                      serviceID: glo-data
                    -
                      name: Mtn
                      serviceID: mtn-data
                    -
                      name: Smile
                      serviceID: smile-data
                properties:
                  status:
                    type: string
                    example: success
                  message:
                    type: string
                    example: 'Data fetched successfully'
                  data:
                    type: array
                    example:
                      -
                        name: 9mobile
                        serviceID: 9mobile-data
                      -
                        name: Airtel
                        serviceID: airtel-data
                      -
                        name: Glo
                        serviceID: glo-data
                      -
                        name: Mtn
                        serviceID: mtn-data
                      -
                        name: Smile
                        serviceID: smile-data
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          example: 9mobile
                        serviceID:
                          type: string
                          example: 9mobile-data
      tags:
        - Data
  /api/v1/data-types:
    get:
      summary: 'Data Types'
      operationId: dataTypes
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: success
                  message: 'Data fetched successfully'
                  data:
                    -
                      id: 1
                      name: 'Data Share'
                    -
                      id: 2
                      name: Sme
                    -
                      id: 3
                      name: 'Glo Yakata'
                    -
                      id: 4
                      name: 'Airtel Hungry Man'
                    -
                      id: 6
                      name: 'Corporate Gifting'
                    -
                      id: 7
                      name: 'Mtn Big Boys Plan'
                properties:
                  status:
                    type: string
                    example: success
                  message:
                    type: string
                    example: 'Data fetched successfully'
                  data:
                    type: array
                    example:
                      -
                        id: 1
                        name: 'Data Share'
                      -
                        id: 2
                        name: Sme
                      -
                        id: 3
                        name: 'Glo Yakata'
                      -
                        id: 4
                        name: 'Airtel Hungry Man'
                      -
                        id: 6
                        name: 'Corporate Gifting'
                      -
                        id: 7
                        name: 'Mtn Big Boys Plan'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        name:
                          type: string
                          example: 'Data Share'
      tags:
        - Data
  /api/v1/data-plans:
    post:
      summary: 'Data Plans'
      operationId: dataPlans
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: success
                  message: 'Data fetched successfully'
                  data:
                    -
                      planName: '1GB [Data Share] 1 month'
                      planId: 1
                      validity: '1 month'
                      network: Mtn
                      serviceID: mtn-data
                      dataType: 'Data Share'
                      dataTypeId: 1
                      price: '255'
                      status: active
                    -
                      planName: '2GB [Data Share] 1 month'
                      planId: 15
                      validity: '1 month'
                      network: Mtn
                      serviceID: mtn-data
                      dataType: 'Data Share'
                      dataTypeId: 1
                      price: '510'
                      status: active
                    -
                      planName: '3GB [Data Share] 1 month'
                      planId: 16
                      validity: '1 month'
                      network: Mtn
                      serviceID: mtn-data
                      dataType: 'Data Share'
                      dataTypeId: 1
                      price: '765'
                      status: active
                    -
                      planName: '5GB [Data Share] 1 month'
                      planId: 17
                      validity: '1 month'
                      network: Mtn
                      serviceID: mtn-data
                      dataType: 'Data Share'
                      dataTypeId: 1
                      price: '1275'
                      status: active
                properties:
                  status:
                    type: string
                    example: success
                  message:
                    type: string
                    example: 'Data fetched successfully'
                  data:
                    type: array
                    example:
                      -
                        planName: '1GB [Data Share] 1 month'
                        planId: 1
                        validity: '1 month'
                        network: Mtn
                        serviceID: mtn-data
                        dataType: 'Data Share'
                        dataTypeId: 1
                        price: '255'
                        status: active
                      -
                        planName: '2GB [Data Share] 1 month'
                        planId: 15
                        validity: '1 month'
                        network: Mtn
                        serviceID: mtn-data
                        dataType: 'Data Share'
                        dataTypeId: 1
                        price: '510'
                        status: active
                      -
                        planName: '3GB [Data Share] 1 month'
                        planId: 16
                        validity: '1 month'
                        network: Mtn
                        serviceID: mtn-data
                        dataType: 'Data Share'
                        dataTypeId: 1
                        price: '765'
                        status: active
                      -
                        planName: '5GB [Data Share] 1 month'
                        planId: 17
                        validity: '1 month'
                        network: Mtn
                        serviceID: mtn-data
                        dataType: 'Data Share'
                        dataTypeId: 1
                        price: '1275'
                        status: active
                    items:
                      type: object
                      properties:
                        planName:
                          type: string
                          example: '1GB [Data Share] 1 month'
                        planId:
                          type: integer
                          example: 1
                        validity:
                          type: string
                          example: '1 month'
                        network:
                          type: string
                          example: Mtn
                        serviceID:
                          type: string
                          example: mtn-data
                        dataType:
                          type: string
                          example: 'Data Share'
                        dataTypeId:
                          type: integer
                          example: 1
                        price:
                          type: string
                          example: '255'
                        status:
                          type: string
                          example: active
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: error
                  message: 'Validation errors'
                  errors:
                    serviceID: 'The service i d field is required.'
                    data_type: 'The data type field is required.'
                properties:
                  status:
                    type: string
                    example: error
                  message:
                    type: string
                    example: 'Validation errors'
                  errors:
                    type: object
                    properties:
                      serviceID:
                        type: string
                        example: 'The service i d field is required.'
                      data_type:
                        type: string
                        example: 'The data type field is required.'
      tags:
        - Data
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                serviceID:
                  type: string
                  description: 'The service ID of the data network.'
                  example: mtn-data
                  nullable: false
                dataTypeId:
                  type: integer
                  description: 'The id of the Data type.'
                  example: 2
                  nullable: false
              required:
                - serviceID
                - dataTypeId
  /api/v1/data:
    post:
      summary: 'Vend Data'
      operationId: vendData
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: completed
                    type: object
                    example:
                      status: completed
                      message: 'Transaction successful'
                      data:
                        type: 'Data Purchase'
                        service: Mtn
                        plan:
                          planName: '1GB [Data Share] 1 month'
                          planId: 1
                          validity: '1 month'
                          network: Mtn
                          serviceID: mtn-data
                          dataType: 'Data Share'
                          dataTypeId: 1
                        amount: '245'
                        amount_payable: '245'
                        recipient: '08161144693'
                      reference: 20241106161223NYJWDYUAYWBF
                      api_response: 'Data Purchase of Mtn 1GB for 08161144693 was successful. '
                    properties:
                      status:
                        type: string
                        example: completed
                      message:
                        type: string
                        example: 'Transaction successful'
                      data:
                        type: object
                        properties:
                          type:
                            type: string
                            example: 'Data Purchase'
                          service:
                            type: string
                            example: Mtn
                          plan:
                            type: object
                            properties:
                              planName:
                                type: string
                                example: '1GB [Data Share] 1 month'
                              planId:
                                type: integer
                                example: 1
                              validity:
                                type: string
                                example: '1 month'
                              network:
                                type: string
                                example: Mtn
                              serviceID:
                                type: string
                                example: mtn-data
                              dataType:
                                type: string
                                example: 'Data Share'
                              dataTypeId:
                                type: integer
                                example: 1
                          amount:
                            type: string
                            example: '245'
                          amount_payable:
                            type: string
                            example: '245'
                          recipient:
                            type: string
                            example: '08161144693'
                      reference:
                        type: string
                        example: 20241106161223NYJWDYUAYWBF
                      api_response:
                        type: string
                        example: 'Data Purchase of Mtn 1GB for 08161144693 was successful. '
                  -
                    description: pending
                    type: object
                    example:
                      status: pending
                      message: 'Transaction pending'
                      data:
                        type: 'Data Purchase'
                        service: Mtn
                        plan:
                          planName: '1GB [Data Share] 1 month'
                          planId: 1
                          validity: '1 month'
                          network: Mtn
                          serviceID: mtn-data
                          dataType: 'Data Share'
                          dataTypeId: 1
                        amount: '245'
                        amount_payable: '245'
                        recipient: '08161144693'
                      reference: 20241106161223NYJWDYUAYWBF
                      api_response: 'Data Purchase of Mtn 1GB for 08161144693 was successful. '
                    properties:
                      status:
                        type: string
                        example: pending
                      message:
                        type: string
                        example: 'Transaction pending'
                      data:
                        type: object
                        properties:
                          type:
                            type: string
                            example: 'Data Purchase'
                          service:
                            type: string
                            example: Mtn
                          plan:
                            type: object
                            properties:
                              planName:
                                type: string
                                example: '1GB [Data Share] 1 month'
                              planId:
                                type: integer
                                example: 1
                              validity:
                                type: string
                                example: '1 month'
                              network:
                                type: string
                                example: Mtn
                              serviceID:
                                type: string
                                example: mtn-data
                              dataType:
                                type: string
                                example: 'Data Share'
                              dataTypeId:
                                type: integer
                                example: 1
                          amount:
                            type: string
                            example: '245'
                          amount_payable:
                            type: string
                            example: '245'
                          recipient:
                            type: string
                            example: '08161144693'
                      reference:
                        type: string
                        example: 20241106161223NYJWDYUAYWBF
                      api_response:
                        type: string
                        example: 'Data Purchase of Mtn 1GB for 08161144693 was successful. '
                  -
                    description: failed
                    type: object
                    example:
                      status: failed
                      message: 'Transaction failed'
                      data:
                        type: 'Data Purchase'
                        service: Mtn
                        plan:
                          planName: '1GB [Data Share] 1 month'
                          planId: 1
                          validity: '1 month'
                          network: Mtn
                          serviceID: mtn-data
                          dataType: 'Data Share'
                          dataTypeId: 1
                        amount: '245'
                        amount_payable: '245'
                        recipient: '08161144693'
                      reference: 20241106161223NYJWDYUAYWBF
                      api_response: 'Data Purchase of Mtn 1GB for 08161144693 was successful. '
                    properties:
                      status:
                        type: string
                        example: failed
                      message:
                        type: string
                        example: 'Transaction failed'
                      data:
                        type: object
                        properties:
                          type:
                            type: string
                            example: 'Data Purchase'
                          service:
                            type: string
                            example: Mtn
                          plan:
                            type: object
                            properties:
                              planName:
                                type: string
                                example: '1GB [Data Share] 1 month'
                              planId:
                                type: integer
                                example: 1
                              validity:
                                type: string
                                example: '1 month'
                              network:
                                type: string
                                example: Mtn
                              serviceID:
                                type: string
                                example: mtn-data
                              dataType:
                                type: string
                                example: 'Data Share'
                              dataTypeId:
                                type: integer
                                example: 1
                          amount:
                            type: string
                            example: '245'
                          amount_payable:
                            type: string
                            example: '245'
                          recipient:
                            type: string
                            example: '08161144693'
                      reference:
                        type: string
                        example: 20241106161223NYJWDYUAYWBF
                      api_response:
                        type: string
                        example: 'Data Purchase of Mtn 1GB for 08161144693 was successful. '
        403:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: error
                  message: 'Mtn Vending service currently unavailable.'
                properties:
                  status:
                    type: string
                    example: error
                  message:
                    type: string
                    example: 'Mtn Vending service currently unavailable.'
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: error
                  message: 'Validation errors'
                  errors:
                    serviceID: 'The service i d field is required.'
                    dataTypeId: 'The data type id field is required.'
                    planId: 'The plan id field is required.'
                    recipient: 'The recipient field is required.'
                properties:
                  status:
                    type: string
                    example: error
                  message:
                    type: string
                    example: 'Validation errors'
                  errors:
                    type: object
                    properties:
                      serviceID:
                        type: string
                        example: 'The service i d field is required.'
                      dataTypeId:
                        type: string
                        example: 'The data type id field is required.'
                      planId:
                        type: string
                        example: 'The plan id field is required.'
                      recipient:
                        type: string
                        example: 'The recipient field is required.'
      tags:
        - Data
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                serviceID:
                  type: string
                  description: 'The service ID of the data network.'
                  example: mtn-data
                  nullable: false
                dataTypeId:
                  type: integer
                  description: 'The id of the Data type.'
                  example: 2
                  nullable: false
                planId:
                  type: integer
                  description: 'The id of the data plan.'
                  example: 2
                  nullable: false
                recipient:
                  type: numeric
                  description: 'The phone number of the recipient.'
                  example: '0123456789'
                  nullable: false
              required:
                - serviceID
                - dataTypeId
                - planId
                - recipient
  /api/v1/electricity-services:
    get:
      summary: 'Electricity Services'
      operationId: electricityServices
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: success
                  message: 'Data fetched successfully'
                  data:
                    -
                      name: 'Eko Electricity Distribution Company'
                      serviceID: ekedc
                    -
                      name: 'Ibadan Electricity Distribution Company'
                      serviceID: ibedc
                properties:
                  status:
                    type: string
                    example: success
                  message:
                    type: string
                    example: 'Data fetched successfully'
                  data:
                    type: array
                    example:
                      -
                        name: 'Eko Electricity Distribution Company'
                        serviceID: ekedc
                      -
                        name: 'Ibadan Electricity Distribution Company'
                        serviceID: ibedc
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          example: 'Eko Electricity Distribution Company'
                        serviceID:
                          type: string
                          example: ekedc
      tags:
        - Electricity
  /api/v1/verify-meter-number:
    post:
      summary: 'Verify Meter Number'
      operationId: verifyMeterNumber
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: success
                  customerName: 'OLADIPO OLUWAFEMI'
                  customerAddress: NONE
                properties:
                  status:
                    type: string
                    example: success
                  customerName:
                    type: string
                    example: 'OLADIPO OLUWAFEMI'
                  customerAddress:
                    type: string
                    example: NONE
        403:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: error
                  message: 'Please Check your Meter Number and Try Again'
                properties:
                  status:
                    type: string
                    example: error
                  message:
                    type: string
                    example: 'Please Check your Meter Number and Try Again'
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: error
                  message: 'Validation errors'
                  errors:
                    serviceID: 'The service i d field is required.'
                    meterType: 'The meter type field is required.'
                    meterNumber: 'The meter number field is required.'
                properties:
                  status:
                    type: string
                    example: error
                  message:
                    type: string
                    example: 'Validation errors'
                  errors:
                    type: object
                    properties:
                      serviceID:
                        type: string
                        example: 'The service i d field is required.'
                      meterType:
                        type: string
                        example: 'The meter type field is required.'
                      meterNumber:
                        type: string
                        example: 'The meter number field is required.'
      tags:
        - Electricity
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                serviceID:
                  type: string
                  description: 'The service ID of the electricity.'
                  example: ibedc
                  nullable: false
                meterType:
                  type: string
                  description: 'The meter type.'
                  example: 'prepaid, postpaid'
                  nullable: false
                meterNumber:
                  type: numeric
                  description: 'The meter number.'
                  example: '0123456789'
                  nullable: false
              required:
                - serviceID
                - meterType
                - meterNumber
  /api/v1/electricity:
    post:
      summary: 'Vend Electricity'
      operationId: vendElectricity
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: completed
                    type: object
                    example:
                      status: completed
                      message: 'Transaction successful'
                      data:
                        type: 'Electricity Purchase'
                        service: 'Ibadan Electricity Distribution Company'
                        amount: '1000'
                        amount_payable: '1000.00'
                        phone_number: '08161144693'
                        recipient:
                          meter_number: '1111111111111'
                          meter_type: prepaid
                          name: 'OLADIPO OLUWAFEMI'
                          address: NONE
                      reference: 20241108123542FF2FLCNIVVL6
                      token: ' 0948  8945  8115  3789  5170  '
                      token_unit: 55.03kwH
                      api_response: 'Electricity Purchase of Ibadan Electricity Distribution Company (Prepaid) ₦1000 for 1111111111111 was successful. '
                    properties:
                      status:
                        type: string
                        example: completed
                      message:
                        type: string
                        example: 'Transaction successful'
                      data:
                        type: object
                        properties:
                          type:
                            type: string
                            example: 'Electricity Purchase'
                          service:
                            type: string
                            example: 'Ibadan Electricity Distribution Company'
                          amount:
                            type: string
                            example: '1000'
                          amount_payable:
                            type: string
                            example: '1000.00'
                          phone_number:
                            type: string
                            example: '08161144693'
                          recipient:
                            type: object
                            properties:
                              meter_number:
                                type: string
                                example: '1111111111111'
                              meter_type:
                                type: string
                                example: prepaid
                              name:
                                type: string
                                example: 'OLADIPO OLUWAFEMI'
                              address:
                                type: string
                                example: NONE
                      reference:
                        type: string
                        example: 20241108123542FF2FLCNIVVL6
                      token:
                        type: string
                        example: ' 0948  8945  8115  3789  5170  '
                      token_unit:
                        type: string
                        example: 55.03kwH
                      api_response:
                        type: string
                        example: 'Electricity Purchase of Ibadan Electricity Distribution Company (Prepaid) ₦1000 for 1111111111111 was successful. '
                  -
                    description: pending
                    type: object
                    example:
                      status: pending
                      message: 'Transaction pending'
                      data:
                        type: 'Electricity Purchase'
                        service: 'Ibadan Electricity Distribution Company'
                        amount: '1000'
                        amount_payable: '1000.00'
                        phone_number: '08161144693'
                        recipient:
                          meter_number: '1111111111111'
                          meter_type: prepaid
                          name: 'OLADIPO OLUWAFEMI'
                          address: NONE
                      reference: 20241108123542FF2FLCNIVVL6
                      token: ''
                      token_unit: ''
                      api_response: 'Electricity Purchase of Ibadan Electricity Distribution Company (Prepaid) ₦1000 for 1111111111111 failed. '
                    properties:
                      status:
                        type: string
                        example: pending
                      message:
                        type: string
                        example: 'Transaction pending'
                      data:
                        type: object
                        properties:
                          type:
                            type: string
                            example: 'Electricity Purchase'
                          service:
                            type: string
                            example: 'Ibadan Electricity Distribution Company'
                          amount:
                            type: string
                            example: '1000'
                          amount_payable:
                            type: string
                            example: '1000.00'
                          phone_number:
                            type: string
                            example: '08161144693'
                          recipient:
                            type: object
                            properties:
                              meter_number:
                                type: string
                                example: '1111111111111'
                              meter_type:
                                type: string
                                example: prepaid
                              name:
                                type: string
                                example: 'OLADIPO OLUWAFEMI'
                              address:
                                type: string
                                example: NONE
                      reference:
                        type: string
                        example: 20241108123542FF2FLCNIVVL6
                      token:
                        type: string
                        example: ''
                      token_unit:
                        type: string
                        example: ''
                      api_response:
                        type: string
                        example: 'Electricity Purchase of Ibadan Electricity Distribution Company (Prepaid) ₦1000 for 1111111111111 failed. '
                  -
                    description: failed
                    type: object
                    example:
                      status: failed
                      message: 'Transaction failed'
                      data:
                        type: 'Electricity Purchase'
                        service: 'Ibadan Electricity Distribution Company'
                        amount: '1000'
                        amount_payable: '1000.00'
                        phone_number: '08161144693'
                        recipient:
                          meter_number: '1111111111111'
                          meter_type: prepaid
                          name: 'OLADIPO OLUWAFEMI'
                          address: NONE
                      reference: 20241108123542FF2FLCNIVVL6
                      token: ''
                      token_unit: ''
                      api_response: 'Electricity Purchase of Ibadan Electricity Distribution Company (Prepaid) ₦1000 for 1111111111111 is currently being processed. Please check back after a while.. '
                    properties:
                      status:
                        type: string
                        example: failed
                      message:
                        type: string
                        example: 'Transaction failed'
                      data:
                        type: object
                        properties:
                          type:
                            type: string
                            example: 'Electricity Purchase'
                          service:
                            type: string
                            example: 'Ibadan Electricity Distribution Company'
                          amount:
                            type: string
                            example: '1000'
                          amount_payable:
                            type: string
                            example: '1000.00'
                          phone_number:
                            type: string
                            example: '08161144693'
                          recipient:
                            type: object
                            properties:
                              meter_number:
                                type: string
                                example: '1111111111111'
                              meter_type:
                                type: string
                                example: prepaid
                              name:
                                type: string
                                example: 'OLADIPO OLUWAFEMI'
                              address:
                                type: string
                                example: NONE
                      reference:
                        type: string
                        example: 20241108123542FF2FLCNIVVL6
                      token:
                        type: string
                        example: ''
                      token_unit:
                        type: string
                        example: ''
                      api_response:
                        type: string
                        example: 'Electricity Purchase of Ibadan Electricity Distribution Company (Prepaid) ₦1000 for 1111111111111 is currently being processed. Please check back after a while.. '
        403:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: error
                  message: 'Ibadan Electricity Distribution Company Vending service currently unavailable.'
                properties:
                  status:
                    type: string
                    example: error
                  message:
                    type: string
                    example: 'Ibadan Electricity Distribution Company Vending service currently unavailable.'
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: error
                  message: 'Validation errors'
                  errors:
                    serviceID: 'The service i d field is required.'
                    meterType: 'The meter type field is required.'
                    meterNumber: 'The meter number field is required.'
                    amount: 'The amount field is required.'
                    phoneNumber: 'The phone number field is required.'
                properties:
                  status:
                    type: string
                    example: error
                  message:
                    type: string
                    example: 'Validation errors'
                  errors:
                    type: object
                    properties:
                      serviceID:
                        type: string
                        example: 'The service i d field is required.'
                      meterType:
                        type: string
                        example: 'The meter type field is required.'
                      meterNumber:
                        type: string
                        example: 'The meter number field is required.'
                      amount:
                        type: string
                        example: 'The amount field is required.'
                      phoneNumber:
                        type: string
                        example: 'The phone number field is required.'
      tags:
        - Electricity
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                serviceID:
                  type: string
                  description: 'The service ID of the electricity.'
                  example: ibedc
                  nullable: false
                meterType:
                  type: string
                  description: 'The meter type.'
                  example: 'prepaid, postpaid'
                  nullable: false
                meterNumber:
                  type: numeric
                  description: 'The meter number.'
                  example: '0123456789'
                  nullable: false
                amount:
                  type: integer
                  description: 'The amount to be purchased.'
                  example: 1000
                  nullable: false
                phoneNumber:
                  type: numeric
                  description: 'The phone number of the recipient.'
                  example: '0123456789'
                  nullable: false
              required:
                - serviceID
                - meterType
                - meterNumber
                - amount
                - phoneNumber
tags:
  -
    name: Authentication
    description: ''
  -
    name: Airtime
    description: ''
  -
    name: Cable
    description: ''
  -
    name: Data
    description: ''
  -
    name: Electricity
    description: ''
components:
  securitySchemes:
    default:
      type: http
      scheme: bearer
      description: 'You can retrieve your API key and secret by visiting the [developer section](/developer) in your account.'
security:
  -
    default: []
