API Reference

Welcome to the Green Server API. Our REST API allows you to integrate our powerful IMEI and digital service fulfillment logic directly into your own applications, marketplaces, or tools.

The API is currently in BETA. Endpoints and schemas are subject to change.

Authentication

Generate your keys in the Dashboard > Settings and use them in headers.

x-api-key: YOUR_API_KEYx-api-secret: YOUR_API_SECRET

Endpoints

GET/api/v1/balance

Returns current account balance

curl -X GET "https://server.greentechsolution.com.br/api/v1/balance" \ -H "X-API-Key: YOUR_API_KEY" \ -H "X-API-Secret: YOUR_API_SECRET"

Response

{ "success": true, "balance": 1500.00, "currency": "USD" }
GET/api/v1/services

Lists all available services with pricing based on your account tier

curl -X GET "https://server.greentechsolution.com.br/api/v1/services" \ -H "X-API-Key: YOUR_API_KEY" \ -H "X-API-Secret: YOUR_API_SECRET"

Response

{ "success": true, "services": [ { "id": "clx123456", "name": "iPhone Unlock Service", "price": 25.00, "category": "iPhone", "responseTime": "1-24 hours" } ] }
POST/api/v1/orders

Creates a new order for service fulfillment

Body ParameterRequiredDescription
programIdYESThe ID of the service from /services endpoint
inputDataYESSerial, IMEI, or device identifier
curl -X POST "https://server.greentechsolution.com.br/api/v1/orders" \ -H "X-API-Key: YOUR_API_KEY" \ -H "X-API-Secret: YOUR_API_SECRET" \ -H "Content-Type: application/json" \ -d '{ "programId": "clx123456", "inputData": "123456789012345" }'

Response

{ "success": true, "order": { "id": 1234, "status": "PENDING", "programId": "clx123456", "amount": 25.00, "createdAt": "2025-12-25T10:30:00Z" } }
GET/api/v1/orders/:orderId

Checks the status and results of an order

curl -X GET "https://server.greentechsolution.com.br/api/v1/orders/1234" \ -H "X-API-Key: YOUR_API_KEY" \ -H "X-API-Secret: YOUR_API_SECRET"

Response

{ "success": true, "order": { "id": 1234, "status": "COMPLETED", "resultData": "Unlock code: ABC123XYZ", "createdAt": "2025-12-25T10:30:00Z", "completedAt": "2025-12-25T12:15:00Z" } }

Webhooks

Configure a webhook URL in your Settings to receive real-time updates when an order status changes.

Webhook Payload Example

{ "event": "order.completed", "timestamp": "2025-12-25T12:15:00Z", "userId": "user_123", "data": { "orderId": 1234, "status": "COMPLETED", "resultData": "Unlock code: ABC123XYZ" } }

HMAC Signature Verification

Each webhook includes an X-Webhook-Signature header with HMAC-SHA256 signature for authenticity verification:

const crypto = require('crypto'); function verifyWebhook(payload, signature, secret) { const hmac = crypto.createHmac('sha256', secret); hmac.update(JSON.stringify(payload)); const expectedSignature = 'sha256=' + hmac.digest('hex'); return crypto.timingSafeEqual( Buffer.from(signature), Buffer.from(expectedSignature) ); } // In your webhook endpoint app.post('/webhooks/orders', (req, res) => { const signature = req.headers['x-webhook-signature']; const payload = req.body; if (verifyWebhook(payload, signature, 'YOUR_API_SECRET')) { // Webhook is authentic console.log('Order updated:', payload.data); res.status(200).send('OK'); } else { res.status(401).send('Invalid signature'); } });

Rate Limits

To ensure quality of service for all users, we apply the following limits:

  • General requests: 100/minute
  • Order creation: 30/minute

When the limit is exceeded, you will receive a 429 Too Many Requests response