{ "info": { "name": "MTN Customer Plans API", "schema": "https:\/\/schema.getpostman.com\/json\/collection\/v2.1.0\/collection.json" }, "item": [ { "name": "View customer plans", "description": "Retrieves the Billing Plan and related details of an MTN customer.", "request": { "auth": { "type": "apikey", "apikey": [ { "key": "key", "value": "X-API-Key", "type": "string" } ] }, "method": "Get", "header": [ { "key": "Content-Type", "name": "Content-Type", "value": "application\/json", "type": "application\/json", "description": "" } ], "url": { "raw": "api.mtn.com\/customers\/{customerId}\/plans", "protocol": "https", "host": [ "api", "mtn", "com" ], "path": [ "v1", "customers", "{customerId}", "plans" ] } }, "response": [ { "code": 200, "status": "OK", "name": "Customer Plans object. For a successfull request, the response will contain all the customers details. If the customer does not have any requested data, then those fields will be null. E.g. if the customer does not have a startDate set, then it will be null. If the customer does not have any Balance set, then the Balance array will be null.", "schema": { "data": { "type": { "type": "string", "description": "The billing type of the plan.", "enum": [ "Prepaid", "Postpaid", "Hybrid" ] }, "status": { "type": "string", "description": "The current status of the plan.", "enum": [ "Active", "Suspended", "Inactive", "RICA Barred", "Blacklisted" ] }, "startDate": { "type": "string", "description": "The date the customer was created\/provisioned", "format": "date-time" }, "endDate": { "type": "string", "description": "The date the plan will be deactivated.", "format": "date-time" }, "language": { "type": "string", "description": "The customers language." }, "balance": { "balanceType": { "type": "string", "description": "Identifies the type of balance. A customer plan may have multiple types of balances for different usage, for example, voice, SMS, and game services.", "example": "VOICE" }, "amount": { "type": "integer", "description": "Current balance on the customers account.", "example": "26861" }, "currency": { "type": "string", "description": "ISO 4217 three-letter ISO code for the currency.", "example": "ZAR" }, "expiryDate": { "type": "string", "format": "date-time", "description": "Expiry date of the balance\/bundle.", "example": "2019-12-31T12:00:00" } } }, "_link": { "self": { "href": { "type": "string", "description": "" } } } }, "body": "{\"data\":{\"type\":\"string\",\"status\":\"string\",\"startDate\":\"string\",\"endDate\":\"string\",\"language\":\"string\",\"balance\":{\"balanceType\":\"string\",\"amount\":1,\"currency\":\"string\",\"expiryDate\":\"string\"}},\"_link\":{\"self\":{\"href\":\"string\"}}}", "header": [ { "key": "Content-Type", "value": "application\/json", "description": "Sending as JSON", "type": "string" } ] }, { "code": 207, "status": "Multi-Status", "name": "If there was an error retrieving some part of the request, then the successfull 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", "schema": [], "body": "[]", "header": [ { "key": "Content-Type", "value": "application\/json", "description": "Sending as JSON", "type": "string" } ] }, { "code": 400, "status": "Bad Request", "name": "Bad Request", "schema": { "error": { "type": "string" }, "error_description": { "type": "string" } }, "body": "{\"error\":\"string\",\"error_description\":\"string\"}", "header": [ { "key": "Content-Type", "value": "application\/json", "description": "Sending as JSON", "type": "string" } ] }, { "code": 401, "status": "Unauthorized", "name": "Unauthorized", "schema": { "error": { "type": "string" }, "error_description": { "type": "string" } }, "body": "{\"error\":\"string\",\"error_description\":\"string\"}", "header": [ { "key": "Content-Type", "value": "application\/json", "description": "Sending as JSON", "type": "string" } ] }, { "code": 403, "status": "Forbidden", "name": "Forbidden", "schema": { "error": { "type": "string" }, "error_description": { "type": "string" } }, "body": "{\"error\":\"string\",\"error_description\":\"string\"}", "header": [ { "key": "Content-Type", "value": "application\/json", "description": "Sending as JSON", "type": "string" } ] }, { "code": 404, "status": "Not Found", "name": "Customer not found", "schema": [], "body": "[]", "header": [ { "key": "Content-Type", "value": "application\/json", "description": "Sending as JSON", "type": "string" } ] }, { "code": 405, "status": "Method Not Allowed", "name": "Method Not allowed", "schema": { "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": "" } }, "body": "{\"timestamp\":\"string\",\"status\":\"string\",\"error\":\"string\",\"message\":\"string\",\"path\":\"string\"}", "header": [ { "key": "Content-Type", "value": "application\/json", "description": "Sending as JSON", "type": "string" } ] }, { "code": 500, "status": "Internal Server Error", "name": "Internal Server Error", "schema": { "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": "" } }, "body": "{\"timestamp\":\"string\",\"status\":\"string\",\"error\":\"string\",\"message\":\"string\",\"path\":\"string\"}", "header": [ { "key": "Content-Type", "value": "application\/json", "description": "Sending as JSON", "type": "string" } ] } ] } ] }