> 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.

# Delivery Performance (OTIF)

GET https://testapi.nms.go.ug/api/v1/reports/delivery-performance

Returns **On-Time In-Full (OTIF)** delivery performance metrics, measuring whether deliveries were made on time and in the correct quantities, broken down by NMS distribution zone.

**Query Parameters:**
- `financialYear` — e.g., `2023/2024` (uses `{{financial_year}}` variable)
- `zone` — NMS distribution zone name, e.g., `ZONE 1`. Replace with the target zone as needed.

**Success Response (200 OK):** OTIF metrics per zone including:
- `onTimeDeliveries` — Count of deliveries made within the scheduled window
- `inFullDeliveries` — Count of deliveries where 100% of ordered items were supplied
- `otifRate` — Combined on-time and in-full percentage

**Notes:**
- Valid zone names should be confirmed against the NMS distribution zone registry.
- OTIF is a standard logistics KPI used in NMS performance reviews and MoH supply chain assessments.

Reference: https://apidocs.nms.go.ug/api-reference/reports/collection/reports-analytics/delivery-performance-otif

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /api/v1/reports/delivery-performance:
    get:
      operationId: delivery-performance-otif
      summary: Delivery Performance (OTIF)
      description: >-
        Returns **On-Time In-Full (OTIF)** delivery performance metrics,
        measuring whether deliveries were made on time and in the correct
        quantities, broken down by NMS distribution zone.


        **Query Parameters:**

        - `financialYear` — e.g., `2023/2024` (uses `{{financial_year}}`
        variable)

        - `zone` — NMS distribution zone name, e.g., `ZONE 1`. Replace with the
        target zone as needed.


        **Success Response (200 OK):** OTIF metrics per zone including:

        - `onTimeDeliveries` — Count of deliveries made within the scheduled
        window

        - `inFullDeliveries` — Count of deliveries where 100% of ordered items
        were supplied

        - `otifRate` — Combined on-time and in-full percentage


        **Notes:**

        - Valid zone names should be confirmed against the NMS distribution zone
        registry.

        - OTIF is a standard logistics KPI used in NMS performance reviews and
        MoH supply chain assessments.
      tags:
        - subpackage_reportsAnalytics
      parameters:
        - name: financialYear
          in: query
          required: false
          schema:
            type: string
        - name: zone
          in: query
          required: false
          schema:
            type: string
        - name: Authorization
          in: header
          description: Bearer authentication
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Reports & Analytics_Delivery Performance
                  (OTIF)_Response_200
servers:
  - url: https://testapi.nms.go.ug
  - url: http://localhost:8081
  - url: http://localhost:8083
components:
  schemas:
    Reports & Analytics_Delivery Performance (OTIF)_Response_200:
      type: object
      properties: {}
      description: Empty response body
      title: Reports & Analytics_Delivery Performance (OTIF)_Response_200
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

```

## SDK Code Examples

```python
import requests

url = "https://testapi.nms.go.ug/api/v1/reports/delivery-performance"

querystring = {"financialYear":"{{financial_year}}","zone":"ZONE 1"}

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://testapi.nms.go.ug/api/v1/reports/delivery-performance?financialYear=%7B%7Bfinancial_year%7D%7D&zone=ZONE+1';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://testapi.nms.go.ug/api/v1/reports/delivery-performance?financialYear=%7B%7Bfinancial_year%7D%7D&zone=ZONE+1"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://testapi.nms.go.ug/api/v1/reports/delivery-performance?financialYear=%7B%7Bfinancial_year%7D%7D&zone=ZONE+1")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://testapi.nms.go.ug/api/v1/reports/delivery-performance?financialYear=%7B%7Bfinancial_year%7D%7D&zone=ZONE+1")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://testapi.nms.go.ug/api/v1/reports/delivery-performance?financialYear=%7B%7Bfinancial_year%7D%7D&zone=ZONE+1', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://testapi.nms.go.ug/api/v1/reports/delivery-performance?financialYear=%7B%7Bfinancial_year%7D%7D&zone=ZONE+1");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://testapi.nms.go.ug/api/v1/reports/delivery-performance?financialYear=%7B%7Bfinancial_year%7D%7D&zone=ZONE+1")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```