{ "info": { "name": "Mobile Customer Information API", "description": "The mobile info API provides network related data.", "version": "0.1", "schema": "https:\/\/schema.getpostman.com\/json\/collection\/v2.1.0\/collection.json" }, "item": [ { "name": "Request access token", "description": "The OAuth2 request.", "request": { "url": { "raw": "https:\/\/staging.api.chenosis.io\/client-credentials\/accesstoken?grant_type=client_credentials", "protocol": "https", "host": [ "staging", "api", "chenosis", "io" ], "path": [ "client-credentials", "accesstoken" ], "query": [ { "key": "grant_type", "value": "client_credentials", "equals": true, "type": "string", "description": "" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "name": "Content-Type", "value": "application\/x-www-form-urlencoded", "type": "application\/x-www-form-urlencoded", "description": "" } ], "body": { "mode": "urlencoded", "details": [ { "key": "client_id", "description": "The client id fromt your app.", "value": "xxxxxxxxxxxxxxx", "required": 1, "type": "string" }, { "key": "client_secret", "description": "The client secret fromt your app.", "value": "xxxxxxxxxxxxxxx", "required": 1, "type": "string" } ], "body": { "details": [ { "key": "client_id", "description": "The client id fromt your app.", "value": "xxxxxxxxxxxxxxx", "required": 1, "type": "string" }, { "key": "client_secret", "description": "The client secret fromt your app.", "value": "xxxxxxxxxxxxxxx", "required": 1, "type": "string" } ] }, "urlencoded": [ { "key": "client_id", "description": "The client id fromt your app.", "value": "xxxxxxxxxxxxxxx", "required": 1, "type": "string" }, { "key": "client_secret", "description": "The client secret fromt your app.", "value": "xxxxxxxxxxxxxxx", "required": 1, "type": "string" } ], "query": [ { "key": "grant_type", "value": "client_credentials", "equals": true, "type": "string", "description": "" } ] }, "code": { "curl": "
\ncurl --location --request POST 'https:\/\/staging.api.chenosis.io\/client-credentials\/accesstoken?grant_type=client_credentials'\n    --header 'Authorization: token \/\/ https:\/\/staging.api.chenosis.io\/client-credentials\/accesstoken?grant_type=client_credentials'\n    --header 'Content-Type: application\/x-www-form-urlencoded'\n    --data-raw '{\n        \"client_id\": \"xxxxxxxxxxxxxxx\",\n        \"client_secret\": \"xxxxxxxxxxxxxxx\",\n    }'\n<\/code><\/pre>"
                },
                "description": "Get the oAuth2 token"
            },
            "response": [
                {
                    "code": 200,
                    "status": "OK",
                    "name": "Token Created",
                    "schema": {
                        "refresh_token_expires_in": {
                            "type": "string",
                            "description": "When the token will expire",
                            "example": "0"
                        },
                        "api_product_list": {
                            "type": "string",
                            "description": "The products associated",
                            "example": "[product_verify_experience]"
                        },
                        "api_product_list_json": {
                            "type": "json",
                            "description": "The products associated",
                            "example": [
                                "product_verify_experience"
                            ]
                        },
                        "organization_name": {
                            "type": "string",
                            "description": "The organisation that is beign called against",
                            "example": "prod"
                        },
                        "developer.email": {
                            "type": "string",
                            "description": "The developer email",
                            "example": "name@domain.com"
                        },
                        "token_type": {
                            "type": "string",
                            "description": "The type of authorization",
                            "example": "BearerToken"
                        },
                        "issued_at": {
                            "type": "string",
                            "description": "When the token was issued",
                            "example": "1617003906435"
                        },
                        "client_id": {
                            "type": "string",
                            "description": "The Client ID from the app",
                            "example": "HJFGT565435GGh87qi6n88zstxiL26BG"
                        },
                        "access_token": {
                            "type": "string",
                            "description": "The Client Secret from the app",
                            "example": "wwNJdSTHF54RD476HMI8plZuwLp3"
                        },
                        "application_name": {
                            "type": "string",
                            "description": "The application ID",
                            "example": "7879798543g-98jh-6yg5-7876-876hg5df4sd2"
                        },
                        "scope": {
                            "type": "string",
                            "description": "What scope has been applied",
                            "example": "USER-VERIFICATION"
                        },
                        "expires_in": {
                            "type": "string",
                            "description": "When the token will expire",
                            "example": "3599"
                        },
                        "refresh_count": {
                            "type": "string",
                            "description": "How many refreshes available",
                            "example": "0"
                        },
                        "status": {
                            "type": "string",
                            "description": "The status of the request",
                            "example": "approved"
                        }
                    },
                    "body": "{\"refresh_token_expires_in\": \"0\", \"api_product_list\": \"[product_verify_experience]\", \"api_product_list_json\": [\"product_verify_experience\"], \"organization_name\": \"prod\", \"developer.email\": \"name@domain.com\", \"token_type\": \"BearerToken\", \"issued_at\": \"1617003906435\", \"client_id\": \"HJFGT565435GGh87qi6n88zstxiL26BG\", \"access_token\": \"wwNJdSTHF54RD476HMI8plZuwLp3\", \"application_name\": \"7879798543g-98jh-6yg5-7876-876hg5df4sd2\", \"scope\": \"USER-VERIFICATION\", \"expires_in\": \"3599\", \"refresh_count\": \"0\", \"status\": \"approved\"}",
                    "header": [
                        {
                            "key": "Content-Type",
                            "value": "application\/x-www-form-urlencoded",
                            "description": "Sending as url encoded",
                            "type": "string"
                        }
                    ]
                }
            ]
        },
        {
            "name": "Retrieve sim-sap date.",
            "description": "Retrieve last sim-sap date from network operator of subscriber as identified by phoneNumber. ",
            "request": {
                "auth": {
                    "type": "oauth2",
                    "oauth2": [
                        {
                            "key": "addTokenTo",
                            "value": "header",
                            "type": "string"
                        }
                    ]
                },
                "method": "Get",
                "header": [
                    {
                        "key": "Content-Type",
                        "name": "Content-Type",
                        "value": "application\/json",
                        "type": "application\/json",
                        "description": ""
                    }
                ],
                "url": {
                    "raw": "api.host.com\/mobile\/subscriber\/{phoneNumber}\/simswap-date",
                    "protocol": "https",
                    "host": [
                        "api",
                        "host",
                        "com"
                    ],
                    "path": [
                        "mobile",
                        "subscriber",
                        "{phoneNumber}",
                        "simswap-date"
                    ],
                    "variable": [
                        {
                            "key": "phoneNumber",
                            "value": "27123456789",
                            "type": "string",
                            "description": "ID of the subscriber is the MSISDN of the subscriber represented as International  ITU-T E.164."
                        }
                    ]
                },
                "code": {
                    "curl": "
\ncurl --location --request GET 'https:\/\/api.host.com\/mobile\/subscriber\/{phoneNumber}\/simswap-date'\n    --header 'Authorization: token \/\/ https:\/\/staging.api.chenosis.io\/client-credentials\/accesstoken?grant_type=client_credentials'\n    --header 'Content-Type: application\/json'\n<\/code><\/pre>"
                }
            },
            "response": [
                {
                    "code": 200,
                    "status": "OK",
                    "name": "Success",
                    "schema": {
                        "statusCode": {
                            "type": "string",
                            "description": "HTTP error code extension",
                            "example": 0
                        },
                        "statusMessage": {
                            "type": "string",
                            "description": "Message.",
                            "example": "Successful"
                        },
                        "phoneNumber": {
                            "type": "string",
                            "example": 27123456789,
                            "description": "phoneNumber provided in the input"
                        },
                        "data": {
                            "lastSimSwapDate": {
                                "type": "string",
                                "example": "2020-04-20",
                                "description": "The date when the last sim swap performed on the SIM of the phoneNumber provided represented as an ISO 8601:2004 [ISO8601 2004] YYYY-MM-DD format. If the date cannot be determined, the value will be an empty string"
                            }
                        },
                        "transactionId": {
                            "type": "string",
                            "description": "transaction ID for tracing."
                        }
                    },
                    "body": "{\"statusCode\":\"string\",\"statusMessage\":\"string\",\"phoneNumber\":\"string\",\"data\":{\"lastSimSwapDate\":\"string\"},\"transactionId\":\"string\"}",
                    "header": [
                        {
                            "key": "Content-Type",
                            "value": "application\/json",
                            "description": "Sending as JSON",
                            "type": "string"
                        }
                    ]
                },
                {
                    "code": 400,
                    "status": "Bad Request",
                    "name": "Bad Request",
                    "schema": {
                        "statusCode": {
                            "type": "integer",
                            "description": "HTTP error code extension"
                        },
                        "statusMessage": {
                            "type": "string",
                            "description": "More details and corrective actions related to the error which can be shown to a client."
                        },
                        "SupportMessage": {
                            "type": "string",
                            "description": "Support Message"
                        }
                    },
                    "body": "{\"statusCode\":1,\"statusMessage\":\"string\",\"SupportMessage\":\"string\"}",
                    "header": [
                        {
                            "key": "Content-Type",
                            "value": "application\/json",
                            "description": "Sending as JSON",
                            "type": "string"
                        }
                    ]
                },
                {
                    "code": 401,
                    "status": "Unauthorized",
                    "name": "Unauthorized",
                    "schema": {
                        "statusCode": {
                            "type": "integer",
                            "description": "HTTP error code extension"
                        },
                        "statusMessage": {
                            "type": "string",
                            "description": "More details and corrective actions related to the error which can be shown to a client."
                        },
                        "SupportMessage": {
                            "type": "string",
                            "description": "Support Message"
                        }
                    },
                    "body": "{\"statusCode\":1,\"statusMessage\":\"string\",\"SupportMessage\":\"string\"}",
                    "header": [
                        {
                            "key": "Content-Type",
                            "value": "application\/json",
                            "description": "Sending as JSON",
                            "type": "string"
                        }
                    ]
                },
                {
                    "code": 403,
                    "status": "Forbidden",
                    "name": "Forbidden",
                    "schema": {
                        "statusCode": {
                            "type": "integer",
                            "description": "HTTP error code extension"
                        },
                        "statusMessage": {
                            "type": "string",
                            "description": "More details and corrective actions related to the error which can be shown to a client."
                        },
                        "SupportMessage": {
                            "type": "string",
                            "description": "Support Message"
                        }
                    },
                    "body": "{\"statusCode\":1,\"statusMessage\":\"string\",\"SupportMessage\":\"string\"}",
                    "header": [
                        {
                            "key": "Content-Type",
                            "value": "application\/json",
                            "description": "Sending as JSON",
                            "type": "string"
                        }
                    ]
                },
                {
                    "code": 404,
                    "status": "Not Found",
                    "name": "Not Found",
                    "schema": {
                        "statusCode": {
                            "type": "integer",
                            "description": "HTTP error code extension"
                        },
                        "statusMessage": {
                            "type": "string",
                            "description": "More details and corrective actions related to the error which can be shown to a client."
                        },
                        "SupportMessage": {
                            "type": "string",
                            "description": "Support Message"
                        }
                    },
                    "body": "{\"statusCode\":1,\"statusMessage\":\"string\",\"SupportMessage\":\"string\"}",
                    "header": [
                        {
                            "key": "Content-Type",
                            "value": "application\/json",
                            "description": "Sending as JSON",
                            "type": "string"
                        }
                    ]
                },
                {
                    "code": 405,
                    "status": "Method Not Allowed",
                    "name": "Method No Allowed",
                    "schema": {
                        "statusCode": {
                            "type": "integer",
                            "description": "HTTP error code extension"
                        },
                        "statusMessage": {
                            "type": "string",
                            "description": "More details and corrective actions related to the error which can be shown to a client."
                        },
                        "SupportMessage": {
                            "type": "string",
                            "description": "Support Message"
                        }
                    },
                    "body": "{\"statusCode\":1,\"statusMessage\":\"string\",\"SupportMessage\":\"string\"}",
                    "header": [
                        {
                            "key": "Content-Type",
                            "value": "application\/json",
                            "description": "Sending as JSON",
                            "type": "string"
                        }
                    ]
                },
                {
                    "code": 406,
                    "status": "Not Acceptable",
                    "name": "Not acceptable",
                    "schema": {
                        "statusCode": {
                            "type": "integer",
                            "description": "HTTP error code extension"
                        },
                        "statusMessage": {
                            "type": "string",
                            "description": "More details and corrective actions related to the error which can be shown to a client."
                        },
                        "SupportMessage": {
                            "type": "string",
                            "description": "Support Message"
                        }
                    },
                    "body": "{\"statusCode\":1,\"statusMessage\":\"string\",\"SupportMessage\":\"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": {
                        "statusCode": {
                            "type": "integer",
                            "description": "HTTP error code extension"
                        },
                        "statusMessage": {
                            "type": "string",
                            "description": "More details and corrective actions related to the error which can be shown to a client."
                        },
                        "SupportMessage": {
                            "type": "string",
                            "description": "Support Message"
                        }
                    },
                    "body": "{\"statusCode\":1,\"statusMessage\":\"string\",\"SupportMessage\":\"string\"}",
                    "header": [
                        {
                            "key": "Content-Type",
                            "value": "application\/json",
                            "description": "Sending as JSON",
                            "type": "string"
                        }
                    ]
                }
            ]
        }
    ]
}