Developers

Give your clients an API of their own

Every GSM X Tool shop exposes a Dhru Fusion–compatible endpoint. Your resellers point their existing software at your domain and it works — no adapter to write on either side.

Compatible on purpose

The request and response shapes follow the Dhru Fusion convention the trade already runs on. A reseller who has been buying from someone else changes a URL and a key, and their tooling keeps working.

A key per client

You issue an API key from the admin panel and it belongs to one customer account. Their orders, prices and balance are theirs — the key cannot see anyone else's.

The endpoint

One URL takes every call. Which call it is comes from the action field, and every request carries the same four required fields.

POST https://your-domain.com/api/index.php
username       = the customer's account username
apiaccesskey   = the key you issued them
requestformat  = JSON
action         = accountinfo | imeiservicelist | placeimeiorder | getimeiorder

The four actions

accountinfo

Credit balance and currency for the account behind the key.

Returns: Balance, currency and the account name.

imeiservicelist

Every IMEI service the account can order, grouped as they are on your site.

Returns: Service id, name, price, delivery time and any custom fields the service asks for.

placeimeiorder

Submit an order against one service.

Returns: The order id to poll with.

getimeiorder

The current state of an order placed earlier.

Returns: Status, and the code or reply once the order completes.

Placing an order

placeimeiorder takes one extra field, parameters, holding a small XML document. ID is the service, QNT defaults to 1, and CUSTOMFIELD is base64-encoded JSON for services that ask for more than an IMEI.

parameters
<PARAMETERS>
  <IMEI>352099001761481</IMEI>
  <ID>42</ID>
  <QNT>1</QNT>
  <CUSTOMFIELD>eyJtb2RlbCI6IlNNLUE1MzUifQ==</CUSTOMFIELD>
</PARAMETERS>

When something is wrong

Failures come back in one shape, whatever caused them — a bad key, an unknown action, a service the account cannot order, or not enough credit to cover it.

Error response
{
  "ERROR": [
    { "MESSAGE": "Validation failed" }
  ]
}

The full reference lives in the knowledge base

This page is the shape of the thing. Field-by-field responses, every status value an order can hold and worked examples in PHP and cURL are in the docs that ship with your licence — and your resellers can read them without an account.