Selligate Logistics API: Automate E-commerce Delivery and Cash-on-Delivery Fulfilment in Nigeria

Introduction: Simplify E-commerce Delivery with a Logistics API

Building an e-commerce website, marketplace, or online shopping application involves more than creating product pages and processing customer orders. You also need a reliable way to get purchased products to customers.

For businesses operating in Nigeria, this challenge becomes more complicated when customers prefer Cash-on-Delivery (COD) or Pay-on-Delivery (POD). Orders must be assigned to delivery agents, products must be available close to customers, deliveries must be tracked, and payments must be collected when orders arrive.

Traditionally, businesses have managed these processes manually or through multiple logistics providers. This creates additional development work, operational complexity, and difficulties tracking orders from checkout to final delivery.

Selligate’s Logistics API provides developers with a way to integrate e-commerce delivery and Pay-on-Delivery fulfilment directly into their websites, applications, and commerce platforms.

With the Selligate API, your application can submit customer orders, connect them to available delivery agents, retrieve order information, and receive automatic delivery status updates through webhooks.

Whether you are building an e-commerce platform, a marketplace, an online store, or a business management application, Selligate makes it easier to incorporate logistics and delivery fulfilment into your product.

What Is a Logistics API?

A Logistics API is an application programming interface that allows software applications to communicate with logistics and delivery systems.

Instead of manually entering orders into a delivery company’s dashboard, developers can integrate a logistics API into their applications to automate processes such as:

  • Creating and submitting delivery orders.
  • Retrieving product and inventory information.
  • Checking delivery coverage.
  • Assigning orders to delivery agents.
  • Tracking delivery progress.
  • Receiving delivery status notifications.
  • Managing order cancellations.

A logistics API is particularly useful for e-commerce businesses that want to automate their fulfilment operations without building an entire delivery network or logistics management system from scratch.

For developers building applications that support Cash-on-Delivery, a specialised logistics API can also help coordinate the physical delivery and payment collection process.

Introducing the Selligate E-commerce Delivery API

Selligate is a technology-enabled e-commerce fulfilment company providing delivery infrastructure for online merchants in Nigeria.

Our developer API allows businesses to connect their existing websites, applications, and online stores to the Selligate fulfilment network.

The integration is designed around a straightforward process:

  1. A customer places an order on your website or application and selects Pay-on-Delivery.
  2. Your application sends the order details to Selligate through the API.
  3. Selligate assigns the order to an agent with the required stock in the customer’s state.
  4. The delivery agent delivers the order and collects payment from the customer.
  5. Selligate sends a webhook notification to your application when the order status changes.

This means your development team can focus on building your core product while Selligate handles the delivery fulfilment process.

Key Features of the Selligate Logistics API

1. Automated Order Creation

You can create delivery orders directly from your e-commerce platform using the POST /orders endpoint.

Your application submits the customer’s information, delivery address, state, product codes, and quantities. Selligate processes the request and assigns the order to an available delivery agent when coverage and stock requirements are met.

2. Cash-on-Delivery and Pay-on-Delivery Support

The API is designed to support businesses operating Pay-on-Delivery and Cash-on-Delivery models.

Delivery agents collect the specified amount from customers when delivering their orders. Your application can retrieve the order’s amount_to_collect field to identify the amount expected at delivery.

This is particularly useful for online retailers and marketplaces serving customers who prefer paying when their products arrive.

3. Automatic Agent Assignment

You do not need to manually select a delivery agent for every order.

When an order is submitted, Selligate automatically assigns it to an agent with the required products in the customer’s state.

The API response also provides information about the assigned agent, including the agent’s name, state, and city.

If no agent in the customer’s state has all the required products, the API returns a 422 NO_COVERAGE error.

4. Real-Time Delivery Status Updates Through Webhooks

One of the most important features of an e-commerce delivery integration is knowing what happens after an order has been submitted.

Selligate uses webhooks to notify your application whenever an order changes status.

Supported events include:

  • order.assigned – The order has been assigned to a delivery agent.
  • order.out_for_delivery – The agent has taken the order out for delivery.
  • order.delivered – The order has been successfully delivered.
  • order.failed – The delivery attempt was unsuccessful.
  • order.cancelled – The order was cancelled.
  • order.returned – The goods have been returned.

Instead of repeatedly calling the API to check whether an order has been delivered, your application receives an automatic notification whenever a relevant status change occurs.

5. Product and Inventory Information

The API allows you to retrieve your registered products, product codes, and stock availability across different states.

Using the GET /products endpoint, your application can access product information and the number of units held by delivery agents in each state.

This helps developers build applications that can coordinate order fulfilment with distributed inventory.

6. Delivery Coverage Information

The GET /locations endpoint allows your application to retrieve supported states and information about where stock is available.

This is useful when building checkout experiences that need to consider delivery coverage before submitting an order.

7. Order Management

The Selligate API provides endpoints for retrieving and managing orders.

You can:

  • Retrieve a list of your orders using GET /orders.
  • Retrieve an individual order using GET /orders/{id}.
  • Cancel an order that has not left for delivery using POST /orders/{id}/cancel.

These capabilities allow your application to maintain better control over its fulfilment workflow.

How to Integrate the Selligate Logistics API

Selligate provides a REST API that uses JSON for requests and responses. Developers can integrate it into applications built with different programming languages and technology stacks.

Getting started involves the following steps.

Step 1: Create a Developer Account

Visit the Selligate developer documentation:

https://developers.selligate.com/docs/

Create an account in the Selligate sandbox environment and access the Developers section of your dashboard.

The sandbox environment allows you to test your integration before processing real customer orders.

Step 2: Generate Your API Secret Key

Navigate to the Secret Keys section of your developer dashboard and create a new API key.

Your test key starts with sk_test_, while your live API key starts with sk_live_.

Keep your secret key secure. It should be stored on your backend server as an environment variable and must never be exposed in browser-side JavaScript, mobile applications, or public code repositories.

Step 3: Configure Your Products

Before creating orders, add your products to your Selligate dashboard.

Every product is assigned a unique product_code, which you will use when submitting orders through the API.

The GET /products endpoint allows you to retrieve your registered products and their product codes.

Step 4: Submit Your First Delivery Order

Once your API key and product codes are ready, you can submit an order using the POST /orders endpoint.

Here is an example using JavaScript:

const response = await fetch(
  "https://sandbox-api.selligate.com/v1/orders",
  {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.SELLIGATE_SECRET_KEY}`,
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      external_id: "SHOP-1001",
      customer: {
        name: "Amaka Obi",
        phone: "08031234567",
        address: "12 Admiralty Way, Lekki Phase 1",
        state: "lagos"
      },
      items: [
        {
          product_code: "SG-SERUM-30",
          quantity: 2
        }
      ]
    })
  }
);

const result = await response.json();

console.log(result);

The external_id represents your own order reference. Selligate uses it to prevent duplicate orders when the same request is submitted again.

A successful response contains the Selligate order ID, order number, current status, amount to collect, and assigned agent information.

Step 5: Configure Webhooks

To receive automatic order status notifications, create a webhook endpoint on your backend server.

For example:

https://yourwebsite.com/selligate/webhook

Add this URL to the Webhooks section of your Selligate developer dashboard and save your webhook signing secret.

Selligate will send a signed HTTP POST request to your endpoint whenever an order changes status.

Your application should verify webhook signatures using HMAC-SHA256 before processing incoming events. It should also handle duplicate notifications safely using the unique Selligate-Event-Id.

Your webhook endpoint must respond with a successful HTTP 2xx status within 10 seconds.

Step 6: Test Your Integration and Go Live

Selligate provides separate test and live environments.

Sandbox API:

https://sandbox-api.selligate.com/v1

Live API:

https://api-developers.selligate.com/v1

Build and test your integration using your sandbox credentials. Once your implementation is ready, switch to your live API key and production base URL.

You can also simulate order status changes in the sandbox to test your webhook implementation before going live.

Selligate API Endpoints at a Glance

The Selligate API provides the following core endpoints:

HTTP MethodEndpointDescription
GET/meVerify your API key and business account
GET/productsRetrieve products and stock availability
GET/locationsRetrieve supported states and stock coverage
POST/ordersCreate a delivery order
GET/ordersRetrieve your orders
GET/orders/{id}Retrieve an individual order
POST/orders/{id}/cancelCancel an eligible order

All API requests use the /v1 version prefix.

For complete endpoint specifications, request parameters, response structures, and error codes, consult the Selligate API Reference.

Who Can Use the Selligate E-commerce Delivery API?

The Selligate API is designed for developers and businesses that want to incorporate delivery fulfilment into their existing software.

Here are some examples.

1. E-commerce Website Developers

If you build online stores for businesses, you can integrate the Selligate API to automate order dispatch and delivery fulfilment.

Instead of manually forwarding customer orders to logistics providers, your application can send them directly to Selligate after checkout.

2. Marketplace Developers

Developers building multi-vendor marketplaces can use the API to connect order processing with delivery fulfilment.

This provides an opportunity to incorporate Pay-on-Delivery fulfilment into marketplace operations.

3. SaaS E-commerce Platforms

If you operate an e-commerce SaaS platform that allows merchants to create online stores, integrating a logistics API can extend your platform’s capabilities.

You can provide merchants with access to delivery fulfilment without independently developing and managing an entire logistics infrastructure.

4. Mobile App Developers

Developers building shopping applications can connect their applications to Selligate to automate the delivery of customer orders.

Your backend can submit orders, retrieve delivery information, and receive webhook notifications without requiring customers to leave your application.

5. POS and Business Management Software Developers

Developers building inventory management, sales management, and business automation applications can integrate delivery fulfilment into their existing solutions.

This allows businesses to manage sales and delivery workflows within a connected software environment.

Why Use an API for Cash-on-Delivery Logistics?

Cash-on-Delivery remains an important fulfilment model for online businesses serving customers who prefer to pay when their orders arrive.

However, managing COD deliveries manually can create several operational challenges.

Manual order dispatch: Businesses often need to copy customer details and order information into separate logistics dashboards.

Poor delivery visibility: Without automated status updates, merchants may need to call delivery agents to find out whether orders have been delivered.

Payment collection coordination: Businesses need to know which orders require payment collection and whether the delivery was successful.

Inventory coordination: Products may be stored in different locations, making it difficult to determine which delivery agent can fulfil a particular order.

A Cash-on-Delivery API helps solve these integration challenges by connecting the e-commerce application directly to the fulfilment system.

With Selligate, developers can automate order submission, agent assignment, delivery status notifications, and the collection amount associated with each order.

This reduces manual coordination and makes it easier to build scalable e-commerce applications that support Pay-on-Delivery.

Selligate API vs. Building Your Own Delivery Infrastructure

Building your own logistics infrastructure requires more than developing an order management dashboard.

You may need to recruit delivery agents, establish warehouses, coordinate inventory across locations, manage delivery operations, and build systems for tracking orders and collecting payments.

For many software companies and e-commerce businesses, this is outside their core expertise.

Integrating Selligate allows you to connect your application to an existing fulfilment network rather than building every logistics component independently.

CapabilityBuilding Your Own InfrastructureIntegrating Selligate
Delivery agent networkBuild and manage independentlyAccess Selligate’s fulfilment network
Order dispatchDevelop your own systemSubmit orders through the API
Agent assignmentBuild assignment logicAutomatic agent assignment
Delivery notificationsDevelop tracking integrationsWebhook notifications
Inventory visibilityBuild your own inventory coordinationRetrieve product and stock information
Delivery managementManage internal operationsUse Selligate’s fulfilment infrastructure

This approach allows your development team to dedicate more resources to your core software product while relying on Selligate for delivery fulfilment.

Frequently Asked Questions About Selligate’s Logistics API

1. What is the Selligate Logistics API?

The Selligate Logistics API is a REST API that allows developers to integrate e-commerce order fulfilment and Pay-on-Delivery delivery services into their websites, applications, and online platforms.

It supports order creation, automatic agent assignment, product and stock information, order management, and webhook notifications.

2. Does Selligate provide a Cash-on-Delivery API?

Yes. Selligate supports Pay-on-Delivery fulfilment. Its API allows developers to submit orders for delivery, specify the amount to collect, and receive notifications when orders are delivered or their status changes.

3. Can I integrate Selligate into my existing e-commerce website?

Yes. You can integrate the API into your existing website or application. Your backend communicates with Selligate to submit orders and receive delivery updates.

4. Which programming languages does the Selligate API support?

The API uses standard REST principles and JSON, making it compatible with applications built using different programming languages.

The developer documentation provides implementation examples in JavaScript, PHP, Python, and cURL.

5. Does Selligate provide a test environment?

Yes. Developers can use the Selligate sandbox environment to test API requests, simulate order status changes, and verify webhook integrations before switching to the live environment.

6. How does Selligate notify my application when an order is delivered?

Selligate uses webhooks to send HTTP POST notifications to your configured endpoint whenever an order changes status.

For example, when an order is successfully delivered, your application receives an order.delivered event.

7. Can I track orders using the Selligate API?

Yes. You can retrieve individual orders using GET /orders/{id} and retrieve a list of your orders using GET /orders. You can also receive automatic updates through webhooks.

8. Does Selligate automatically assign delivery agents?

Yes. When an order is submitted, Selligate automatically assigns it to an agent with the required products in the customer’s state, subject to available stock and delivery coverage.

9. Can I use Selligate without building a complete API integration?

Yes. Selligate also provides an embeddable order form that you can add to your website using a simple JavaScript snippet. Customers can place orders through the form, and those orders are processed through the same fulfilment system as API orders.

10. Where can I find the complete Selligate API documentation?

You can access the complete developer documentation, including the Quick Start guide, API Reference, Webhooks, and Order Form integration instructions, at:

https://developers.selligate.com/docs/

Start Building with the Selligate Logistics API

If you are developing an e-commerce platform, marketplace, online store, or business application, integrating a reliable logistics API can simplify your delivery operations and improve your platform’s capabilities.

Selligate provides the technology and fulfilment infrastructure to help you connect customer orders with delivery agents, automate order processing, and receive delivery updates directly within your application.

You do not need to build and manage an entire delivery network before offering Pay-on-Delivery fulfilment to your customers.

Start integrating today.

Build your e-commerce application. Let Selligate handle the delivery fulfilment.