> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.awardtool.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.awardtool.com/_mcp/server.

# Program Accuracy Stats

POST https://apisv2.awardtoolapi.com/api/program_stats_api
Content-Type: application/json

## Overview

The **Program Accuracy Statistics API** provides program-level accuracy metrics for supported airline loyalty programs. This endpoint allows clients to retrieve the current accuracy score for a specific program, enabling transparency into data reliability and operational performance.

Accuracy metrics are calculated continuously based on internal validation and monitoring systems and are intended to help partners assess data quality for routing, analytics, and decision-making workflows.

---

## Authentication

All requests must include a valid `api_key`.

---

## Request

### Request Body

``` json
{
  "program": "AA",
  "api_key": "YOUR_API_KEY"
}

 ```

### Request Fields

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `program` | String | Yes | Airline loyalty program code (e.g., `AA`, `DL`, `UA`). |
| `api_key` | String | Yes | API key used to authenticate the request. |

---

## Response

### Successful Response

``` json
{
  "accuracy": "99.77614326830829",
  "machine": "APP_PLATFORM",
  "status": 200
}

 ```

### Response Fields

| Field | Type | Description |
| --- | --- | --- |
| `accuracy` | String | Accuracy percentage for the specified program. |
| `machine` | String | Source system or platform used to compute the metric. |
| `status` | Number | HTTP-like status code indicating request success. |

**Note:** Accuracy values are expressed as percentages and may change over time as new data is processed.

---

## Error Handling

| Status | Description |
| --- | --- |
| 400 | Invalid or missing request parameters |
| 401 | Invalid API key |
| 404 | Program not supported |
| 500 | Internal server error |

---

## Usage Notes

- Accuracy metrics are **program-specific** and should be interpreted independently.
    
- This endpoint is intended for **monitoring, analytics, and transparency**, not for real-time availability decisions.
    
- Accuracy values are informational and may vary as systems and airline sources change.
    

---

## Example Use Cases

- Display program reliability indicators in partner dashboards
    
- Filter or weight award search results based on program accuracy
    
- Monitor data quality trends over time

Reference: https://docs.awardtool.com/award-tool-api/real-time-award-flight-search/program-accuracy-stats

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /api/program_stats_api:
    post:
      operationId: Program Accuracy Stats
      summary: Program Accuracy Stats
      description: >-
        ## Overview


        The **Program Accuracy Statistics API** provides program-level accuracy
        metrics for supported airline loyalty programs. This endpoint allows
        clients to retrieve the current accuracy score for a specific program,
        enabling transparency into data reliability and operational performance.


        Accuracy metrics are calculated continuously based on internal
        validation and monitoring systems and are intended to help partners
        assess data quality for routing, analytics, and decision-making
        workflows.


        ---


        ## Authentication


        All requests must include a valid `api_key`.


        ---


        ## Request


        ### Request Body


        ``` json

        {
          "program": "AA",
          "api_key": "YOUR_API_KEY"
        }

         ```

        ### Request Fields


        | Field | Type | Required | Description |

        | --- | --- | --- | --- |

        | `program` | String | Yes | Airline loyalty program code (e.g., `AA`,
        `DL`, `UA`). |

        | `api_key` | String | Yes | API key used to authenticate the request. |


        ---


        ## Response


        ### Successful Response


        ``` json

        {
          "accuracy": "99.77614326830829",
          "machine": "APP_PLATFORM",
          "status": 200
        }

         ```

        ### Response Fields


        | Field | Type | Description |

        | --- | --- | --- |

        | `accuracy` | String | Accuracy percentage for the specified program. |

        | `machine` | String | Source system or platform used to compute the
        metric. |

        | `status` | Number | HTTP-like status code indicating request success.
        |


        **Note:** Accuracy values are expressed as percentages and may change
        over time as new data is processed.


        ---


        ## Error Handling


        | Status | Description |

        | --- | --- |

        | 400 | Invalid or missing request parameters |

        | 401 | Invalid API key |

        | 404 | Program not supported |

        | 500 | Internal server error |


        ---


        ## Usage Notes


        - Accuracy metrics are **program-specific** and should be interpreted
        independently.
            
        - This endpoint is intended for **monitoring, analytics, and
        transparency**, not for real-time availability decisions.
            
        - Accuracy values are informational and may vary as systems and airline
        sources change.
            

        ---


        ## Example Use Cases


        - Display program reliability indicators in partner dashboards
            
        - Filter or weight award search results based on program accuracy
            
        - Monitor data quality trends over time
      tags:
        - realTimeAwardFlightSearch
      parameters:
        - name: authority
          in: header
          required: false
          schema:
            type: string
        - name: sec-ch-ua
          in: header
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Successful response
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                program:
                  type: string
                api_key:
                  type: string
              required:
                - program
                - api_key
servers:
  - url: https://apisv2.awardtoolapi.com
    description: Default

```

## Examples

**Request**

```json
{
  "program": "AA",
  "api_key": "YOUR_API_KEY"
}
```

**SDK Code**

```python
import requests

url = "https://apisv2.awardtoolapi.com/api/program_stats_api"

payload = {
    "program": "AA",
    "api_key": "YOUR_API_KEY"
}
headers = {
    "authority": "flight.awardinsightapi.com",
    "sec-ch-ua": "\"Chromium\";v=\"116\", \"Not)A;Brand\";v=\"24\", \"Google Chrome\";v=\"116\"",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://apisv2.awardtoolapi.com/api/program_stats_api';
const options = {
  method: 'POST',
  headers: {
    authority: 'flight.awardinsightapi.com',
    'sec-ch-ua': '"Chromium";v="116", "Not)A;Brand";v="24", "Google Chrome";v="116"',
    'Content-Type': 'application/json'
  },
  body: '{"program":"AA","api_key":"YOUR_API_KEY"}'
};

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"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://apisv2.awardtoolapi.com/api/program_stats_api"

	payload := strings.NewReader("{\n  \"program\": \"AA\",\n  \"api_key\": \"YOUR_API_KEY\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("authority", "flight.awardinsightapi.com")
	req.Header.Add("sec-ch-ua", "\"Chromium\";v=\"116\", \"Not)A;Brand\";v=\"24\", \"Google Chrome\";v=\"116\"")
	req.Header.Add("Content-Type", "application/json")

	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://apisv2.awardtoolapi.com/api/program_stats_api")

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

request = Net::HTTP::Post.new(url)
request["authority"] = 'flight.awardinsightapi.com'
request["sec-ch-ua"] = '"Chromium";v="116", "Not)A;Brand";v="24", "Google Chrome";v="116"'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"program\": \"AA\",\n  \"api_key\": \"YOUR_API_KEY\"\n}"

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.post("https://apisv2.awardtoolapi.com/api/program_stats_api")
  .header("authority", "flight.awardinsightapi.com")
  .header("sec-ch-ua", "\"Chromium\";v=\"116\", \"Not)A;Brand\";v=\"24\", \"Google Chrome\";v=\"116\"")
  .header("Content-Type", "application/json")
  .body("{\n  \"program\": \"AA\",\n  \"api_key\": \"YOUR_API_KEY\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://apisv2.awardtoolapi.com/api/program_stats_api', [
  'body' => '{
  "program": "AA",
  "api_key": "YOUR_API_KEY"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'authority' => 'flight.awardinsightapi.com',
    'sec-ch-ua' => '"Chromium";v="116", "Not)A;Brand";v="24", "Google Chrome";v="116"',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://apisv2.awardtoolapi.com/api/program_stats_api");
var request = new RestRequest(Method.POST);
request.AddHeader("authority", "flight.awardinsightapi.com");
request.AddHeader("sec-ch-ua", "\"Chromium\";v=\"116\", \"Not)A;Brand\";v=\"24\", \"Google Chrome\";v=\"116\"");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"program\": \"AA\",\n  \"api_key\": \"YOUR_API_KEY\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "authority": "flight.awardinsightapi.com",
  "sec-ch-ua": "\"Chromium\";v=\"116\", \"Not)A;Brand\";v=\"24\", \"Google Chrome\";v=\"116\"",
  "Content-Type": "application/json"
]
let parameters = [
  "program": "AA",
  "api_key": "YOUR_API_KEY"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://apisv2.awardtoolapi.com/api/program_stats_api")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```