Delete doc.html

This commit is contained in:
Erik Thiart 2024-09-02 20:37:38 +02:00 committed by GitHub
parent ddc8d447d0
commit 4a1633e57b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

266
doc.html
View File

@ -1,266 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>SuperSIM Integration Documentation</title>
<style>
body {
font-family: Arial, sans-serif;
line-height: 1.5;
padding: 20px;
}
css
Copy code
h1 {
font-size: 24px;
margin-bottom: 20px;
}
h2 {
font-size: 20px;
margin-bottom: 10px;
}
pre {
background-color: #f1f1f1;
padding: 10px;
}
code {
font-family: Consolas, monospace;
}
.api-section {
margin-bottom: 30px;
}
.api-section h2 {
margin-bottom: 15px;
}
.api-endpoint {
margin-bottom: 10px;
}
.api-endpoint pre {
margin-bottom: 5px;
}
.api-request pre {
margin-bottom: 5px;
}
.api-response pre {
margin-bottom: 5px;
}
</style>
</head>
<body>
<h1>SuperSIM Integration Documentation</h1>
<p>Revision V1.4</p>
<p>
SuperSIM is a dynamic management engine built on top of a proprietary integration with MTN.
The system does the heavy lifting of billing, data usage monitoring, and allocation on your behalf.
It is a complete fleet management solution.
</p>
<p>
SuperSIM makes available various functionality through APIs for third-party vendor integration.
This document serves as the overview and documentation of each API.
</p>
<div class="api-section">
<h2>Authentication</h2>
<p>Each call has a username and a token variable.</p>
</div>
<div class="api-section">
<h2>Balance API</h2>
<div class="api-endpoint">
<pre>GET /api/balance.php?msisdn=msisdn&username=username&token=token HTTP/1.1</pre>
<pre>Host: simbalance.co.za</pre>
</div>
</div>
<div class="api-section">
<h2>Cap Adjustment API</h2>
<p>This API allows you to adjust the cap of any sim in your network. Ask Dave for more information.</p>
</div>
<div class="api-section">
<h2>Order API</h2>
<div class="api-endpoint">
<pre>POST /api/order.php HTTP/1.1</pre>
<pre>Host: supersim.co.za</pre>
<pre>Content-Type: application/json</pre>
</div>
<div class="api-request">
<p>JSON Body:</p>
<pre>
{
"username": "username",
"token": "token",
"msisdn": "msisdn",
"sim_card_number": "sim_card_number",
"order_number": "order_number",
"reference_1": "Emma Johnson",
"reference_2": "Hospital",
"suspend_behaviour": 1,
"package_id": 30000
}
</pre>
</div>
</div>
<div class="api-section">
<h2>Fetch Order Status API</h2>
<div class="api-endpoint">
<pre>POST /api/fetch_status.php HTTP/1.1</pre>
<pre>Host: supersim.co.za</pre>
</div>
<div class="api-request">
<p>JSON Body:</p>
<pre>
{
"username": "'username'",
"token": "token",
"msisdn": "0828165433"
}
</pre>
</div>
<div class="api-response">
<p>Returns:</p>
<pre>
{
"status": "Provisioned"
}
OR
{
"error": "Does not exist in API orders Queue."
}
</pre>
</div>
</div>
<div class="api-section">
<h2>Package Upgrade API</h2>
<div class="api-endpoint">
<pre>POST: https://supersim.co.za/api/upgrade_package.php</pre>
</div>
<div class="api-request">
<p>JSON Body:</p>
<pre>
{
"username": "username",
"token": "token",
"note": "note",
"msisdn": "msisdn",
"package_id": 50000
}
</pre>
</div>
</div>
<div class="api-section">
<h2>TopUp API</h2>
<div class="api-endpoint">
<pre>POST: https://supersim.co.za/api/external_topup.php</pre>
</div>
<div class="api-request">
<p>JSON Body:</p>
<pre>
{
"username": "username",
"token": "token",
"note": "note",
"matrix_user": "matrix_user",
"msisdn": "msisdn",
"topup_bundle_id": "topup_bundle_id"
}
</pre>
</div>
</div>
<div class="api-section">
<h2>Convert to Prepaid API</h2>
<div class="api-endpoint">
<pre>POST: https://supersim.co.za/api/convert_to_prepaid.php</pre>
</div>
<div class="api-request">
<p>JSON Body:</p>
<pre>
{
"username": "username",
"token": "token",
"msisdn": "msisdn",
"note": "note"
}
</pre>
</div>
</div>
<div class="api-section">
<h2>Update MSISDN References</h2>
<p>Updates the reference1 and reference2 fields of an MSISDN entry in the database.</p>
<p>Please note that the API user must be authorized to update the MSISDN.
The matrix_user associated with the API user must match the matrix_user associated with the owner of the MSISDN.</p>
<div class="api-endpoint">
<p>Endpoint: /api/update_msisdn_references.php</p>
<p>HTTP Method: POST</p>
</div>
<div class="api-request">
<p>Request Body:</p>
<pre>
{
"username": "apiuser1",
"token": "password123",
"msisdn": "27xxxxxxxxx",
"reference1": "REF123",
"reference2": "REF456"
}
</pre>
</div>
<div class="api-response">
<p>The API response will be a JSON object with the following properties:</p>
<p>If the update is successful:</p>
<pre>
{
"success": "A success message indicating that the MSISDN was updated successfully."
}
</pre>
<p>If there is an error:</p>
<pre>
{
"error": "An error message indicating the cause of the error."
}
</pre>
</div>
<div class="api-examples">
<p>Examples:</p>
<p>Console:</p>
<pre>
curl -X POST -H "Content-Type: application/json" -d '{
"username": "apiuser1",
"token": "password123",
"msisdn": "27xxxxxxxxx",
"reference1": "REF123",
"reference2": "REF456"
}' https://supersim.co.za/api/update_msisdn_references.php
</pre>
<p>Javascript:</p>
<pre>
const data = {
"username": "apiuser1",
"token": "password123",
"msisdn": "27xxxxxxxxx",
"reference1": "REF123",
"reference2": "REF456"
};
fetch('https://supersim.co.za/api/update_msisdn_references.php', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));
</pre>
</div>
</div>
</div>
</body>
</html>