{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"6eb26fab-a585-43f4-9557-217d502ebe64","name":"SAS4 for developers","description":"SASv4 is a complete billing system which offers a variety of different features to suit any ISP's needs also ISP's who want power and flexibility to meet the needs of their changing technical environment and growing user base, enabling ISP managers to take full control over their precious resources and network elements.\n\nSASv4 is an AAA server is a server program that handles user requests to access computer resources, and for an enterprise, this server provides authentication, authorization, and accounting (AAA) services. The AAA server typically interacts with network access and gateway servers and with databases and directories containing user information.\n\nSASv4 API specifications allow ISP to develop API endpoints that can then be accessed by API users (e.g., third-party developers) to build mobile and web applications for their customers.\n\n---\n\n# Authentication\n\nAuthentication to the SASv4 API is performed via JWT Bearer Authentication. Every endpoint requires authentication, so you will need to add the following header to each request:\n\n`Authorization: Bearer`\n\n---\n\n# POST Request Encryption\n\nSAS4 requires encryption for all `POST` request. The encryption method is AES and can be found in many libraries such as [CryptoJS](https://code.google.com/archive/p/crypto-js/) which is used in SAS4. The POST payload has be encapsulated into a single parameter called 'payload'. The 'payload' param will hold the actual encrypted payload. See the example of our SAS4 connector which is implemented in PHP on [SAS4-connector](https://github.com/hasanenalbana/sasconnector-php) the following expmale show this process through Node.js (you can check this [script on GitHub](https://github.com/abdo0/sas4-request-encrypt-or-decrypt) for further info in NodeJs) :\n\n``` (node)\nconst request = require('request');\nconst CryptoJS = require(\"crypto-js\");\nconst form = {user: 'admin', password: 'snonosystems'};\nconst cypData = CryptoJS.AES.encrypt(JSON.stringify(form), 'abcdefghijuklmno0123456789012345');\nconst options = {\n    url: 'http://demo4.sasradius.com/admin/api/index.php/api/login',\n    json: true,\n    body: {\n        payload: cypData.toString();\n    }\n};\nrequest.post(options, (err, res, body) => {\n    if (err) {\n        return console.log(err);\n    }\n    console.log(`Status: ${res.statusCode}`);\n    console.log(body);\n});\n\n ```\n\nthe obove code will generate encryption text of the `form` that will produce the following code :\n\n```\n{ \n   payload:   'U2FsdGVkX19TGvGsXp3eR8h/fVKdKbm4tzbrEmk7s0xsrhjKy6VybasH8b7xu6xYDcvDjNk6ulb/dVoq2J417uRhJozvbPuSfkSaXD/f644=' \n}\n\n ```\n\n---\n\n# Data Types\n\nAll of the Open Banking Nigeria API responses returned are in JSON format, with these data types defined below:\n\n| Type | Description |\n| --- | --- |\n| string | A UTF-8 encoded string |\n| number | An integer |\n| datetime | An ISO8601 encoded DateTime. All datetimes are returned in UTC with offset +00:00 |\n| decimal | All monetary values are returned with up to two decimal places and may be positive (20.78) or negative (-32.50) |\n\n---\n\n# Pagination\n\nFor section which include lists that provide several records, the response may be paged depending on the total number of records that the server can return at a time. This means that to retrieve the full set of items for a given resource you may be required to make several requests. For more info you can check [Laravel Pagination](https://laravel.com/docs/6.x/pagination#introduction)\n\n## URL Parameters\n\n| Parameters | Description |\n| --- | --- |\n| page | `number` The page number you wish to retrieve |\n| count | `number` The number of items to return in a request |\n| sortBy | `string` A field name data will be sorted by |\n| diraction | `string` Sort direction (asc/desc) |\n| columns | `array` (optional) column names to retrieve |\n\n## Response\n\n| Field | Type |\n| --- | --- |\n| current_page | `number` |\n| data | `array` |\n| first_page_url | `string` |\n| from | `number` |\n| last_page | `number` |\n| last_page_url | `string` |\n| next_page_url | `string` |\n| path | `string` |\n| per_page | `number` |\n| prev_page_url | `string` |\n| to | `number` |\n| total | `number` |\n\n## Navigating through pages\n\n- If you are on the first page, the \"prev_page_url\" link will not be present in the response.\n- If you are at the final page, the \"next_page_url\" link will not be present in the response\n- If there are no pages and all data is returned neither \"prev_page_url\" or \"next_page_url\" links will be present in the response\n    \n\n---\n\n# Errors\n\nErrors in SAS4 API are expressed as a combination of HTTP status codes and an accompanying JSON body providing required detail where possible. You should be able to rely on the HTTP status code alone to determine the cause of the problem.\n\n## Error Response Fields\n\n| Field | Type | Description |\n| --- | --- | --- |\n| message | `string` | A human-readable message as to the specifics of the problem. For example, it may contain a detail description of what caused the problem |\n| status | `number` | The HTTP status code used in the response |\n\n## Error Response codes\n\n| Status | Code | Description |\n| --- | --- | --- |\n| 200 | \\-1 | Error |","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"11765341","team":2430830,"collectionId":"6eb26fab-a585-43f4-9557-217d502ebe64","publishedId":"U16byA2y","public":true,"publicUrl":"https://documenter-api.postman.tech/view/11765341/U16byA2y","privateUrl":"https://go.postman.co/documentation/11765341-6eb26fab-a585-43f4-9557-217d502ebe64","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"documentationLayout":"classic-double-column","customisation":null,"version":"8.10.1","publishDate":"2021-08-31T08:25:36.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/1c88f60495e7e502ecb29b91c2df6e7a1406aa652b9dbad7777cbc1504aded46","favicon":""},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/U16byA2y"}