External API Integrations

Configured External APIs

1. Agent Management System

Purpose: Manage agent locations and configurations

Configuration:

2. User State Management

Purpose: Track user session and state

Configuration:

3. User OnDelivery System

Purpose: User profile management

Configuration:

4. Sunshine Location Service

Purpose: Location and area data

Configuration:

5. APISAT

Purpose: Satellite tracking (purpose unclear from code)

Configuration:

6. EatSOK

Purpose: Food delivery partner integration

Configuration:

7. Xendit Payment Gateway

Purpose: Payment processing and payouts

Features:

Models:

8. Blibli Marketplace

Purpose: E-commerce integration

Configuration:

9. OnMarket Platform

Purpose: Marketplace platform integration

Configuration:

API Utility Modules

Location: app/config/api.js

Purpose: Centralized API endpoint configuration

Usage:

const api = require('./config/api');

// Make external API call
const response = await axios.get(api.AGENT_SYSTEM + '/agents');

Webhook Handling

Incoming Webhooks:

  1. Courier Partner Webhooks

    • Endpoint: /api/3p/{partner}/webhook
    • Authentication: Basic Auth or API Key
    • Purpose: Status updates from couriers
  2. Marketplace Webhooks

    • Endpoint: /api/marketplace/webhook
    • Authentication: Webhook signature
    • Purpose: New order notifications

Outgoing Webhooks:

Utility: app/utility/web-hook.js

Purpose: Notify external systems of status changes

Configuration:

Example:

// Trigger webhook on status change
await triggerWebhook({
  awb: "ONX1234567890",
  status: "DELIVERED",
  timestamp: new Date(),
  location: "Jakarta"
});

Revision #1
Created 24 February 2026 06:56:00 by ondeliveloper
Updated 24 February 2026 06:57:19 by ondeliveloper