Files
sf-sim/docs/sim-api-documentation.html

25 lines
13 KiB
HTML
Raw Permalink Normal View History

2026-03-11 11:35:16 +01:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>sim-api - API Documentation</title>
<style>
body { margin: 0; padding: 0; }
#opencollection-container { width: 100vw; height: 100vh; }
</style>
<link rel="stylesheet" href="https://cdn.opencollection.com/docs.css">
<script src="https://cdn.opencollection.com/docs.js"></script>
</head>
<body>
<div id="opencollection-container"></div>
<script>
2026-04-29 17:08:30 +02:00
const collectionData = "opencollection: 1.0.0\ninfo:\n name: sim-api\nconfig:\n environments:\n - name: local\n color: '#2E8A54'\n variables:\n - name: baseurl\n value: http://localhost:3000\n - name: prod\n color: '#CE4F3B'\n variables:\n - name: baseurl\n value: https://sf-sims.savefamilygps.net\n - name: simconnections\n color: '#C77A0F'\n variables:\n - name: baseurl\n value: http://sim-connections.savefamilygps.net\nitems:\n - info:\n name: ReActivate\n type: http\n seq: 11\n http:\n method: POST\n url: '{{baseurl}}/sim/reActivate'\n body:\n type: form-urlencoded\n data:\n - name: iccid\n value: '8935103196306448300'\n - name: offer\n value: SAVEFAMILY1\n disabled: true\n auth: inherit\n settings:\n encodeUrl: true\n timeout: 0\n followRedirects: true\n maxRedirects: 5\n - info:\n name: Test Order\n type: http\n seq: 9\n http:\n method: POST\n url: '{{baseurl}}/sim/test'\n body:\n type: form-urlencoded\n data:\n - name: iccid\n value: '8933201125065160999'\n - name: offer\n value: SAVEFAMILY1\n auth: inherit\n settings:\n encodeUrl: true\n timeout: 0\n followRedirects: true\n maxRedirects: 5\n - info:\n name: test proxy\n type: http\n seq: 12\n http:\n method: GET\n url: '{{baseurl}}/simconnections/alai/select?iccid=1111111111111111111'\n params:\n - name: iccid\n value: '1111111111111111111'\n type: query\n auth: inherit\n settings:\n encodeUrl: true\n timeout: 0\n followRedirects: true\n maxRedirects: 5\n - info:\n name: Docs\n type: http\n seq: 10\n http:\n method: GET\n url: '{{baseurl}}/docs/sim-api-documentation.html'\n auth: inherit\n settings:\n encodeUrl: true\n timeout: 0\n followRedirects: true\n maxRedirects: 5\n - info:\n name: Cancel\n type: http\n seq: 3\n http:\n method: POST\n url: '{{baseurl}}/sim/cancel'\n body:\n type: form-urlencoded\n data:\n - name: iccid\n value: '8933201125068889894'\n auth: inherit\n settings:\n encodeUrl: true\n timeout: 0\n followRedirects: true\n maxRedirects: 5\n docs: |-\n El endpoint recibe como body\n ```\n {\n iccid: string,\n update_webhook?: string\n }\n ```\n\n `update_webhook` est\xE1 en desarrollo, pero ser\xE1 donde se mande la actualizacion de la cancelaci\xF3n cuando haya una respuesta de la API externa.\n\n Si la llamada tiene exito devuelve:\n ``` json\n {\n data: {\n iccid: string,\n message_id: string,\n operation: \"cancelation\"\n }\n }\n\n ```\n message_id se usar\xE1 para la llamada /orders/message_id/}{message_id} \n\n Si la llamada falla devolvera:\n ```json\n {\n errors: {\n msg: string\n ... (campos extra de gestion del error)\n }\n }\n ```\n - info:\n name: Pause\n type: http\n seq: 4\n http:\n method: POST\n url: '{{baseurl}}/sim/pause'\n params:\n - name: iccid\n value: ''\n type: query\n disabled: true\n body:\n type: form-urlencoded\n data:\n - name: iccid\n value: '8935103196306448300'\n auth: inherit\n settings:\n encodeUrl: true\n timeout: 0\n followRedirects: true\n maxRedirects: 5\n - info:\n name: Activation Email Health\n type: http\n seq: 8\n http:\n method: POST\n url: https://sf-sim-activation.savefamily.net/health\n auth: inherit\n settings:\n encodeUrl: true\n timeout: 0\n followRedirects: true\n max
2026-03-11 11:35:16 +01:00
new window.OpenCollection({
target: document.getElementById('opencollection-container'),
opencollection: collectionData,
theme: 'light'
});
</script>
</body>
</html>