{ "info": { "name": "MTN Customer Devices API", "schema": "https:\/\/schema.getpostman.com\/json\/collection\/v2.1.0\/collection.json" }, "item": [ { "name": "Retrieve customer devices data", "description": "", "request": { "auth": { "type": "apikey", "apikey": [ { "key": "key", "value": "x-api-key", "type": "string" } ] }, "method": "Get", "header": { "3": { "key": "transactionId", "name": "transactionId", "value": "", "type": "string", "description": "Client generated Id to include for tracing requests, so that the API can easily trace the HTTP request all the way from a client to MTN's backend processes (via our proxies). Each time a request is made to an MTN API the client should include a unique request reference in the HTTP Header. The value must be between 5 and 20 characters, and consist of ASCII letters, digits, or the characters +, \/, =, and -. Invalid or blank IDs will be ignored and replaced with generated ones. MTN may use this to detect duplicate transactions from the client, but this functionality is not always guaranteed, so clients must make their own efforts to prevent duplicate transactions. MTN will also log the transactionId in order to assist with debugging and to correlate transactions processed by the API to requests from the client." }, "4": { "key": "Content-Type", "name": "Content-Type", "value": "application\/json", "type": "application\/json", "description": "" } }, "url": { "raw": "api.mtn.com\/customers\/{customerId}\/devices", "protocol": "https", "host": [ "api", "mtn", "com" ], "path": [ "v1", "customers", "customers", "{customerId}", "devices" ], "query": [ { "key": "startDate", "value": "", "required": 0, "type": "string", "description": "An optional parameter, together with endDate, allows developers to specify a time range by which to query customer data on. If you want to request data for 2 months, then start date will need to be set to 2 months prior to today, and endDate to todays date. If this is not set, the date range will be defaulted to 6 months" }, { "key": "endDate", "value": "", "required": 0, "type": "string", "description": "An optional parameter, together with endDate, allows developers to specify a time range by which to query customer data on. If you want to request data for 2 months, then start date will need to be set to 2 months prior to today, and endDate to todays date. If this is not set, the date range will be defaulted to 6 months" } ] } }, "response": [ { "code": 200, "status": "OK", "name": "OK", "schema": { "data": { "devices": { "deviceId": { "type": "string", "description": "an identifier for each device. This will be a unique key per device, the format will be a string ", "example": "Should" }, "deviceMake": { "type": "string", "description": "Make of current device", "example": "Apple iPhone X" }, "IMSI": { "type": "string", "description": "Last known IMSI. Relates to the SIM used by the MSISDN", "example": "310150123456789" }, "IMEI": { "type": "string", "description": "Last known IMEI. Unique identifier of Mobile Device used by the MSISDN", "example": "990000862471854" }, "timePeriods": { "unit": { "type": "string", "default": "", "description": "month,days" }, "value": { "type": "string", "description": "the value of the timePeriods 'unit' field. E.g. if unit is 'month', then this will represent how many months", "example": "1" } }, "numberOfIMSIs": { "type": "string", "description": "The number of unique IMSIs that was used by the MSISDN in the last measured period", "example": "4" }, "numberOfIMEIs": { "type": "string", "description": "The number of unique IMEI\u2019s that was used by the MSISDN in the last measured period", "example": "1" }, "primaryUCID": { "type": "string", "description": "Primary Unique Customer Id" }, "primaryUSID": { "type": "string", "description": "Primary Unique Service Id" }, "secondaryUCID": { "type": "string", "description": "Secondary Unique Customer Id" }, "secondaryUSID": { "type": "string", "description": "Secondary Unique Service Id" } } }, "_links": { "self": { "href": { "type": "string", "description": "HATEOS links referring to this object", "example": "https:\/\/api.mtn.com\/v1\/customers\/27832000000\/devices" }, "type": { "type": "string", "description": "HTTP methods supported by the HATEOS links above", "example": "GET, POST" } } } }, "body": "{\"data\":{\"devices\":{\"deviceId\":\"string\",\"deviceMake\":\"string\",\"IMSI\":\"string\",\"IMEI\":\"string\",\"timePeriods\":{\"unit\":\"string\",\"value\":\"string\"},\"numberOfIMSIs\":\"string\",\"numberOfIMEIs\":\"string\",\"primaryUCID\":\"string\",\"primaryUSID\":\"string\",\"secondaryUCID\":\"string\",\"secondaryUSID\":\"string\"}},\"_links\":{\"self\":{\"href\":\"string\",\"type\":\"string\"}}}", "header": [ { "key": "Content-Type", "value": "application\/json", "description": "Sending as JSON", "type": "string" } ] }, { "code": 400, "status": "Bad Request", "name": "Bad Request. A Bad Request response is returned when the path info doesn't have the right format, or a parameter or request body value doesn't have the right format, or a required parameter is missing, or values have the right format but are invalid in some way. The client SHOULD NOT repeat the request without modifications.", "schema": { "timestamp": { "type": "string", "format": "date-time", "description": "Timestamp when the error occurred, using date-time format", "example": "2019-08-23T07:29:25.593+0000\u201d" }, "status": { "type": "string", "description": "HTTP Status code", "example": "404" }, "error": { "type": "string", "description": "HTTP Status description", "example": "Not Found" }, "message": { "type": "string", "description": "More error details and corrective measures", "example": "No message available" }, "path": { "type": "string", "description": "that URL from which the error originated", "example": "\/customers\/2783200000\/subscriptions\/AG8cfc7353e-23b0-578f-a041-b8bf5ef76418:23-08-201907:27:38AMGMT\/status\u201d" } }, "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": 401, "status": "Unauthorized", "name": "Unauthorized", "schema": { "timestamp": { "type": "string", "format": "date-time", "description": "Timestamp when the error occurred, using date-time format", "example": "2019-08-23T07:29:25.593+0000\u201d" }, "status": { "type": "string", "description": "HTTP Status code", "example": "404" }, "error": { "type": "string", "description": "HTTP Status description", "example": "Not Found" }, "message": { "type": "string", "description": "More error details and corrective measures", "example": "No message available" }, "path": { "type": "string", "description": "that URL from which the error originated", "example": "\/customers\/2783200000\/subscriptions\/AG8cfc7353e-23b0-578f-a041-b8bf5ef76418:23-08-201907:27:38AMGMT\/status\u201d" } }, "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": 403, "status": "Forbidden", "name": "Forbidden", "schema": { "timestamp": { "type": "string", "format": "date-time", "description": "Timestamp when the error occurred, using date-time format", "example": "2019-08-23T07:29:25.593+0000\u201d" }, "status": { "type": "string", "description": "HTTP Status code", "example": "404" }, "error": { "type": "string", "description": "HTTP Status description", "example": "Not Found" }, "message": { "type": "string", "description": "More error details and corrective measures", "example": "No message available" }, "path": { "type": "string", "description": "that URL from which the error originated", "example": "\/customers\/2783200000\/subscriptions\/AG8cfc7353e-23b0-578f-a041-b8bf5ef76418:23-08-201907:27:38AMGMT\/status\u201d" } }, "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": 404, "status": "Not Found", "name": "Customer not found", "schema": { "timestamp": { "type": "string", "format": "date-time", "description": "Timestamp when the error occurred, using date-time format", "example": "2019-08-23T07:29:25.593+0000\u201d" }, "status": { "type": "string", "description": "HTTP Status code", "example": "404" }, "error": { "type": "string", "description": "HTTP Status description", "example": "Not Found" }, "message": { "type": "string", "description": "More error details and corrective measures", "example": "No message available" }, "path": { "type": "string", "description": "that URL from which the error originated", "example": "\/customers\/2783200000\/subscriptions\/AG8cfc7353e-23b0-578f-a041-b8bf5ef76418:23-08-201907:27:38AMGMT\/status\u201d" } }, "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": 405, "status": "Method Not Allowed", "name": "Method Not allowed", "schema": { "timestamp": { "type": "string", "format": "date-time", "description": "Timestamp when the error occurred, using date-time format", "example": "2019-08-23T07:29:25.593+0000\u201d" }, "status": { "type": "string", "description": "HTTP Status code", "example": "404" }, "error": { "type": "string", "description": "HTTP Status description", "example": "Not Found" }, "message": { "type": "string", "description": "More error details and corrective measures", "example": "No message available" }, "path": { "type": "string", "description": "that URL from which the error originated", "example": "\/customers\/2783200000\/subscriptions\/AG8cfc7353e-23b0-578f-a041-b8bf5ef76418:23-08-201907:27:38AMGMT\/status\u201d" } }, "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": "Timestamp when the error occurred, using date-time format", "example": "2019-08-23T07:29:25.593+0000\u201d" }, "status": { "type": "string", "description": "HTTP Status code", "example": "404" }, "error": { "type": "string", "description": "HTTP Status description", "example": "Not Found" }, "message": { "type": "string", "description": "More error details and corrective measures", "example": "No message available" }, "path": { "type": "string", "description": "that URL from which the error originated", "example": "\/customers\/2783200000\/subscriptions\/AG8cfc7353e-23b0-578f-a041-b8bf5ef76418:23-08-201907:27:38AMGMT\/status\u201d" } }, "body": "{\"timestamp\":\"string\",\"status\":\"string\",\"error\":\"string\",\"message\":\"string\",\"path\":\"string\"}", "header": [ { "key": "Content-Type", "value": "application\/json", "description": "Sending as JSON", "type": "string" } ] } ] } ] }