MagnusBilling.net · API

API ドキュメント

顧客 API とリセラー API のドキュメント

MagnusBilling.net · Client API

Client API Documentation

Manage your own SIP accounts, balance, vouchers, tariff plan, Caller ID, call history, refill history and account password through a clean JSON API.

Base URL https://magnusbilling.net/client-api/index.php
Authorization X-API-Key header
Response format JSON

Authorization

Every request must include your API key in the HTTP header.

X-API-Key: YOUR_API_KEY
Do not send the API key in the URL. Keep it private.

Account status

GET ?endpoint=me
curl -k -sS \
  -H "X-API-Key: YOUR_API_KEY" \
  "https://magnusbilling.net/client-api/index.php?endpoint=me"
{
  "success": true,
  "data": {
    "id": 1001,
    "username": "1234567801",
    "balance": "1.0000",
    "active": 1,
    "id_plan": 101,
    "plan_name": "STANDARD-PLAN"
  }
}

Balance

GET ?endpoint=balance
curl -k -sS \
  -H "X-API-Key: YOUR_API_KEY" \
  "https://magnusbilling.net/client-api/index.php?endpoint=balance"

Available plans

GET ?endpoint=plans

Returns only tariff plans available to your account.

curl -k -sS \
  -H "X-API-Key: YOUR_API_KEY" \
  "https://magnusbilling.net/client-api/index.php?endpoint=plans"
You can choose only from the plans returned by this endpoint.

Change plan

POST ?endpoint=change-plan

Change your tariff plan to one of the available plans.

curl -k -sS \
  -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"id_plan":8}' \
  "https://magnusbilling.net/client-api/index.php?endpoint=change-plan"
You cannot create, edit or delete tariff plans through this API.

SIP accounts

GET ?endpoint=sip

List your SIP accounts, including SIP login and SIP password.

curl -k -sS \
  -H "X-API-Key: YOUR_API_KEY" \
  "https://magnusbilling.net/client-api/index.php?endpoint=sip"

Create additional SIP account

POST ?endpoint=create-sip

Create an additional SIP account under your own account.

curl -k -sS \
  -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}' \
  "https://magnusbilling.net/client-api/index.php?endpoint=create-sip"

You can also provide your own SIP password:

{
  "password": "StrongSipPass123"
}
Limit: maximum 100 SIP accounts per client.

Change SIP password

POST ?endpoint=update-sip-password
curl -k -sS \
  -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"1234567802","password":"NewSipPass456"}' \
  "https://magnusbilling.net/client-api/index.php?endpoint=update-sip-password"
You can change only your own SIP accounts.

Delete SIP account

POST ?endpoint=delete-sip
curl -k -sS \
  -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"1234567802"}' \
  "https://magnusbilling.net/client-api/index.php?endpoint=delete-sip"
The main SIP account cannot be deleted. Only additional SIP accounts can be deleted.

IP Authentication

Manage IP-based SIP authentication for your own SIP accounts. Your regular SIP login/password continues working.

List IP authorizations

GET ?endpoint=ip-auth-list

List your SIP accounts and active/inactive IP-auth records.

curl -k -sS \
  -H "X-API-Key: YOUR_API_KEY" \
  "https://magnusbilling.net/client-api/index.php?endpoint=ip-auth-list"

Create IP authorization

POST ?endpoint=ip-auth-create

Add a public static PBX IP address to one of your SIP accounts.

curl -k -sS \
  -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"sip_login":"1234567801","ip":"203.0.113.10"}' \
  "https://magnusbilling.net/client-api/index.php?endpoint=ip-auth-create"
{
  "success": true,
  "message": "IP authentication created",
  "data": {
    "id": 6,
    "sip_login": "1234567801",
    "peer_name": "1234567801_ipa1",
    "ip": "203.0.113.10",
    "port": 5060,
    "status": 1
  }
}

Disable IP authorization

POST ?endpoint=ip-auth-disable

The IP-auth record stays in your account but becomes inactive. The SIP peer is removed from Asterisk.

curl -k -sS \
  -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"id":6}' \
  "https://magnusbilling.net/client-api/index.php?endpoint=ip-auth-disable"

Enable IP authorization

POST ?endpoint=ip-auth-enable

Re-enable a previously disabled IP-auth record.

curl -k -sS \
  -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"id":6}' \
  "https://magnusbilling.net/client-api/index.php?endpoint=ip-auth-enable"

Delete IP authorization

POST ?endpoint=ip-auth-delete

Delete the IP-auth record permanently.

curl -k -sS \
  -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"id":6}' \
  "https://magnusbilling.net/client-api/index.php?endpoint=ip-auth-delete"
IP authentication works only with a public static IPv4 address. Private or local IP addresses are rejected.
The same public IP cannot be active on two different client accounts at the same time.

Caller ID

GET ?endpoint=callerids
curl -k -sS \
  -H "X-API-Key: YOUR_API_KEY" \
  "https://magnusbilling.net/client-api/index.php?endpoint=callerids"

Add Caller ID

POST ?endpoint=add-callerid
curl -k -sS \
  -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"cid":"+1234567890","name":"Main Caller ID","set_active":true}' \
  "https://magnusbilling.net/client-api/index.php?endpoint=add-callerid"

Set existing Caller ID as active

POST ?endpoint=set-callerid
{
  "cid": "+1234567890"
}

Delete Caller ID

POST ?endpoint=delete-callerid
{
  "id": 80
}

Clear active SIP Caller ID

POST ?endpoint=clear-callerid
curl -k -sS \
  -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}' \
  "https://magnusbilling.net/client-api/index.php?endpoint=clear-callerid"

Call history

GET ?endpoint=calls&limit=50&offset=0
curl -k -sS \
  -H "X-API-Key: YOUR_API_KEY" \
  "https://magnusbilling.net/client-api/index.php?endpoint=calls&limit=50&offset=0"
Maximum limit per request: 200.

Refill history

GET ?endpoint=refills&limit=50&offset=0
curl -k -sS \
  -H "X-API-Key: YOUR_API_KEY" \
  "https://magnusbilling.net/client-api/index.php?endpoint=refills&limit=50&offset=0"

Redeem voucher

POST ?endpoint=redeem-voucher

Redeem an existing voucher code and add its value to your balance.

curl -k -sS \
  -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"voucher":"123456"}' \
  "https://magnusbilling.net/client-api/index.php?endpoint=redeem-voucher"
This API does not create vouchers. It only redeems vouchers that already exist.

Change account password

POST ?endpoint=change-password
curl -k -sS \
  -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"current_password":"OldPassword","new_password":"NewPassword987"}' \
  "https://magnusbilling.net/client-api/index.php?endpoint=change-password"
The old account password is never returned by the API. It can only be changed.

SMS API / CryptoSMS

同じ X-API-Key を使用して MagnusBilling アカウントから SMS を送信できます。料金はアカウント残高から差し引かれます。

ベース URL https://magnusbilling.net/sms-api/index.php
公開プロバイダー cryptosms / CryptoSMS

認証

Client API または Reseller API と同じ API キーを使用してください。

X-API-Key: YOUR_API_KEY
Sender ID / Caller ID について
Sender ID / Caller ID の表示は保証されません。表示される送信者はプロバイダー、宛先国、携帯通信事業者のルールに依存します。
SMS 料金は送信試行に対して課金されます。最終的な配信は宛先の携帯通信事業者に依存します。

エンドポイント

  • GET ?endpoint=providers — プロバイダー一覧
  • GET ?endpoint=rates — SMS 料金
  • GET ?endpoint=quota&provider=cryptosms — 送信可能 SMS 数の目安
  • POST ?endpoint=send — SMS 送信
  • POST ?endpoint=schedule — SMS予約送信
  • GET ?endpoint=scheduled&limit=20 — 予約SMS一覧
  • POST ?endpoint=cancel-scheduled — 予約SMSをキャンセル
  • POST ?endpoint=bulk — 一括SMSキャンペーン
  • GET ?endpoint=campaigns&limit=20 — 一括キャンペーン一覧
  • POST ?endpoint=cancel-campaign — 一括キャンペーンをキャンセル
  • GET ?endpoint=status&id=SMS_ID — SMS ステータス確認
  • GET ?endpoint=history&limit=20 — SMS 履歴

SMS 送信

POST ?endpoint=send
curl -k -sS \
  -X POST "https://magnusbilling.net/sms-api/index.php?endpoint=send" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "+447575396991",
    "provider": "cryptosms",
    "sender_id": "MyBrand",
    "message": "MyBrand: Your code is 123456"
  }'
{
  "success": true,
  "sms_id": 1,
  "provider": "cryptosms",
  "provider_name": "CryptoSMS",
  "status": "SENT_TO_PROVIDER",
  "balance_after": "49.6500",
  "sender_id": {
    "requested": "MyBrand",
    "guaranteed": false,
    "warning": "Sender ID / Caller ID is not guaranteed."
  }
}

SMS予約送信

POST ?endpoint=schedule
curl -k -sS \
  -X POST "https://magnusbilling.net/sms-api/index.php?endpoint=schedule" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "+1234567890",
    "provider": "cryptosms",
    "sender_id": "MyBrand",
    "message": "API scheduled test",
    "scheduled_at": "2026-05-09 23:00:00"
  }'
{
  "success": true,
  "scheduled_sms_id": 10,
  "provider": "cryptosms",
  "status": "SCHEDULED",
  "server_utc_offset": "+03:00"
}

予約SMSをキャンセル

POST ?endpoint=cancel-scheduled
curl -k -sS \
  -X POST "https://magnusbilling.net/sms-api/index.php?endpoint=cancel-scheduled" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"scheduled_sms_id":10}'

一括SMSキャンペーン

POST ?endpoint=bulk
curl -k -sS \
  -X POST "https://magnusbilling.net/sms-api/index.php?endpoint=bulk" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "cryptosms",
    "sender_id": "MyBrand",
    "message": "API bulk test",
    "scheduled_at": "2026-05-09 23:00:00",
    "phones": ["+1234567890", "+1234567891"]
  }'
{
  "success": true,
  "campaign_id": 20,
  "recipients_queued": 2,
  "status": "QUEUED"
}

一括キャンペーン一覧

GET ?endpoint=campaigns&limit=20
curl -k -sS \
  -H "X-API-Key: YOUR_API_KEY" \
  "https://magnusbilling.net/sms-api/index.php?endpoint=campaigns&limit=20"

一括キャンペーンをキャンセル

POST ?endpoint=cancel-campaign
curl -k -sS \
  -X POST "https://magnusbilling.net/sms-api/index.php?endpoint=cancel-campaign" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"campaign_id":20}'

SMS ステータス確認

GET ?endpoint=status&id=SMS_ID
curl -k -sS \
  -H "X-API-Key: YOUR_API_KEY" \
  "https://magnusbilling.net/sms-api/index.php?endpoint=status&id=1"

SMS 履歴

GET ?endpoint=history&limit=20
curl -k -sS \
  -H "X-API-Key: YOUR_API_KEY" \
  "https://magnusbilling.net/sms-api/index.php?endpoint=history&limit=20"

eSIM API / グローバルデータパッケージ

同じ X-API-Key を使用して MagnusBilling.net アカウントから eSIM データパッケージを販売できます。

Base URL https://magnusbilling.net/esim-api/index.php

Authorization

Use the same API key that is already used for Client API or Reseller API.

Endpoints

  • GET ?endpoint=packages&q=Europe&limit=20 — List packages and current prices
  • GET ?endpoint=coverage&package_code=PACKAGE_CODE — Package coverage by country and network
  • GET ?endpoint=balance — Account balance
  • POST ?endpoint=buy — Buy eSIM package
  • GET ?endpoint=orders — Order history, QR/activation data and usage
  • GET ?endpoint=sync-order&order_id=ORDER_ID — Refresh order, QR and data usage

List packages

curl -sS \
  -H "X-API-Key: YOUR_API_KEY" \
  "https://magnusbilling.net/esim-api/index.php?endpoint=packages&q=Europe&limit=5"

Buy eSIM

curl -sS -X POST "https://magnusbilling.net/esim-api/index.php?endpoint=buy" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{"package_code":"P2CYMUS93"}'

Orders and usage

curl -sS \
  -H "X-API-Key: YOUR_API_KEY" \
  "https://magnusbilling.net/esim-api/index.php?endpoint=orders"

Security rules

  • The client can access only their own account.
  • The client can access only their own SIP accounts.
  • The client can manage IP authentication only for their own SIP accounts.
  • The client can add, change and delete only their own Caller IDs.
  • The client can choose tariff plan only from the available plan list.
  • The client cannot create, edit or delete tariff plans.
  • The client can redeem only existing voucher codes.
  • The client cannot delete the main SIP account.
  • The client cannot manage other clients, resellers or admin data.
MagnusBilling.net · Reseller API

Reseller API Documentation

Create SIP clients, manage balances, view reseller plans, check client status, and control customers through a clean JSON API.

Base URL https://magnusbilling.net/reseller-api/index.php
Authorization X-API-Key header
Response format JSON

Authorization

Every request must include your API key in the HTTP header.

X-API-Key: YOUR_API_KEY
Do not send the API key in the URL. Keep it private.

Account status

GET ?endpoint=me
curl -k -sS \
  -H "X-API-Key: YOUR_API_KEY" \
  "https://magnusbilling.net/reseller-api/index.php?endpoint=me"
{
  "ok": true,
  "reseller": {
    "id": 1001,
    "username": "1234567890",
    "group": "Agent",
    "balance": 1,
    "active": true
  }
}

Plans

GET ?endpoint=plans
curl -k -sS \
  -H "X-API-Key: YOUR_API_KEY" \
  "https://magnusbilling.net/reseller-api/index.php?endpoint=plans"
{
  "ok": true,
  "plans": [
    {
      "id": 33,
      "name": "TEST-RESELLER-PLAN",
      "signup": true,
      "initial_credit": 0,
      "tariff_limit": 3,
      "agent_rates": 66875
    }
  ]
}

Create client

POST ?endpoint=create-client

Create a new SIP client under your reseller account.

curl -k -sS \
  -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"plan_id":101}' \
  "https://magnusbilling.net/reseller-api/index.php?endpoint=create-client"

You can also provide your own login and password:

{
  "login": "1234567891",
  "password": "StrongPass123",
  "plan_id": 101
}
SIP password is returned only once during client creation.
plan_id がない場合、API は既存のリセラー小売プランを使います。既定価格は基礎料金 +20% です。

Get client

GET ?endpoint=client&login=LOGIN
curl -k -sS \
  -H "X-API-Key: YOUR_API_KEY" \
  "https://magnusbilling.net/reseller-api/index.php?endpoint=client&login=1234567892"

Client list

GET ?endpoint=clients&limit=10&offset=0
curl -k -sS \
  -H "X-API-Key: YOUR_API_KEY" \
  "https://magnusbilling.net/reseller-api/index.php?endpoint=clients&limit=10&offset=0"

実際のリセラー課金モデル

transfer エンドポイントはリセラー自身の顧客に小売クレジットを付与します。リセラー残高は直ちには引き落とされません。

既定では、リセラー顧客料金は基本料金 +20% のマークアップで作成されます。リセラーは顧客のマークアップと小売価格を変更できます。

顧客が通話すると、顧客残高は小売料金で、リセラー残高は卸料金で課金されます。

リセラーの卸残高が不足または最小課金ブロックに足りない場合、顧客に小売クレジットが残っていても通話できません。

小売クレジット付与

POST ?endpoint=transfer

リセラー自身の顧客に小売クレジットを付与します。リセラーはすぐには課金されず、顧客が通話した時に卸残高が課金されます。

curl -k -sS \
  -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"login":"1234567892","amount":1,"external_id":"ORDER-DEMO-10001"}' \
  "https://magnusbilling.net/reseller-api/index.php?endpoint=transfer"
external_id は各小売クレジット付与ごとに一意である必要があります。

Transactions

GET ?endpoint=transactions
curl -k -sS \
  -H "X-API-Key: YOUR_API_KEY" \
  "https://magnusbilling.net/reseller-api/index.php?endpoint=transactions&limit=10&offset=0"

Filter only successful transactions:

https://magnusbilling.net/reseller-api/index.php?endpoint=transactions&status=success&limit=10&offset=0

Set client status

POST ?endpoint=set-client-status

Deactivate client:

curl -k -sS \
  -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"login":"1234567892","active":false}' \
  "https://magnusbilling.net/reseller-api/index.php?endpoint=set-client-status"

Activate client:

{
  "login": "1234567892",
  "active": true
}

Change client plan

POST ?endpoint=change-plan
curl -k -sS \
  -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"login":"1234567892","plan_id":101}' \
  "https://magnusbilling.net/reseller-api/index.php?endpoint=change-plan"

ホワイトラベル・エージェントポータル API

エージェントがホストする PHP ポータル用: 顧客ログイン、ダッシュボード、SIP、通話、支払い、料金、マークアップ、Web Phone トークン。

リセラーが自分のドメインに white-label ポータルを設置する場合に使用します。ポータルは reseller X-API-Key のみを使用し、中央 MagnusBilling DB に直接接続しません。
Base URL https://magnusbilling.net/reseller-api/index.php
Authorization X-API-Key: YOUR_RESELLER_API_KEY

顧客ポータル API

  • GET ?endpoint=portal-bootstrap — API/インストール確認
  • POST ?endpoint=client-auth — 顧客ログイン
  • GET ?endpoint=client-dashboard&login=CLIENT_LOGIN — 顧客ダッシュボードと表示残高
  • GET ?endpoint=client-sip&login=CLIENT_LOGIN — 顧客 SIP アカウント; サービスアカウントは既定で非表示
  • GET ?endpoint=client-calls&login=CLIENT_LOGIN&limit=50 — 成功通話
  • GET ?endpoint=client-failed-calls&login=CLIENT_LOGIN&limit=50 — 失敗通話
  • GET ?endpoint=client-refills&login=CLIENT_LOGIN&limit=50 — 顧客チャージ履歴
  • GET ?endpoint=client-callerids&login=CLIENT_LOGIN — 顧客 Caller ID
  • GET ?endpoint=client-rates&login=CLIENT_LOGIN&limit=100 — 顧客小売料金

支払い/チャージ

顧客支払いは Plisio、Heleket、custom でポータルが受け取り、確認後 register-agent-payment を呼びます。

curl -sS -X POST "https://magnusbilling.net/reseller-api/index.php?endpoint=register-agent-payment" \
  -H "X-API-Key: YOUR_RESELLER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "login": "CLIENT_LOGIN",
    "amount": "20.00",
    "currency": "EUR",
    "provider": "plisio",
    "external_id": "plisio_order_123",
    "provider_txid": "tx_or_invoice_id",
    "status": "paid"
  }'

料金マークアップ API

set-agent-markup は既存小売プランを使用します。既に同じマークアップなら料金行は書き換えません。

  • GET ?endpoint=agent-markup — 現在のマークアップと小売プラン
  • POST ?endpoint=preview-agent-markup — 新マークアップの価格プレビュー
  • POST ?endpoint=set-agent-markup — 小売プランに新マークアップを適用
curl -sS -X POST "https://magnusbilling.net/reseller-api/index.php?endpoint=set-agent-markup" \
  -H "X-API-Key: YOUR_RESELLER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"markup_percent":50}'

Janus Web Phone トークン

ポータルは Web Phone ボタンを表示します。_web1 などのサービス SIP は Janus 内部用で、通常 SIP リストには include_service=1 以外では表示しません。

curl -sS -X POST "https://magnusbilling.net/reseller-api/index.php?endpoint=client-softphone-token" \
  -H "X-API-Key: YOUR_RESELLER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"login":"CLIENT_LOGIN"}'
ホワイトラベル安全ルール: エンド顧客にリセラー残高、卸価格、マークアップ、内部信用依存、API key、中央 DB 情報を表示してはいけません。

リセラー SMS API / CryptoSMS

リセラーは同じ Reseller X-API-Key で自分の顧客の SMS を送信できます。client_login は必須です。

ベース URL https://magnusbilling.net/sms-api/index.php
認証 X-API-Key: YOUR_RESELLER_API_KEY
リセラー必須 client_login は自分の顧客ログインである必要があります。
リセラーは自分の顧客の SMS のみ管理できます。

利用可能なエンドポイント

  • POST ?endpoint=send — SMS 送信
  • POST ?endpoint=schedule — SMS 予約
  • GET ?endpoint=scheduled&client_login=CLIENT_LOGIN&limit=20 — 予約 SMS 一覧
  • POST ?endpoint=cancel-scheduled — 予約 SMS キャンセル
  • POST ?endpoint=bulk — 一括 SMS キャンペーン作成
  • GET ?endpoint=campaigns&client_login=CLIENT_LOGIN&limit=20 — キャンペーン一覧
  • POST ?endpoint=cancel-campaign — キャンペーン取消
  • GET ?endpoint=quota&provider=cryptosms&client_login=CLIENT_LOGIN — 顧客 SMS 見積り
  • GET ?endpoint=history&client_login=CLIENT_LOGIN&limit=20 — 顧客 SMS 履歴
  • GET ?endpoint=status&id=SMS_ID&client_login=CLIENT_LOGIN — 顧客 SMS ステータス

Example: send SMS for your client

curl -sS -X POST "https://magnusbilling.net/sms-api/index.php?endpoint=send" \
  -H "X-API-Key: YOUR_RESELLER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "client_login": "CLIENT_LOGIN",
    "phone": "+1234567890",
    "message": "Your SMS text",
    "provider": "cryptosms",
    "sender_id": "MyBrand"
  }'

Example: bulk SMS campaign

curl -sS -X POST "https://magnusbilling.net/sms-api/index.php?endpoint=bulk" \
  -H "X-API-Key: YOUR_RESELLER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "client_login": "CLIENT_LOGIN",
    "phones": ["+1234567890", "+1234567891"],
    "message": "Bulk SMS text",
    "provider": "cryptosms",
    "sender_id": "MyBrand",
    "scheduled_at": "2026-05-10 16:30:00"
  }'
Sender ID / Caller ID は保証されません。 SMS 料金は選択した顧客残高から差し引かれます。

リセラー eSIM API

リセラーは同じ reseller X-API-Key を使用して eSIM データパッケージを販売できます。eSIM 購入はリセラー残高から差し引かれます。

ベース URL https://magnusbilling.net/esim-api/index.php
認証 X-API-Key: YOUR_RESELLER_API_KEY

利用可能なエンドポイント

  • GET ?endpoint=packages&q=Europe&limit=20 — eSIM パッケージと現在のリセラー価格を表示
  • GET ?endpoint=coverage&package_code=PACKAGE_CODE — パッケージに含まれる国とネットワーク
  • GET ?endpoint=balance — リセラー残高を確認
  • POST ?endpoint=buy — eSIM パッケージ購入
  • GET ?endpoint=orders — リセラー eSIM 注文、アクティベーション情報、使用量
  • GET ?endpoint=sync-order&order_id=ORDER_ID — アクティベーション情報と残量を更新

eSIM パッケージ一覧

curl -sS \
  -H "X-API-Key: YOUR_RESELLER_API_KEY" \
  "https://magnusbilling.net/esim-api/index.php?endpoint=packages&q=Europe&limit=5"

eSIM パッケージ購入

curl -sS -X POST "https://magnusbilling.net/esim-api/index.php?endpoint=buy" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_RESELLER_API_KEY" \
  -d '{"package_code":"P2CYMUS93"}'

リセラー eSIM 注文と使用量

curl -sS \
  -H "X-API-Key: YOUR_RESELLER_API_KEY" \
  "https://magnusbilling.net/esim-api/index.php?endpoint=orders"

注文レスポンスには、パッケージ名、価格、ステータス、ICCID、アクティベーション情報、総容量、使用量、残量、有効期限が含まれます。使用量はネットワーク遅延で更新される場合があります。

Security rules

  • The reseller can access only clients created under their Agent account.
  • The reseller can use only their own plans.
  • The reseller cannot access admin clients or other resellers' clients.
  • リセラーは自身の顧客にのみ小売クレジットを付与できます。通話にはリセラーの利用可能な卸残高が必要です。
  • SIP passwords are returned only once during client creation.
  • Existing SIP passwords and secrets are not returned by client endpoints.
  • White-label portal clients must never see reseller balance, wholesale rates, markup percentage or internal reseller credit logic.
  • Service SIP accounts such as _webN and _ipaN are hidden from normal client SIP lists; Web Phone must use client-softphone-token.

エージェントポータル アカウント管理 API

ホワイトラベルのエージェントポータル向け追加エンドポイント:パスワードリセット、SIP パスワードリセット、クライアントプロフィール更新。

セキュリティルール: これらのメソッドは、リセラー自身のクライアントにのみ使用できます。既存のパスワードは返されません。リセットメソッドは新しい一時パスワードを生成し、信頼されたサーバー側ポータルに一度だけ返します。

エンドポイント

curl -sS -X POST "https://magnusbilling.net/reseller-api/index.php?endpoint=reset-client-password" \
  -H "X-API-Key: YOUR_RESELLER_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{"login":"6307210"}'
curl -sS -X POST "https://magnusbilling.net/reseller-api/index.php?endpoint=reset-client-sip-password" \
  -H "X-API-Key: YOUR_RESELLER_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{"login":"6307210"}'
curl -sS -X POST "https://magnusbilling.net/reseller-api/index.php?endpoint=client-profile-update" \
  -H "X-API-Key: YOUR_RESELLER_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{"login":"6307210","email":"client@example.com","phone":"+123456789","language":"en"}'

_webN や _ipaN などのサービスアカウントは SIP パスワードリセット対象外です。