{
    "openapi": "3.0.0",
    "info": {
        "title": "Api Gateway",
        "version": "1.0.0"
    },
    "servers": [
        {
            "url": "http://20.228.184.53/PROJECTS/TxtGhana/vodafone/api-engine/public"
        }
    ],
    "paths": {
        "/api/mtn/subscribe": {
            "post": {
                "tags": [
                    "Subscription"
                ],
                "summary": "MTN Subscription",
                "description": "Subscription",
                "operationId": "MTN Subscription",
                "requestBody": {
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "required": [
                                    "planId",
                                    "msisdn",
                                    "channel",
                                    "notification"
                                ],
                                "properties": {
                                    "planId": {
                                        "type": "text"
                                    },
                                    "msisdn": {
                                        "type": "text"
                                    },
                                    "channel": {
                                        "description": "eg. USSD or SMS",
                                        "type": "text"
                                    },
                                    "notification": {
                                        "description": "eg. true or false",
                                        "type": "boolean"
                                    }
                                },
                                "type": "object"
                            }
                        },
                        "application/json": {
                            "schema": {}
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Account Created",
                        "content": {
                            "application/json": {
                                "schema": {}
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request"
                    },
                    "404": {
                        "description": "Resource Not Found"
                    }
                },
                "security": [
                    {
                        "apiAuth": []
                    }
                ]
            }
        },
        "/api/mtn/unsubscribe": {
            "post": {
                "tags": [
                    "Unsubscription"
                ],
                "summary": "MTN Unsubscription",
                "description": "Unsubscription",
                "operationId": "MTN Un-Subscription",
                "requestBody": {
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "required": [
                                    "planId",
                                    "msisdn",
                                    "channel"
                                ],
                                "properties": {
                                    "planId": {
                                        "type": "text"
                                    },
                                    "msisdn": {
                                        "type": "text"
                                    },
                                    "channel": {
                                        "description": "eg. USSD or SMS",
                                        "type": "text"
                                    }
                                },
                                "type": "object"
                            }
                        },
                        "application/json": {
                            "schema": {}
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Unsubscription successful",
                        "content": {
                            "application/json": {
                                "schema": {}
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request"
                    },
                    "404": {
                        "description": "Resource Not Found"
                    }
                },
                "security": [
                    {
                        "apiAuth": []
                    }
                ]
            }
        },
        "/api/account": {
            "post": {
                "tags": [
                    "Create Account"
                ],
                "summary": "Create account",
                "description": "Account Creation",
                "operationId": "Create Account",
                "requestBody": {
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "required": [
                                    "orgId",
                                    "email"
                                ],
                                "properties": {
                                    "orgId": {
                                        "type": "text"
                                    },
                                    "email": {
                                        "type": "text"
                                    }
                                },
                                "type": "object"
                            }
                        },
                        "application/json": {
                            "schema": {}
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Account Created",
                        "content": {
                            "application/json": {
                                "schema": {}
                            }
                        }
                    },
                    "400": {
                        "description": "Bad request"
                    },
                    "404": {
                        "description": "Resource Not Found"
                    }
                }
            }
        },
        "/api/voda/subscribe": {
            "post": {
                "tags": [
                    "Subscription"
                ],
                "summary": "VODA Subscription",
                "description": "Subscription",
                "operationId": "VODA Subscription",
                "requestBody": {
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "required": [
                                    "planId",
                                    "msisdn",
                                    "channel"
                                ],
                                "properties": {
                                    "planId": {
                                        "type": "text"
                                    },
                                    "msisdn": {
                                        "type": "text"
                                    },
                                    "channel": {
                                        "description": "eg. USSD or SMS",
                                        "type": "text"
                                    }
                                },
                                "type": "object"
                            }
                        },
                        "application/json": {
                            "schema": {}
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Account Created",
                        "content": {
                            "application/json": {
                                "schema": {}
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request"
                    },
                    "404": {
                        "description": "Resource Not Found"
                    }
                },
                "security": [
                    {
                        "apiAuth": []
                    }
                ]
            }
        },
        "/api/voda/unsubscribe": {
            "post": {
                "tags": [
                    "Unsubscription"
                ],
                "summary": "Voda Unsubscription",
                "description": "Unsubscription",
                "operationId": "VODA Un-Subscription",
                "requestBody": {
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "required": [
                                    "planId",
                                    "msisdn",
                                    "channel"
                                ],
                                "properties": {
                                    "planId": {
                                        "type": "text"
                                    },
                                    "msisdn": {
                                        "type": "text"
                                    },
                                    "channel": {
                                        "description": "eg. USSD or WAP",
                                        "type": "text"
                                    },
                                    "reason": {
                                        "type": "text"
                                    }
                                },
                                "type": "object"
                            }
                        },
                        "application/json": {
                            "schema": {}
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Unsubscription successful",
                        "content": {
                            "application/json": {
                                "schema": {}
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request"
                    },
                    "404": {
                        "description": "Resource Not Found"
                    }
                },
                "security": [
                    {
                        "apiAuth": []
                    }
                ]
            }
        },
        "/api/voda/billing": {
            "post": {
                "tags": [
                    "Billing"
                ],
                "summary": "VODA Billing",
                "description": "Billing",
                "operationId": "VODA Billing",
                "requestBody": {
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "required": [
                                    "planId",
                                    "msisdn",
                                    "channel",
                                    "amount"
                                ],
                                "properties": {
                                    "planId": {
                                        "type": "text"
                                    },
                                    "msisdn": {
                                        "type": "text"
                                    },
                                    "channel": {
                                        "description": "eg. USSD or WAP",
                                        "type": "text"
                                    },
                                    "amount": {
                                        "type": "number",
                                        "format": "float"
                                    },
                                    "description": {
                                        "type": "text"
                                    }
                                },
                                "type": "object"
                            }
                        },
                        "application/json": {
                            "schema": {}
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Billing successful",
                        "content": {
                            "application/json": {
                                "schema": {}
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request"
                    },
                    "404": {
                        "description": "Resource Not Found"
                    }
                },
                "security": [
                    {
                        "apiAuth": []
                    }
                ]
            }
        }
    },
    "components": {
        "securitySchemes": {
            "apiAuth": {
                "type": "http",
                "description": "Login with email and password to get the authentication token",
                "name": "Token based Based",
                "in": "header",
                "bearerFormat": "JWT",
                "scheme": "bearer"
            }
        }
    }
}