digiMalldigiMall Vendor
digiMalldigiMall Vendor

Special Offer

Zero commission on your first 10 sales when you join today

Start SellingSign In
Technical Support Help

API Integration & Developer Resources Guide

Comprehensive guide for developers integrating with digiMall APIs, webhooks, and third-party services for advanced vendor functionality

Back to Technical Support
18 min read
Updated January 14, 2025

Developer-Friendly Platform Integration

digiMall provides robust APIs and developer tools that enable 90% faster integration compared to traditional e-commerce platforms, with comprehensive documentation and support.

API Overview & Authentication

digiMall provides RESTful APIs that allow vendors to integrate their existing systems, automate workflows, and build custom applications on top of the platform.

Authentication

  • • OAuth 2.0 with PKCE flow
  • • API key authentication
  • • JWT token-based sessions
  • • Scoped permissions system
  • • Rate limiting and throttling

API Endpoints

  • • Product management APIs
  • • Order and inventory APIs
  • • Customer and analytics APIs
  • • Payment and wallet APIs
  • • Notification and messaging APIs

Data Formats

  • • JSON request/response format
  • • GraphQL query support
  • • RESTful resource structure
  • • Standardized error responses
  • • Pagination and filtering

Getting Started with API Integration

Follow this step-by-step guide to set up your first API integration and authenticate your application with digiMall's systems.

Step 1: API Credentials Setup

Creating API Keys
  1. Navigate to Developer Settings in your vendor dashboard
  2. Click "Create New API Application"
  3. Provide application name and description
  4. Select required scopes and permissions
  5. Generate and securely store API credentials
Environment Configuration

BASE_URL=https://api.digimall.ng/v1

API_KEY=your_api_key_here

API_SECRET=your_api_secret_here

WEBHOOK_SECRET=your_webhook_secret

Step 2: Authentication Implementation

Implement OAuth 2.0 flow or API key authentication depending on your integration requirements.

OAuth 2.0 Flow Example (Node.js):
const axios = require('axios');

// Step 1: Get authorization code
const authUrl = 'https://api.digimall.ng/oauth/authorize' +
  '?client_id=your_client_id' +
  '&response_type=code' +
  '&scope=products.read orders.write' +
  '&redirect_uri=https://yourapp.com/callback';

// Step 2: Exchange code for access token
const tokenResponse = await axios.post(
  'https://api.digimall.ng/oauth/token',
  {
    grant_type: 'authorization_code',
    client_id: 'your_client_id',
    client_secret: 'your_client_secret',
    code: 'authorization_code',
    redirect_uri: 'https://yourapp.com/callback'
  }
);

const accessToken = tokenResponse.data.access_token;

Core API Endpoints & Usage

Explore the most commonly used API endpoints for product management, order processing, and business operations.

Product Management APIs

CRUD Operations
GET /productsList products
POST /productsCreate product
PUT /products/:idUpdate product
DELETE /products/:idDelete product
Advanced Operations
POST /products/bulkBulk upload
PUT /products/inventoryUpdate inventory
GET /products/analyticsProduct metrics

Order Management APIs

Manage orders, process fulfillment, and track shipping status through automated workflows.

Example: Update Order Status
// Update order status to 'shipped'
const response = await fetch(
  'https://api.digimall.ng/v1/orders/ORD-12345/status',
  {
    method: 'PUT',
    headers: {
      'Authorization': 'Bearer ' + accessToken,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      status: 'shipped',
      tracking_number: 'TRK-789012',
      carrier: 'DHL',
      estimated_delivery: '2025-01-20',
      notes: 'Package dispatched from Lagos warehouse'
    })
  }
);

const result = await response.json();
console.log('Order updated:', result);

Webhook Integration & Event Handling

Set up webhooks to receive real-time notifications about important events in your vendor account, enabling automated responses and workflows.

Webhook Configuration

Setup Process
  1. Create webhook endpoint in your application
  2. Implement signature verification
  3. Configure webhook URL in digiMall dashboard
  4. Select events to subscribe to
  5. Test webhook delivery and handling
Available Events
  • order.created - New order received
  • order.updated - Order status changed
  • payment.completed - Payment processed
  • product.updated - Product modified
  • inventory.low - Stock running low

Webhook Security & Verification

Implement proper webhook verification to ensure events are genuinely from digiMall and haven't been tampered with.

Signature Verification (Express.js):
const crypto = require('crypto');
const express = require('express');
const app = express();

// Middleware to verify webhook signature
const verifyWebhook = (req, res, next) => {
  const signature = req.headers['x-digimall-signature'];
  const payload = JSON.stringify(req.body);
  const secret = process.env.WEBHOOK_SECRET;
  
  const expectedSignature = crypto
    .createHmac('sha256', secret)
    .update(payload)
    .digest('hex');
  
  if (signature !== 'sha256=' + expectedSignature) {
    return res.status(401).send('Invalid signature');
  }
  
  next();
};

// Webhook endpoint
app.post('/webhooks/digimall', 
  express.json(),
  verifyWebhook,
  (req, res) => {
    const { event, data } = req.body;
    
    switch (event) {
      case 'order.created':
        handleNewOrder(data);
        break;
      case 'payment.completed':
        processPayment(data);
        break;
      // Handle other events...
    }
    
    res.status(200).send('OK');
  }
);

Third-Party Service Integrations

Connect digiMall with popular business tools and services to create powerful automated workflows and extend platform functionality.

Accounting & ERP Systems

QuickBooks integration for automated bookkeeping
SAP Business One connector
Xero accounting synchronization
Custom ERP system APIs

Logistics & Fulfillment

DHL shipping API integration
FedEx tracking and labels
Local delivery service APIs
Warehouse management systems

API Testing & Debugging Tools

Use built-in testing tools and debugging features to develop and troubleshoot your API integrations effectively.

API Testing Console

Interactive Testing
  • • Built-in API explorer in vendor dashboard
  • • Real-time request/response testing
  • • Authentication token management
  • • Request parameter validation
  • • Response format verification
Development Tools
  • • Postman collection downloads
  • • OpenAPI/Swagger documentation
  • • Code generation for multiple languages
  • • SDK libraries for popular frameworks
  • • Sandbox environment for testing

Monitoring & Debugging

Monitor API usage, track errors, and debug integration issues with comprehensive logging and analytics.

Request Logs

Detailed API call history and responses

Error Tracking

Real-time error notifications and analysis

Performance Metrics

API response times and usage analytics

Rate Limits & Best Practices

Understand API rate limits and implement best practices for reliable, efficient integrations that scale with your business growth.

Rate Limit Guidelines

Standard API calls1000/hour
Bulk operations100/hour
Webhook deliveries5000/hour
Analytics queries200/hour

Optimization Strategies

Implement exponential backoff for retries
Cache frequently accessed data locally
Batch multiple operations together
Monitor rate limit headers in responses

API Integration Success Tips

  • • Always use HTTPS for secure communication
  • • Implement proper error handling and logging
  • • Use webhook endpoints for real-time updates
  • • Test integrations thoroughly in sandbox environment
  • • Keep API credentials secure and rotate regularly
  • • Follow RESTful principles and HTTP status codes
  • • Implement idempotency for critical operations
  • • Monitor API performance and optimize accordingly
  • • Stay updated with API version changes and deprecations
  • • Use official SDKs and libraries when available
Was this article helpful?

Related Articles

API Integration & Developer Resources Guide - Vendor Help | digiMall