A
ADSTEMA/API Docs
OverviewCreate OrderCheck StatusOrder StatusesWebhooksCode Examples
v1.0
API Reference

Network Orders API

Partner integration for landing page orders (creams, teas, drops, and more). Send orders from your landing pages directly to ADSTEMA CRM.

Base URL
https://api.adstema.com/api/v1
Authentication
X-Network-Key Header
Version
v1.0 โ€ข REST / JSON
๐Ÿ”‘ Authentication

Every request must include your partner key in the header:

http
X-Network-Key: nk_your_partner_key_here

Contact [email protected] to get your partner key.

Endpoints
POST/network-orders/create

Submit new order from partner landing page

Headers

http
X-Network-Key: nk_your_partner_key_here
Content-Type: application/json

Request Body

json
{
  "externalId": "order-ext-123456",
  "customerEmail": "[email protected]",
  "customerPhone": "+381600000001",
  "customerName": "John Doe",
  "items": [
    {
      "sku": "KREMA-001",
      "name": "Anti-Aging Cream",
      "quantity": 2,
      "price": 2500
    }
  ],
  "totalAmount": 5000,
  "currency": "RSD",
  "notes": "Optional delivery instructions",
  "webhookUrl": "https://your-domain.com/webhooks/orders"
}

Response โ€” 201 Created

json
{
  "success": true,
  "message": "Order received. Waiting for CRM confirmation.",
  "data": {
    "id": "cmnt8b3xk0001ngjq7f5n2b3k",
    "externalId": "order-ext-123456",
    "status": "PENDING",
    "customerEmail": "[email protected]",
    "totalAmount": 5000,
    "currency": "RSD",
    "createdAt": "2026-04-15T14:30:00Z"
  }
}
GET/network-orders/:externalId

Check order status by external ID

Headers

http
X-Network-Key: nk_your_partner_key_here

Response โ€” 200 OK

json
{
  "success": true,
  "data": {
    "id": "cmnt8b3xk0001ngjq7f5n2b3k",
    "externalId": "order-ext-123456",
    "status": "CONFIRMED",
    "customerEmail": "[email protected]",
    "totalAmount": 5000,
    "currency": "RSD",
    "createdAt": "2026-04-15T14:30:00Z",
    "confirmedAt": "2026-04-15T14:35:00Z"
  }
}

Order Statuses

PENDINGOrder submitted, waiting for call center confirmation
CONFIRMEDCall center confirmed the order with customer
REJECTEDOrder rejected by call center
COMPLETEDOrder processing completed
FAILEDProcessing error occurred

Webhooks

When an order status changes, we send a POST request to your webhookUrl:

json
{
  "externalId": "order-ext-123456",
  "status": "CONFIRMED",
  "orderNumber": "ORD-002891",
  "timestamp": "2026-04-15T14:35:00Z",
  "message": "Order confirmed by call center"
}

JavaScript Integration

Complete example for submitting orders from your landing page:

javascript
// Submit order from landing page form
async function submitOrder(formData) {
  const response = await fetch(
    'https://api.adstema.com/api/v1/network-orders/create',
    {
      method: 'POST',
      headers: {
        'X-Network-Key': 'nk_your_partner_key',
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        externalId: `order-${Date.now()}`,
        customerEmail: formData.email,
        customerPhone: formData.phone,
        customerName: formData.name,
        items: formData.cartItems,
        totalAmount: formData.total,
        currency: 'RSD',
        webhookUrl: 'https://your-domain.com/webhooks/orders',
      }),
    }
  );

  const data = await response.json();

  if (data.success) {
    console.log('Order submitted:', data.data.id);
    return data.data;
  } else {
    throw new Error(data.message);
  }
}

// Handle incoming webhooks from ADSTEMA
app.post('/webhooks/orders', (req, res) => {
  const { externalId, status, orderNumber } = req.body;

  if (status === 'CONFIRMED') {
    // Mark sale as confirmed in your system
    markOrderAsConfirmed(externalId, orderNumber);
  } else if (status === 'REJECTED') {
    // Handle rejection
    notifyCustomer(externalId);
  }

  res.json({ received: true });
});
Need Help?

Our team is ready to help you integrate

๐Ÿ“ง [email protected]
API Version 1.0 ยท Updated April 15, 2026 ยท ADSTEMA CRM