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

# Record Natural Immunity

POST https://api.rebateright.com.au/AIR/v1/individual/natural-immunity/record
Content-Type: application/json

Record a natural immunity for an individual — a disease they've contracted and are now immune to. Assessed only by a general practitioner, paediatrician, public health physician, infectious diseases physician, or clinical immunologist.

Requires an `individualIdentifier` from a prior [Identify Individual](/api-reference/air/individual-details/identify-individual) call. The information provider must be authorised for `NATIMM` (check via [Authorisation](/api-reference/air/authorisation/authorisation)) — unauthorised providers return `AIR-E-1063`.

For shared response patterns and the full status-code list, see [AIR Integration](/air).

#### Eligible diseases

Per the AIR spec, natural immunity can be recorded for: `HEP` (Hepatitis), `MEA` (Measles), `MUM` (Mumps), `QAX` (Q fever), `RUB` (Rubella), `VAR` (Varicella).

#### Date format

Date fields use **DDMMYYYY** with no separators.

#### Status Codes

| Code | Meaning |
|---|---|
| `AIR-I-1100` | Immunity recorded. |
| `AIR-E-1005` | Validation errors. Common: `AIR-E-1063` provider not authorised, `AIR-E-1049` immunity for this disease already recorded. |


Reference: https://docs.rebateright.com.au/api-reference/air/medical-exemptions/record-natural-immunity

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /AIR/v1/individual/natural-immunity/record:
    post:
      operationId: record-natural-immunity
      summary: Record Natural Immunity
      description: >
        Record a natural immunity for an individual — a disease they've
        contracted and are now immune to. Assessed only by a general
        practitioner, paediatrician, public health physician, infectious
        diseases physician, or clinical immunologist.


        Requires an `individualIdentifier` from a prior [Identify
        Individual](/api-reference/air/individual-details/identify-individual)
        call. The information provider must be authorised for `NATIMM` (check
        via [Authorisation](/api-reference/air/authorisation/authorisation)) —
        unauthorised providers return `AIR-E-1063`.


        For shared response patterns and the full status-code list, see [AIR
        Integration](/air).


        #### Eligible diseases


        Per the AIR spec, natural immunity can be recorded for: `HEP`
        (Hepatitis), `MEA` (Measles), `MUM` (Mumps), `QAX` (Q fever), `RUB`
        (Rubella), `VAR` (Varicella).


        #### Date format


        Date fields use **DDMMYYYY** with no separators.


        #### Status Codes


        | Code | Meaning |

        |---|---|

        | `AIR-I-1100` | Immunity recorded. |

        | `AIR-E-1005` | Validation errors. Common: `AIR-E-1063` provider not
        authorised, `AIR-E-1049` immunity for this disease already recorded. |
      tags:
        - subpackage_air.subpackage_air/medicalExemptions
      parameters:
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/AIR_Medical Exemptions_Record Natural
                  Immunity_Response_200
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                individualIdentifier:
                  type: string
                  description: Opaque token from a prior Identify Individual call.
                individualDateOfBirth:
                  type: string
                  description: DDMMYYYY format.
                immunity:
                  $ref: >-
                    #/components/schemas/AirV1IndividualNaturalImmunityRecordPostRequestBodyContentApplicationJsonSchemaImmunity
                informationProvider:
                  $ref: >-
                    #/components/schemas/AirV1IndividualNaturalImmunityRecordPostRequestBodyContentApplicationJsonSchemaInformationProvider
              required:
                - individualIdentifier
                - individualDateOfBirth
                - immunity
                - informationProvider
servers:
  - url: https://api.rebateright.com.au
  - url: https://test-api.rebateright.com.au
components:
  schemas:
    AirV1IndividualNaturalImmunityRecordPostRequestBodyContentApplicationJsonSchemaImmunityDisease:
      type: string
      enum:
        - HEP
        - MEA
        - MUM
        - QAX
        - RUB
        - VAR
      description: |
        Disease the individual is naturally immune to.

        | Code | Meaning |
        |---|---|
        | `HEP` | Hepatitis |
        | `MEA` | Measles |
        | `MUM` | Mumps |
        | `QAX` | Q fever |
        | `RUB` | Rubella |
        | `VAR` | Varicella |
      title: >-
        AirV1IndividualNaturalImmunityRecordPostRequestBodyContentApplicationJsonSchemaImmunityDisease
    AirV1IndividualNaturalImmunityRecordPostRequestBodyContentApplicationJsonSchemaImmunity:
      type: object
      properties:
        disease:
          $ref: >-
            #/components/schemas/AirV1IndividualNaturalImmunityRecordPostRequestBodyContentApplicationJsonSchemaImmunityDisease
          description: |
            Disease the individual is naturally immune to.

            | Code | Meaning |
            |---|---|
            | `HEP` | Hepatitis |
            | `MEA` | Measles |
            | `MUM` | Mumps |
            | `QAX` | Q fever |
            | `RUB` | Rubella |
            | `VAR` | Varicella |
        labTestDate:
          type: string
          description: DDMMYYYY format. Date of the lab test confirming the immunity.
        diagnosisDate:
          type: string
          description: DDMMYYYY format. Date of clinical diagnosis.
      required:
        - disease
      title: >-
        AirV1IndividualNaturalImmunityRecordPostRequestBodyContentApplicationJsonSchemaImmunity
    AirV1IndividualNaturalImmunityRecordPostRequestBodyContentApplicationJsonSchemaInformationProvider:
      type: object
      properties:
        providerNumber:
          type: string
          description: Must be authorised for `NATIMM` capability.
        hpioNumber:
          type: string
          description: Optional. HPI-O. 16 digits.
        hpiiNumber:
          type: string
          description: Optional. HPI-I. 16 digits.
      required:
        - providerNumber
      title: >-
        AirV1IndividualNaturalImmunityRecordPostRequestBodyContentApplicationJsonSchemaInformationProvider
    AirV1IndividualNaturalImmunityRecordPostResponsesContentApplicationJsonSchemaErrorsItems:
      type: object
      properties:
        code:
          type: string
        field:
          type: string
        message:
          type: string
      title: >-
        AirV1IndividualNaturalImmunityRecordPostResponsesContentApplicationJsonSchemaErrorsItems
    AIR_Medical Exemptions_Record Natural Immunity_Response_200:
      type: object
      properties:
        statusCode:
          type: string
        codeType:
          type: string
        message:
          type: string
        errors:
          type:
            - array
            - 'null'
          items:
            $ref: >-
              #/components/schemas/AirV1IndividualNaturalImmunityRecordPostResponsesContentApplicationJsonSchemaErrorsItems
        correlationId:
          type: string
      title: AIR_Medical Exemptions_Record Natural Immunity_Response_200
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
    minorId:
      type: apiKey
      in: header
      name: x-minor-id

```

## SDK Code Examples

```python Success
import requests

url = "https://api.rebateright.com.au/AIR/v1/individual/natural-immunity/record"

payload = {
    "individualIdentifier": "wXrN7bKidsrEkh89yldqZb7ZN-BlMXQXfEgIe4PEaESYj0qNDFRSdnqCM0BvbRF-9maImeb7tXpSC50uqA-T_wGPH8QDag8rTHC-N11jTan2OY_92X9U6Q==",
    "individualDateOfBirth": "18042016",
    "immunity": {
        "disease": "MUM",
        "labTestDate": "15042024",
        "diagnosisDate": "15042024"
    },
    "informationProvider": { "providerNumber": "2447781L" }
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Success
const url = 'https://api.rebateright.com.au/AIR/v1/individual/natural-immunity/record';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"individualIdentifier":"wXrN7bKidsrEkh89yldqZb7ZN-BlMXQXfEgIe4PEaESYj0qNDFRSdnqCM0BvbRF-9maImeb7tXpSC50uqA-T_wGPH8QDag8rTHC-N11jTan2OY_92X9U6Q==","individualDateOfBirth":"18042016","immunity":{"disease":"MUM","labTestDate":"15042024","diagnosisDate":"15042024"},"informationProvider":{"providerNumber":"2447781L"}}'
};

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

```go Success
package main

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

func main() {

	url := "https://api.rebateright.com.au/AIR/v1/individual/natural-immunity/record"

	payload := strings.NewReader("{\n  \"individualIdentifier\": \"wXrN7bKidsrEkh89yldqZb7ZN-BlMXQXfEgIe4PEaESYj0qNDFRSdnqCM0BvbRF-9maImeb7tXpSC50uqA-T_wGPH8QDag8rTHC-N11jTan2OY_92X9U6Q==\",\n  \"individualDateOfBirth\": \"18042016\",\n  \"immunity\": {\n    \"disease\": \"MUM\",\n    \"labTestDate\": \"15042024\",\n    \"diagnosisDate\": \"15042024\"\n  },\n  \"informationProvider\": {\n    \"providerNumber\": \"2447781L\"\n  }\n}")

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

	req.Header.Add("x-api-key", "<apiKey>")
	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 Success
require 'uri'
require 'net/http'

url = URI("https://api.rebateright.com.au/AIR/v1/individual/natural-immunity/record")

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

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"individualIdentifier\": \"wXrN7bKidsrEkh89yldqZb7ZN-BlMXQXfEgIe4PEaESYj0qNDFRSdnqCM0BvbRF-9maImeb7tXpSC50uqA-T_wGPH8QDag8rTHC-N11jTan2OY_92X9U6Q==\",\n  \"individualDateOfBirth\": \"18042016\",\n  \"immunity\": {\n    \"disease\": \"MUM\",\n    \"labTestDate\": \"15042024\",\n    \"diagnosisDate\": \"15042024\"\n  },\n  \"informationProvider\": {\n    \"providerNumber\": \"2447781L\"\n  }\n}"

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

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

HttpResponse<String> response = Unirest.post("https://api.rebateright.com.au/AIR/v1/individual/natural-immunity/record")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"individualIdentifier\": \"wXrN7bKidsrEkh89yldqZb7ZN-BlMXQXfEgIe4PEaESYj0qNDFRSdnqCM0BvbRF-9maImeb7tXpSC50uqA-T_wGPH8QDag8rTHC-N11jTan2OY_92X9U6Q==\",\n  \"individualDateOfBirth\": \"18042016\",\n  \"immunity\": {\n    \"disease\": \"MUM\",\n    \"labTestDate\": \"15042024\",\n    \"diagnosisDate\": \"15042024\"\n  },\n  \"informationProvider\": {\n    \"providerNumber\": \"2447781L\"\n  }\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.rebateright.com.au/AIR/v1/individual/natural-immunity/record', [
  'body' => '{
  "individualIdentifier": "wXrN7bKidsrEkh89yldqZb7ZN-BlMXQXfEgIe4PEaESYj0qNDFRSdnqCM0BvbRF-9maImeb7tXpSC50uqA-T_wGPH8QDag8rTHC-N11jTan2OY_92X9U6Q==",
  "individualDateOfBirth": "18042016",
  "immunity": {
    "disease": "MUM",
    "labTestDate": "15042024",
    "diagnosisDate": "15042024"
  },
  "informationProvider": {
    "providerNumber": "2447781L"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Success
using RestSharp;

var client = new RestClient("https://api.rebateright.com.au/AIR/v1/individual/natural-immunity/record");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"individualIdentifier\": \"wXrN7bKidsrEkh89yldqZb7ZN-BlMXQXfEgIe4PEaESYj0qNDFRSdnqCM0BvbRF-9maImeb7tXpSC50uqA-T_wGPH8QDag8rTHC-N11jTan2OY_92X9U6Q==\",\n  \"individualDateOfBirth\": \"18042016\",\n  \"immunity\": {\n    \"disease\": \"MUM\",\n    \"labTestDate\": \"15042024\",\n    \"diagnosisDate\": \"15042024\"\n  },\n  \"informationProvider\": {\n    \"providerNumber\": \"2447781L\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Success
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "individualIdentifier": "wXrN7bKidsrEkh89yldqZb7ZN-BlMXQXfEgIe4PEaESYj0qNDFRSdnqCM0BvbRF-9maImeb7tXpSC50uqA-T_wGPH8QDag8rTHC-N11jTan2OY_92X9U6Q==",
  "individualDateOfBirth": "18042016",
  "immunity": [
    "disease": "MUM",
    "labTestDate": "15042024",
    "diagnosisDate": "15042024"
  ],
  "informationProvider": ["providerNumber": "2447781L"]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.rebateright.com.au/AIR/v1/individual/natural-immunity/record")! 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()
```

```python Provider Not Authorised
import requests

url = "https://api.rebateright.com.au/AIR/v1/individual/natural-immunity/record"

payload = {
    "individualIdentifier": "wXrN7bKidsrIHzwqkDkGJHDOYBHbiH_3fEgIe4PEaESYj0qNDFRSdnqCM0BvbRF-9maImeb7tXpSC50uqA-T_wGPH8QDag8rTHC-N11jTan2OY_92X9U6Q==",
    "individualDateOfBirth": "18042016",
    "immunity": {
        "disease": "MUM",
        "labTestDate": "15042024",
        "diagnosisDate": "15042024"
    },
    "informationProvider": { "providerNumber": "T39126X" }
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Provider Not Authorised
const url = 'https://api.rebateright.com.au/AIR/v1/individual/natural-immunity/record';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"individualIdentifier":"wXrN7bKidsrIHzwqkDkGJHDOYBHbiH_3fEgIe4PEaESYj0qNDFRSdnqCM0BvbRF-9maImeb7tXpSC50uqA-T_wGPH8QDag8rTHC-N11jTan2OY_92X9U6Q==","individualDateOfBirth":"18042016","immunity":{"disease":"MUM","labTestDate":"15042024","diagnosisDate":"15042024"},"informationProvider":{"providerNumber":"T39126X"}}'
};

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

```go Provider Not Authorised
package main

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

func main() {

	url := "https://api.rebateright.com.au/AIR/v1/individual/natural-immunity/record"

	payload := strings.NewReader("{\n  \"individualIdentifier\": \"wXrN7bKidsrIHzwqkDkGJHDOYBHbiH_3fEgIe4PEaESYj0qNDFRSdnqCM0BvbRF-9maImeb7tXpSC50uqA-T_wGPH8QDag8rTHC-N11jTan2OY_92X9U6Q==\",\n  \"individualDateOfBirth\": \"18042016\",\n  \"immunity\": {\n    \"disease\": \"MUM\",\n    \"labTestDate\": \"15042024\",\n    \"diagnosisDate\": \"15042024\"\n  },\n  \"informationProvider\": {\n    \"providerNumber\": \"T39126X\"\n  }\n}")

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

	req.Header.Add("x-api-key", "<apiKey>")
	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 Provider Not Authorised
require 'uri'
require 'net/http'

url = URI("https://api.rebateright.com.au/AIR/v1/individual/natural-immunity/record")

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

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"individualIdentifier\": \"wXrN7bKidsrIHzwqkDkGJHDOYBHbiH_3fEgIe4PEaESYj0qNDFRSdnqCM0BvbRF-9maImeb7tXpSC50uqA-T_wGPH8QDag8rTHC-N11jTan2OY_92X9U6Q==\",\n  \"individualDateOfBirth\": \"18042016\",\n  \"immunity\": {\n    \"disease\": \"MUM\",\n    \"labTestDate\": \"15042024\",\n    \"diagnosisDate\": \"15042024\"\n  },\n  \"informationProvider\": {\n    \"providerNumber\": \"T39126X\"\n  }\n}"

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

```java Provider Not Authorised
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.rebateright.com.au/AIR/v1/individual/natural-immunity/record")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"individualIdentifier\": \"wXrN7bKidsrIHzwqkDkGJHDOYBHbiH_3fEgIe4PEaESYj0qNDFRSdnqCM0BvbRF-9maImeb7tXpSC50uqA-T_wGPH8QDag8rTHC-N11jTan2OY_92X9U6Q==\",\n  \"individualDateOfBirth\": \"18042016\",\n  \"immunity\": {\n    \"disease\": \"MUM\",\n    \"labTestDate\": \"15042024\",\n    \"diagnosisDate\": \"15042024\"\n  },\n  \"informationProvider\": {\n    \"providerNumber\": \"T39126X\"\n  }\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.rebateright.com.au/AIR/v1/individual/natural-immunity/record', [
  'body' => '{
  "individualIdentifier": "wXrN7bKidsrIHzwqkDkGJHDOYBHbiH_3fEgIe4PEaESYj0qNDFRSdnqCM0BvbRF-9maImeb7tXpSC50uqA-T_wGPH8QDag8rTHC-N11jTan2OY_92X9U6Q==",
  "individualDateOfBirth": "18042016",
  "immunity": {
    "disease": "MUM",
    "labTestDate": "15042024",
    "diagnosisDate": "15042024"
  },
  "informationProvider": {
    "providerNumber": "T39126X"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Provider Not Authorised
using RestSharp;

var client = new RestClient("https://api.rebateright.com.au/AIR/v1/individual/natural-immunity/record");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"individualIdentifier\": \"wXrN7bKidsrIHzwqkDkGJHDOYBHbiH_3fEgIe4PEaESYj0qNDFRSdnqCM0BvbRF-9maImeb7tXpSC50uqA-T_wGPH8QDag8rTHC-N11jTan2OY_92X9U6Q==\",\n  \"individualDateOfBirth\": \"18042016\",\n  \"immunity\": {\n    \"disease\": \"MUM\",\n    \"labTestDate\": \"15042024\",\n    \"diagnosisDate\": \"15042024\"\n  },\n  \"informationProvider\": {\n    \"providerNumber\": \"T39126X\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Provider Not Authorised
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "individualIdentifier": "wXrN7bKidsrIHzwqkDkGJHDOYBHbiH_3fEgIe4PEaESYj0qNDFRSdnqCM0BvbRF-9maImeb7tXpSC50uqA-T_wGPH8QDag8rTHC-N11jTan2OY_92X9U6Q==",
  "individualDateOfBirth": "18042016",
  "immunity": [
    "disease": "MUM",
    "labTestDate": "15042024",
    "diagnosisDate": "15042024"
  ],
  "informationProvider": ["providerNumber": "T39126X"]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.rebateright.com.au/AIR/v1/individual/natural-immunity/record")! 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()
```