> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://apidocs.nms.go.ug/llms.txt.
> For full documentation content, see https://apidocs.nms.go.ug/llms-full.txt.

# Introduction

> Overview of the NMS API Platform for managing Uganda's medical supply chain.

# NMS API Platform

The **NMS API Platform** provides a comprehensive set of endpoints for managing the end-to-end medical supply chain for **National Medical Stores (NMS)** in Uganda — from order creation and procurement planning through delivery tracking, patient statistics, and analytics reporting.

## Base URL

| Environment | URL                         |
| ----------- | --------------------------- |
| API Gateway | `https://testapi.nms.go.ug` |

All requests should be routed through the API Gateway unless you are performing direct health checks on individual microservices.

## API Modules

The API is organized into the following functional modules:

| Module                   | Description                                                |
| ------------------------ | ---------------------------------------------------------- |
| **Authentication**       | Login and user profile management                          |
| **Program Orders**       | Create, review, approve, and track standard program orders |
| **EMHS Orders**          | Essential Medicines and Health Supplies orders             |
| **Procurement Plans**    | Facility procurement plan management                       |
| **Vaccine Orders**       | Vaccine order tracking (UNEPI)                             |
| **Special Orders**       | Emergency and ad-hoc requisitions                          |
| **Supplementary Orders** | Top-up orders between cycles                               |
| **Master Data**          | Facilities, products, and order cycles                     |
| **Deliveries**           | Delivery trip tracking and history                         |
| **Patient Statistics**   | HIV testing and ARV regimen data                           |
| **Reports & Analytics**  | Fill rates, delivery performance, stock levels             |
| **Health Checks**        | Service health monitoring                                  |

## Key Concepts

<AccordionGroup>
  <Accordion title="Financial Year & Cycle">
    All orders, deliveries, and statistics are scoped by a **financial year** (e.g., `2023/2024`) and a **cycle** number (e.g., `1`). These are the primary filters across all endpoints.
  </Accordion>

  <Accordion title="Facility Code">
    Each health facility in Uganda has a unique **facility code** (e.g., `HF0124` for BUBULO HCIV) assigned by the NMS. This code is used to scope all facility-level operations.
  </Accordion>

  <Accordion title="Template Code">
    Program orders are identified by a **template code** that encodes the facility, financial year, cycle, and order type (e.g., `HF0124-2023/24Cycle1-LAB`). This is the primary identifier for order lifecycle operations.
  </Accordion>
</AccordionGroup>

## Authentication

This API uses **JWT Bearer Token** authentication. See the [Authentication Guide](/guides/authentication) for details.

## Next Steps

<Cards>
  <Card title="Getting Started" href="/guides/getting-started">
    Set up your environment and make your first API call.
  </Card>

  <Card title="Authentication" href="/guides/authentication">
    Learn how to authenticate and manage JWT tokens.
  </Card>

  <Card title="Order Lifecycle" href="/guides/order-lifecycle">
    Understand the full program order workflow.
  </Card>

  <Card title="API Reference" href="/api-reference/overview">
    Explore all available endpoints.
  </Card>
</Cards>