MTN Group Agents API

The agents API from MTN Group — 4 operation(s) for agents.

Operations 4

GET /{agentId} View agent profile
GET /{customerId}/agentFlag To know if any given customer Id (MSISDN) is registered as an MTN field Agent or not
PATCH /{agentId}/devices Update device information of a registered MTN Agent
POST /{agentId}/tracking/ submit app installation confirmation details to the API. #

Documentation

📖
Documentation
https://developers.mtn.com/products/account-decisioning
📖
APIReference
https://developers.mtn.com/products/account-decisioning
📖
Documentation
https://developers.mtn.com/products/tmf-customer-bill-management
📖
APIReference
https://developers.mtn.com/products/tmf-customer-bill-management
📖
Documentation
https://developers.mtn.com/products/mtn-customer-loans-api-v1
📖
APIReference
https://developers.mtn.com/products/mtn-customer-loans-api-v1
📖
Documentation
https://developers.mtn.com/products/subscriber-details
📖
APIReference
https://developers.mtn.com/products/subscriber-details
📖
Documentation
https://developers.mtn.com/products/subscriber-type
📖
APIReference
https://developers.mtn.com/products/subscriber-type
📖
Documentation
https://developers.mtn.com/products/provisioning
📖
APIReference
https://developers.mtn.com/products/provisioning
📖
Documentation
https://developers.mtn.com/products/unified-balance-v1
📖
APIReference
https://developers.mtn.com/products/unified-balance-v1
📖
Documentation
https://developers.mtn.com/products/tmf-resourceinventorymanagement-tmf639
📖
APIReference
https://developers.mtn.com/products/tmf-resourceinventorymanagement-tmf639
📖
Documentation
https://developers.mtn.com/products/sales-management
📖
APIReference
https://developers.mtn.com/products/sales-management
📖
Documentation
https://developers.mtn.com/products/service-activation-and-configuration
📖
APIReference
https://developers.mtn.com/products/service-activation-and-configuration
📖
Documentation
https://developers.mtn.com/products/service-ordering
📖
APIReference
https://developers.mtn.com/products/service-ordering
📖
Documentation
https://developers.mtn.com/products/bss-tt-oauth-v1
📖
APIReference
https://developers.mtn.com/products/bss-tt-oauth-v1
📖
Documentation
https://developers.mtn.com/products/balance-management-v1
📖
APIReference
https://developers.mtn.com/products/balance-management-v1
📖
Documentation
https://developers.mtn.com/products/callmeback-v1
📖
APIReference
https://developers.mtn.com/products/callmeback-v1
📖
Documentation
https://developers.mtn.com/products/callmeback-v2
📖
APIReference
https://developers.mtn.com/products/callmeback-v2
📖
Documentation
https://developers.mtn.com/products/rcs-communication
📖
APIReference
https://developers.mtn.com/products/rcs-communication
📖
Documentation
https://developers.mtn.com/products/communication-management-v1
📖
APIReference
https://developers.mtn.com/products/communication-management-v1
📖
Documentation
https://developers.mtn.com/products/tmf681-communication-management
📖
APIReference
https://developers.mtn.com/products/tmf681-communication-management
📖
Documentation
https://developers.mtn.com/products/ayo-preapproval
📖
APIReference
https://developers.mtn.com/products/ayo-preapproval
📖
Documentation
https://developers.mtn.com/products/content-push
📖
APIReference
https://developers.mtn.com/products/content-push
📖
Documentation
https://developers.mtn.com/products/mtn-customer-bill-management
📖
APIReference
https://developers.mtn.com/products/mtn-customer-bill-management
📖
Documentation
https://developers.mtn.com/products/customer-billing-token-v1
📖
APIReference
https://developers.mtn.com/products/customer-billing-token-v1
📖
Documentation
https://developers.mtn.com/products/mtn-nigeria-data-gifting-v1
📖
APIReference
https://developers.mtn.com/products/mtn-nigeria-data-gifting-v1
📖
Documentation
https://developers.mtn.com/products/mtn-nigeria-customer-datashare
📖
APIReference
https://developers.mtn.com/products/mtn-nigeria-customer-datashare
📖
Documentation
https://developers.mtn.com/products/customer-delivery-booking
📖
APIReference
https://developers.mtn.com/products/customer-delivery-booking
📖
Documentation
https://developers.mtn.com/products/customer-identification-v1
📖
APIReference
https://developers.mtn.com/products/customer-identification-v1
📖
Documentation
https://developers.mtn.com/products/kyc-consent
📖
APIReference
https://developers.mtn.com/products/kyc-consent
📖
Documentation
https://developers.mtn.com/products/customer-loyalty-management
📖
APIReference
https://developers.mtn.com/products/customer-loyalty-management
📖
Documentation
https://developers.mtn.com/products/customer-management-coe-za-preprod
📖
APIReference
https://developers.mtn.com/products/customer-management-coe-za-preprod
📖
Documentation
https://developers.mtn.com/products/customer-pin-management-v2
📖
APIReference
https://developers.mtn.com/products/customer-pin-management-v2
📖
Documentation
https://developers.mtn.com/products/customer-promotion
📖
APIReference
https://developers.mtn.com/products/customer-promotion
📖
Documentation
https://developers.mtn.com/products/customer-survey
📖
APIReference
https://developers.mtn.com/products/customer-survey
📖
Documentation
https://developers.mtn.com/products/customer-data-transfer-ng-prod
📖
APIReference
https://developers.mtn.com/products/customer-data-transfer-ng-prod
📖
Documentation
https://developers.mtn.com/products/mtn-customer-datatransfer
📖
APIReference
https://developers.mtn.com/products/mtn-customer-datatransfer
📖
Documentation
https://developers.mtn.com/products/device-swap-v1
📖
APIReference
https://developers.mtn.com/products/device-swap-v1
📖
Documentation
https://developers.mtn.com/products/tmf-720-digital-identity-management
📖
APIReference
https://developers.mtn.com/products/tmf-720-digital-identity-management
📖
Documentation
https://developers.mtn.com/products/digital-partner-management
📖
APIReference
https://developers.mtn.com/products/digital-partner-management
📖
Documentation
https://developers.mtn.com/products/document-managment
📖
APIReference
https://developers.mtn.com/products/document-managment
📖
Documentation
https://developers.mtn.com/products/tmf-document-management-tmf667
📖
APIReference
https://developers.mtn.com/products/tmf-document-management-tmf667
📖
Documentation
https://developers.mtn.com/products/tmf688-event-management
📖
APIReference
https://developers.mtn.com/products/tmf688-event-management
📖
Documentation
https://developers.mtn.com/products/eec-token-management
📖
APIReference
https://developers.mtn.com/products/eec-token-management
📖
Documentation
https://developers.mtn.com/products/insurance
📖
APIReference
https://developers.mtn.com/products/insurance
📖
Documentation
https://developers.mtn.com/products/iot-device-management
📖
APIReference
https://developers.mtn.com/products/iot-device-management
📖
Documentation
https://developers.mtn.com/products/hcm-v1
📖
APIReference
https://developers.mtn.com/products/hcm-v1
📖
Documentation
https://developers.mtn.com/products/logback-v1
📖
APIReference
https://developers.mtn.com/products/logback-v1
📖
Documentation
https://developers.mtn.com/products/tmf-loyalty-management-tmf658
📖
APIReference
https://developers.mtn.com/products/tmf-loyalty-management-tmf658
📖
Documentation
https://developers.mtn.com/products/rcs-capability
📖
APIReference
https://developers.mtn.com/products/rcs-capability
📖
Documentation
https://developers.mtn.com/products/medallia-sms-v2
📖
APIReference
https://developers.mtn.com/products/medallia-sms-v2
📖
Documentation
https://developers.mtn.com/products/advertising-v2
📖
APIReference
https://developers.mtn.com/products/advertising-v2
📖
Documentation
https://developers.mtn.com/products/mtn-advertising-api-v1
📖
APIReference
https://developers.mtn.com/products/mtn-advertising-api-v1
📖
Documentation
https://developers.mtn.com/products/mobile-customer-information
📖
APIReference
https://developers.mtn.com/products/mobile-customer-information
📖
Documentation
https://developers.mtn.com/products/withdrawals-v1
📖
APIReference
https://developers.mtn.com/products/withdrawals-v1
📖
Documentation
https://developers.mtn.com/products/momo-verification
📖
APIReference
https://developers.mtn.com/products/momo-verification
📖
Documentation
https://developers.mtn.com/products/ayoaccountholderinfo
📖
APIReference
https://developers.mtn.com/products/ayoaccountholderinfo
📖
Documentation
https://developers.mtn.com/products/agent-profile
📖
APIReference
https://developers.mtn.com/products/agent-profile
📖
Documentation
https://developers.mtn.com/products/customer-account-management-v1
📖
APIReference
https://developers.mtn.com/products/customer-account-management-v1
📖
Documentation
https://developers.mtn.com/products/mtn-customer-kyc-api-v1-product
📖
APIReference
https://developers.mtn.com/products/mtn-customer-kyc-api-v1-product
📖
Documentation
https://developers.mtn.com/products/customer-kyc-verification
📖
APIReference
https://developers.mtn.com/products/customer-kyc-verification
📖
Documentation
https://developers.mtn.com/products/loans-v2
📖
APIReference
https://developers.mtn.com/products/loans-v2
📖
Documentation
https://developers.mtn.com/products/mtn-customer-locations-api-v1
📖
APIReference
https://developers.mtn.com/products/mtn-customer-locations-api-v1
📖
Documentation
https://developers.mtn.com/products/customer-management
📖
APIReference
https://developers.mtn.com/products/customer-management
📖
Documentation
https://developers.mtn.com/products/mtn-customer-plans-api-v2
📖
APIReference
https://developers.mtn.com/products/mtn-customer-plans-api-v2
📖
Documentation
https://developers.mtn.com/products/mtn-customer-profiles-api-v2-product
📖
APIReference
https://developers.mtn.com/products/mtn-customer-profiles-api-v2-product
📖
Documentation
https://developers.mtn.com/products/risk-management
📖
APIReference
https://developers.mtn.com/products/risk-management
📖
Documentation
https://developers.mtn.com/products/mtn-customer-score
📖
APIReference
https://developers.mtn.com/products/mtn-customer-score
📖
Documentation
https://developers.mtn.com/products/simverification
📖
APIReference
https://developers.mtn.com/products/simverification
📖
Documentation
https://developers.mtn.com/products/mtn-subscription-api-v2
📖
APIReference
https://developers.mtn.com/products/mtn-subscription-api-v2
📖
Documentation
https://developers.mtn.com/products/g2m
📖
APIReference
https://developers.mtn.com/products/g2m
📖
Documentation
https://developers.mtn.com/products/oauth-v1
📖
APIReference
https://developers.mtn.com/products/oauth-v1
📖
Documentation
https://developers.mtn.com/products/merchant-provisioning-v1
📖
APIReference
https://developers.mtn.com/products/merchant-provisioning-v1
📖
Documentation
https://developers.mtn.com/products/mtn-sms-api-v1
📖
APIReference
https://developers.mtn.com/products/mtn-sms-api-v1
📖
Documentation
https://developers.mtn.com/products/ussd
📖
APIReference
https://developers.mtn.com/products/ussd
📖
Documentation
https://developers.mtn.com/products/mtn-product-offering-api-v2
📖
APIReference
https://developers.mtn.com/products/mtn-product-offering-api-v2
📖
Documentation
https://developers.mtn.com/products/mtn-product-offering-api-v3
📖
APIReference
https://developers.mtn.com/products/mtn-product-offering-api-v3
📖
Documentation
https://developers.mtn.com/products/mtn-ng-retailer-productivity-tracking-v1
📖
APIReference
https://developers.mtn.com/products/mtn-ng-retailer-productivity-tracking-v1
📖
Documentation
https://developers.mtn.com/products/tmf633-shopping-cart-management
📖
APIReference
https://developers.mtn.com/products/tmf633-shopping-cart-management
📖
Documentation
https://developers.mtn.com/products/siebel
📖
APIReference
https://developers.mtn.com/products/siebel
📖
Documentation
https://developers.mtn.com/products/tmf-party-management
📖
APIReference
https://developers.mtn.com/products/tmf-party-management
📖
Documentation
https://developers.mtn.com/products/tmf-usage-management-tmf635
📖
APIReference
https://developers.mtn.com/products/tmf-usage-management-tmf635
📖
Documentation
https://developers.mtn.com/products/usage-management
📖
APIReference
https://developers.mtn.com/products/usage-management
📖
Documentation
https://developers.mtn.com/products/mtnid-getinfo
📖
APIReference
https://developers.mtn.com/products/mtnid-getinfo
📖
Documentation
https://developers.mtn.com/products/notification-production
📖
APIReference
https://developers.mtn.com/products/notification-production
📖
Documentation
https://developers.mtn.com/products/notification-v2
📖
APIReference
https://developers.mtn.com/products/notification-v2
📖
Documentation
https://developers.mtn.com/products/order-fulfillment
📖
APIReference
https://developers.mtn.com/products/order-fulfillment
📖
Documentation
https://developers.mtn.com/products/tmf-party-interaction-tmf683
📖
APIReference
https://developers.mtn.com/products/tmf-party-interaction-tmf683
📖
Documentation
https://developers.mtn.com/products/mtn-party-management
📖
APIReference
https://developers.mtn.com/products/mtn-party-management
📖
Documentation
https://developers.mtn.com/products/rwanda-party-management
📖
APIReference
https://developers.mtn.com/products/rwanda-party-management
📖
Documentation
https://developers.mtn.com/products/payment-methods-management-sa
📖
APIReference
https://developers.mtn.com/products/payment-methods-management-sa
📖
Documentation
https://developers.mtn.com/products/payments-v1
📖
APIReference
https://developers.mtn.com/products/payments-v1
📖
Documentation
https://developers.mtn.com/products/tmf-prepay-balance-management-tmf654
📖
APIReference
https://developers.mtn.com/products/tmf-prepay-balance-management-tmf654
📖
Documentation
https://developers.mtn.com/products/product-catalog-coe
📖
APIReference
https://developers.mtn.com/products/product-catalog-coe
📖
Documentation
https://developers.mtn.com/products/product-catalog-management-v1
📖
APIReference
https://developers.mtn.com/products/product-catalog-management-v1
📖
Documentation
https://developers.mtn.com/products/product-catalogue-management
📖
APIReference
https://developers.mtn.com/products/product-catalogue-management
📖
Documentation
https://developers.mtn.com/products/tmf-product-catalog-tmf620
📖
APIReference
https://developers.mtn.com/products/tmf-product-catalog-tmf620
📖
Documentation
https://developers.mtn.com/products/product-ordering-coe
📖
APIReference
https://developers.mtn.com/products/product-ordering-coe
📖
Documentation
https://developers.mtn.com/products/tmf-product-ordering-tmf622
📖
APIReference
https://developers.mtn.com/products/tmf-product-ordering-tmf622
📖
Documentation
https://developers.mtn.com/products/resource-config-v1
📖
APIReference
https://developers.mtn.com/products/resource-config-v1
📖
Documentation
https://developers.mtn.com/products/tmf-resource-ordering-tmf652
📖
APIReference
https://developers.mtn.com/products/tmf-resource-ordering-tmf652
📖
Documentation
https://developers.mtn.com/products/tmf-service-activation-tmf678
📖
APIReference
https://developers.mtn.com/products/tmf-service-activation-tmf678
📖
Documentation
https://developers.mtn.com/products/job-card-management
📖
APIReference
https://developers.mtn.com/products/job-card-management
📖
Documentation
https://developers.mtn.com/products/ticket
📖
APIReference
https://developers.mtn.com/products/ticket
📖
Documentation
https://developers.mtn.com/products/mtn-sms-interface
📖
APIReference
https://developers.mtn.com/products/mtn-sms-interface
📖
Documentation
https://developers.mtn.com/products/sms-v3-api
📖
APIReference
https://developers.mtn.com/products/sms-v3-api
📖
Documentation
https://developers.mtn.com/products/sim-management-staging
📖
APIReference
https://developers.mtn.com/products/sim-management-staging
📖
Documentation
https://developers.mtn.com/products/sim-swap-verification-v1
📖
APIReference
https://developers.mtn.com/products/sim-swap-verification-v1
📖
Documentation
https://developers.mtn.com/products/subscriber-management
📖
APIReference
https://developers.mtn.com/products/subscriber-management
📖
Documentation
https://developers.mtn.com/products/taxation-v1
📖
APIReference
https://developers.mtn.com/products/taxation-v1
📖
Documentation
https://developers.mtn.com/products/tmf-trouble-ticket-tmf621
📖
APIReference
https://developers.mtn.com/products/tmf-trouble-ticket-tmf621
📖
Documentation
https://developers.mtn.com/products/tmf629-customer-management
📖
APIReference
https://developers.mtn.com/products/tmf629-customer-management
📖
Documentation
https://developers.mtn.com/products/tmf637-product-inventory
📖
APIReference
https://developers.mtn.com/products/tmf637-product-inventory
📖
Documentation
https://developers.mtn.com/products/account-management-coe
📖
APIReference
https://developers.mtn.com/products/account-management-coe
📖
Documentation
https://developers.mtn.com/products/tmf-payment-management-tmf676
📖
APIReference
https://developers.mtn.com/products/tmf-payment-management-tmf676
📖
Documentation
https://developers.mtn.com/products/resource-pool-management
📖
APIReference
https://developers.mtn.com/products/resource-pool-management
📖
Documentation
https://developers.mtn.com/products/tmf-usage-consumption-tmf677
📖
APIReference
https://developers.mtn.com/products/tmf-usage-consumption-tmf677
📖
Documentation
https://developers.mtn.com/products/usage-consumption
📖
APIReference
https://developers.mtn.com/products/usage-consumption

Specifications

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/mtn-group-agents-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

mtn-group-agents-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: v1.0
  title: MTN Agent Profile Agents API
  description: An API to retrieve the profile of an MTN field agent. Please refer to the reference guides https://developers.mtn.com/getting-started and Response and Error Codes documents https://developers.mtn.com/getting-started/response-and-error-codes
servers:
- url: https://api.mtn.com/v1/agents
security:
- ApiKeyAuth: []
- OAuth2: []
tags:
- name: agents
paths:
  /{agentId}:
    get:
      description: Retrieves the profile of a MTN field agent.
      summary: View agent profile
      tags:
      - agents
      parameters:
      - in: path
        name: agentId
        description: ID of the agent. It could be MSISDN, email address, or any other agent identifier. if id is msisdn, format must be E.123
        required: true
        schema:
          type: string
      - name: fields
        in: query
        description: Filter for parts of the agent profile to be returned. Use comma-separated values
        x-example: agentKyc,agentPlans,activityReport
        schema:
          type: string
      - name: X-Authorization
        in: header
        description: SSO Bearer token received from OAuth2.0 authentication with the backend system
        x-example: eyJhbGciOiJ.IUzI1NiIsIn.R5cCI6IkpXVCJ9
        schema:
          type: string
      responses:
        200:
          description: Agent Profile object. For a successful request, it will contain all the agent's details. If the agent does not have any requested data, then it will be null.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Agent'
        207:
          description: If there was an error retrieving some part of the request, then the successful request will be shown, and the remaining failed objects will be be excluded. E.g. if there was an error retrieving Balance information, then the balance object will be empty
          content:
            Multi-Status Response, showing valid Locations data, but plan object is null:
              example: "\"location\": {\n  \"data\": {\n    \"country\": \"ZA\",\n    \"operator\": \"MTN\"\n  },\n  \"_links\": {\n    \"self\": {\n      \"href\": \"http://api.mtn.com/agents/27832000046/locations\"\n    }\n  }\n} \"plan\": {\n  \"data\": null,\n   \"_links\": {\n    \"self\": {\n        \"href\": \"http://api.mtn.com/agents/27832000046/plans\"\n      }\n    }\n}\n"
        400:
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDefault'
        401:
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDefault'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDefault'
        404:
          description: Agent not found
          content:
            The data object/envelope will be null:
              example: "{\n  \"data\": null\n}\n"
        405:
          description: Method Not allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /{customerId}/agentFlag:
    get:
      summary: To know if any given customer Id (MSISDN) is registered as an MTN field Agent or not
      description: To know if any given customer Id (MSISDN) is registered as an MTN field Agent or not
      tags:
      - agents
      parameters:
      - in: path
        name: customerId
        description: ID of the customer. It could be MSISDN, email address, or any other customer identifier. if id is msisdn, format must be E.123
        required: true
        schema:
          type: string
      - name: X-Authorization
        in: header
        description: SSO Bearer token received from OAuth2.0 authentication with the backend system
        x-example: eyJhbGciOiJ.IUzI1NiIsIn.R5cCI6IkpXVCJ9
        schema:
          type: string
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/agentFLAG'
        400:
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        401:
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDefault'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDefault'
        404:
          description: Agent not found
          content:
            The data object/envelope will be null:
              example: "{\n  \"data\": null\n}\n"
        405:
          description: Method Not allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /{agentId}/devices:
    patch:
      summary: Update device information of a registered MTN Agent
      description: Update device information of a registered MTN Agent. E.g. Updating the IMEI the Agent's assigned Point-of-Sale device
      tags:
      - agents
      parameters:
      - in: path
        name: agentId
        description: ID of the agent. It could be MSISDN, email address, or any other agent identifier. if id is msisdn, format must be E.123
        required: true
        schema:
          type: string
      - name: transactionId
        in: header
        description: Client generated request Id.
        schema:
          type: string
      - name: X-Authorization
        in: header
        description: SSO Bearer token received from OAuth2.0 authentication with the backend system
        x-example: eyJhbGciOiJ.IUzI1NiIsIn.R5cCI6IkpXVCJ9
        schema:
          type: string
      responses:
        201:
          description: Created
          content:
            application/json:
              schema:
                allOf:
                - type: object
                  properties:
                    statusCode:
                      type: string
                      description: Response status code. 0000 for success
                    transactionId:
                      type: string
                      description: Response transaction Id from the backend
                - $ref: '#/components/schemas/Devices'
                - type: object
                  properties:
                    geoTag:
                      $ref: '#/components/schemas/geoTagging'
                - type: object
                  properties:
                    _links:
                      $ref: '#/components/schemas/AgentLinks'
        400:
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        401:
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: Agent not found
          content:
            The data object/envelope will be null:
              example: "{\n  \"data\": null\n}\n"
        405:
          description: Method Not allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      requestBody:
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/Devices'
              - type: object
                properties:
                  geoTag:
                    $ref: '#/components/schemas/geoTagging'
        description: Device Information
  /{agentId}/tracking/:
    post:
      operationId: addAppInstallationConfirmationDetails
      summary: submit app installation confirmation details to the API.
      description: This endpoint is used to submit app installation confirmation details to the API.
      tags:
      - agents
      parameters:
      - in: path
        name: agentId
        description: ID of the agent. It could be MSISDN, email address, or any other agent identifier. if id is msisdn, format must be E.123
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/installationConfirmationDetailsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '405':
          description: Method Not allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/installationConfirmationDetailsRequest'
        description: Client generated Id to include for tracing requests.
        required: true
components:
  schemas:
    installationConfirmationDetailsResponse:
      type: object
      properties:
        statusCode:
          type: string
        statusMessage:
          type: string
        timestamp:
          type: string
          format: date-time
          description: Error response code
    Agent:
      type: object
      properties:
        statusCode:
          type: string
          description: Canonical response code. '0000' for success response
          example: '0000'
        agentId:
          type: string
          example: '2568810000034'
        agentKyc:
          type: array
          items:
            $ref: '#/components/schemas/AGENTKYC'
        agentPlans:
          type: object
          $ref: '#/components/schemas/AGENTPLANS'
        activityReport:
          type: object
          $ref: '#/components/schemas/ACTIVITYREPORT'
        _link:
          type: object
          allOf:
          - description: The link to retrieve the Agent KYC details.
          - $ref: '#/components/schemas/AgentLinks'
    ErrorDefault:
      properties:
        error:
          type: string
        error_description:
          type: string
    Amount:
      type: object
      required:
      - value
      - type
      - unit
      description: The amount details for a wallet.
      properties:
        type:
          type: string
          description: This is the type of the wallet value.
          enum:
          - CURRENCY
          - DATA
          - MINUTES
          - SMS
        value:
          type: string
          description: This is the value of a balance wallet.
          example: 76923
        unit:
          type: string
          description: This is the unit of the wallet value.
          enum:
          - UGX
          - ZAR
          - NGN
          - GB
          - MB
          - MINUTES
          - SMS
          - FCFA
    AGENTPLANS:
      type: object
      properties:
        data:
          type: object
          properties:
            balance:
              type: array
              description: The account balance details of an agent
              items:
                properties:
                  balanceType:
                    type: string
                    description: Identifies the type of balance. An agent plan may have multiple types of balances for different usage, for example, AgentCommission, voice, SMS, and game services.
                    example: AgentCommission
                  category:
                    type: string
                    description: Identifies the category of the balance type.
                    example: AgentCommission
                  balanceDetail:
                    $ref: '#/components/schemas/BalanceDetail'
                  wallets:
                    type: array
                    description: The different wallets used to compute the active and unused values of this balance.
                    items:
                      $ref: '#/components/schemas/Wallet'
    BalanceDetail:
      type: object
      required:
      - type
      - activeValue
      - activeUnit
      description: The details for a balance type.
      properties:
        type:
          type: string
          description: This is the type of the value.
          enum:
          - CURRENCY
          - DATA
          - MINUTES
          - SMS
        activeValue:
          type: string
          description: This is the aggregated formatted active value of a balance type.
          example: '136271'
        activeUnit:
          type: string
          description: This is the unit of the aggregated active value.
          enum:
          - UGX
          - ZAR
          - NGN
          - GB
          - MB
          - MINUTES
          - SMS
    agentFLAG:
      type: object
      properties:
        statusCode:
          type: string
          example: '0000'
        message:
          type: string
          description: Response description from the backend system
          example: Yello, Requestor should be an agent.
        transactionId:
          type: string
          description: Response Id from the backend
        agentId:
          type: string
          description: ID of the agent. It could be MSISDN, email address, or any other agent identifier. if id is msisdn, format must be E.123
          example: '256789999781'
        data:
          type: object
          properties:
            isAgent:
              type: boolean
              example: false
        _links:
          allOf:
          - description: Links used to access the agent information
          - $ref: '#/components/schemas/AgentLinks'
    AGENTKYC:
      type: object
      properties:
        data:
          type: object
          properties:
            agentId:
              type: string
              description: Unique identifier for the Agent
              example: DEALER789
            role:
              type: string
              description: Role of the Agent in the agent's hierarchy
              enum:
              - Agent
              - MasterDealer
              - HandlerDealer
            type:
              type: string
              description: Type of the agent
              example: RICA
            status:
              type: string
              description: Current status of the agent
              enum:
              - Active
              - Suspended
              - Blocked
            imei:
              type: string
              description: IMEI of the handset that is assigned to the Agent
              example: 123456789876543
            registrationDate:
              type: string
              format: date-time
              description: Date and time when the Agent was created. Should be in ISO 8601
            firstName:
              type: string
            middleName:
              type: string
            lastName:
              type: string
    Wallet:
      type: object
      required:
      - name
      - amount
      description: Contributing wallets to the aggregated balance
      properties:
        name:
          type: string
          description: The name of a wallet account. E.g. registrationCommission, simswapCommission
          example: registrationCommission
        amount:
          $ref: '#/components/schemas/Amount'
    ACTIVITYREPORT:
      type: object
      properties:
        firstCallActivationCount:
          type: integer
          description: Number of new customers registered by the agent that have done their first voice call
          example: 110
        firstRechargeActivationCount:
          type: integer
          description: Number of new customers registered by the agent that have done their first airtime recharge
          example: 90
    AgentLinks:
      type: object
      required:
      - self
      properties:
        self:
          type: object
          required:
          - href
          description: ''
          properties:
            href:
              type: string
              description: ''
              example: https://api.mtn.com/v1/agents/256779999781
    geoTagging:
      type: object
      properties:
        regLocationLat:
          type: number
          format: double
          description: Latitude value of the place where the agent KYC capture has taken place
          example: 3.225225225225225
        regLocationLong:
          type: number
          format: double
          description: Longitude value of the place where the agent KYC capture has taken place
          example: 30.913829549623536
        cellGlobalId:
          type: string
          pattern: ^\d{3}-\d{2}-\d-\w$
          description: Full Cell Global Identity in the format MCC-MNC-LAC-CellId
          example: 641-10-2321-6b1c
        kycCaptureDateTime:
          type: string
          format: date-time
          description: datetime when the agent KYC capture/update happened, using IETC-RFC-3339 format
    installationConfirmationDetailsRequest:
      type: object
      required:
      - appCode
      - installerCode
      - msisdn
      - imei
      properties:
        appCode:
          type: string
        msisdn:
          type: string
        imei:
          type: string
        phoneOSVersion:
          type: string
        imsi:
          type: string
        sourceChannel:
          type: string
        deviceLocation:
          type: string
    Error:
      properties:
        timestamp:
          type: string
          format: date-time
          description: Error response code
        status:
          type: string
          description: Text explaining the reason for the error
        error:
          type: string
        message:
          type: string
          description: More error details and corrective measures
        path:
          type: string
          description: ''
    Devices:
      type: object
      properties:
        data:
          type: object
          properties:
            devices:
              type: array
              items:
                properties:
                  IMEI:
                    type: string
                    description: Last known IMEI. Unique identifier of Mobile Device used by the MSISDN
                    example: '990000862471854'
                  timePeriods:
                    type: object
                    properties:
                      startDateTime:
                        type: string
                        format: date-time
                      endDateTime:
                        type: string
                        format: date-time
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      name: X-API-Key
      in: header
    OAuth2:
      type: oauth2
      flows:
        clientCredentials:
          scopes: {}
          tokenUrl: https://api.mtn.com/v1/oauth/access_token