> 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 AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.rebateright.com.au/_mcp/server.

# Health Fund Verification

POST https://test-api.rebateright.com.au/Medicare/patientverification/hf/v1
Content-Type: application/json

**Does the patient's health fund hold this membership?**

That is the question this endpoint answers, from the patient's details and their health fund
membership card.

Test environment only. Services Australia is certifying this service, and it reaches production once certified.

The patient's health fund checks the membership as at `dateOfService`.

Send `typeCode` as `PVF`. To check Medicare and the health fund in one request, use
[Medicare and Health Fund Verification](/api-reference/health-funds/medicare-and-health-fund-verification).

`organisation` is the patient's fund code from [Get Participants](/api-reference/health-funds/get-participants).
A code missing from the current fund list returns code `9672`.

#### Health fund status codes (`healthFundStatus.status.code`)

| Code   | Meaning                                                                                                                                                                    |
| ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `0`    | The fund holds the membership                                                                                                                                              |
| `8007` | Membership matched. The patient must contact the fund.                                                                                                                     |
| `8008` | Membership matched. The provider must contact the fund.                                                                                                                    |
| `9662` | The provider must contact the fund                                                                                                                                         |
| `9663` | Check the fund and the membership card details                                                                                                                             |
| `9664` | Check the patient's details, then the fund and card details. If they are correct, the fund may hold a different name. Send it in `alsoKnownAs`, or send `memberRefNumber`. |
| `9665` | The fund cannot identify one patient from the details sent. Send more details, or confirm them with the patient.                                                           |
| `9666` | The patient must contact the fund                                                                                                                                          |
| `9667` | The membership is suspended or cancelled                                                                                                                                   |
| `9668` | The membership does not cover medical claims. The patient must contact the fund.                                                                                           |
| `9669` | Membership matched, but the fund cannot take claims for this patient online at present. The patient must contact the fund.                                                 |
| `9671` | The fund does not accept this check at present                                                                                                                             |
| `9672` | `organisation` is missing from the current fund list. Refresh your list from Get Participants, then check again.                                                           |
| `9686` | The fund does not hold the baby on the membership                                                                                                                          |
| `9687` | The fund holds no bank details for this provider or facility. Contact the fund before you send claims.                                                                     |
| `3040` | The fund's system is unavailable. Check again later.                                                                                                                       |

#### Validation errors (`400`)

| Code                          | Meaning                                                                                                                                               |
| ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| `9202`                        | A submitted field failed its checks. The `reason` in `serviceMessage` names the field and the problem.                                                |
| `2030`                        | The request does not fit this check. `typeCode` is not `PVF`, a `medicare` object was sent, or `dateOfService` is before the patient's date of birth. |
| `5`, with `codeType` `DHSEIN` | The request does not match the expected structure, such as a missing required field or a number sent as a string. `message` names the problem.        |

#### Using this check

[Patient verification](/health-fund-checks#patient-verification) sets out the hospital cover rule,
and how Services Australia requires software to use this check.

**Display `text` exactly as supplied.** Services Australia requires its messages to be shown
to the end user exactly as supplied in the response, without truncating, transforming or
changing them in any way. The wording can change at any time, so branch on `code`, never on `text`.

Reference: https://docs.rebateright.com.au/api-reference/health-funds/health-fund-verification

## Authentication

- `x-api-key` header (required) — API Key authentication via header
- `x-minor-id` header (required) — Your Minor ID is 3 uppercase letters followed by 5 digits, such as `MDE00000`. Send the Minor ID exactly as issued. A malformed value returns `400` with the text `The Minor ID is not valid.` on every endpoint.

## Servers

- `https://test-api.rebateright.com.au` (Test, default)
- `https://api.rebateright.com.au` (Production)

## Request

### Headers

- `x-minor-id` (string, required) — The Minor ID of the clinic you act for. See [Keys, Minor ID and environments](/keys-and-environments).

### Body (application/json)

This endpoint expects an object.

- `patient` (MedicarePatientverificationHfV1PostRequestBodyContentApplicationJsonSchemaPatient, required)
- `typeCode` (enum, required) — Must be `PVF` on this endpoint. Any other value returns `400` with code `2030`. | Code | Meaning | |------|---------| | `PVF` | Health fund only |
  - Allowed values: `PVF`
- `dateOfService` (date, optional) — Optional. The date the fund checks the membership against. Defaults to today when omitted. It cannot be in the future, 2 years or more in the past, or before the patient's date of birth.

## Response

### 200

OK

- `correlationId` (string, required) — Unique identifier for this transaction. Use it for tracing and support.
- `healthFundStatus` (MedicarePatientverificationHfV1PostResponsesContentApplicationJsonSchemaHealthFundStatus, required) — The fund's answer.

## Errors

### 400 Bad Request Error

A submitted value broke a format or business rule. A rule error carries `serviceMessage` entries. A request that does not match the expected structure carries `code`, `codeType` and `message` instead. Both carry the `correlationId`.

- `PostMedicarePatientverificationHfV1RequestBadRequestError`

## Types

### MedicarePatientverificationHfV1PostRequestBodyContentApplicationJsonSchemaPatient

- `identity` (MedicarePatientverificationHfV1PostRequestBodyContentApplicationJsonSchemaPatientIdentity, required)
- `healthFund` (MedicarePatientverificationHfV1PostRequestBodyContentApplicationJsonSchemaPatientHealthFund, required)
- `alsoKnownAs` (MedicarePatientverificationHfV1PostRequestBodyContentApplicationJsonSchemaPatientAlsoKnownAs, optional) — Optional. The patient's name as the fund holds it, when it differs from `identity`. Leave it out rather than send it empty.

### MedicarePatientverificationHfV1PostResponsesContentApplicationJsonSchemaHealthFundStatus

The fund's answer.

- `status` (MedicarePatientverificationHfV1PostResponsesContentApplicationJsonSchemaHealthFundStatusStatus, optional)

### Service message

- `highestSeverity` (string, required)
- `serviceMessage` (list of MedicarePatientverificationHfV1PostResponsesContentApplicationJsonSchemaOneOf0ServiceMessageItems, required)
- `correlationId` (string, required)

### Structure error

- `code` (integer, required)
- `codeType` (string, required)
- `message` (string, required)
- `correlationId` (string, required)

### MedicarePatientverificationHfV1PostRequestBodyContentApplicationJsonSchemaPatientIdentity

- `dateOfBirth` (date, required) — The patient's date of birth. It cannot be in the future or more than 130 years in the past.
- `familyName` (string, required) — The patient's family name, 1–40 letters, digits, spaces, apostrophes and hyphens. If the patient has only one name, send it here and send `Onlyname` as `givenName`.
- `givenName` (string, required) — The patient's given name, 1–40 letters, digits, spaces, apostrophes and hyphens. If the patient has only one name, send `Onlyname` here and the name in `familyName`.
- `sex` (enum, required) — Sex, as Services Australia codes it. | Code | Meaning | |------|---------| | `1` | Male | | `2` | Female | | `3` | Another term | | `9` | Not stated or inadequately described |
  - Allowed values: `1`, `2`, `3`, `9`
- `secondInitial` (string, optional) — Optional. The initial of the patient's second given name, a single letter.

### MedicarePatientverificationHfV1PostRequestBodyContentApplicationJsonSchemaPatientHealthFund

- `memberNumber` (string, required) — The patient's health fund membership number, 1–19 letters or digits.
- `organisation` (string, required) — The patient's fund code, 3 capital letters. [Fund codes](/health-fund-checks#fund-codes) says where the codes come from.
- `memberRefNumber` (string, optional) — Optional. The patient's Universal Patient Identifier (UPI) on the health fund membership, 1 or 2 digits from `0` to `99`. Leading zeros are allowed.

### MedicarePatientverificationHfV1PostRequestBodyContentApplicationJsonSchemaPatientAlsoKnownAs

Optional. The patient's name as the fund holds it, when it differs from `identity`. Leave it out rather than send it empty.

- `familyName` (string, optional) — The family name the fund holds, with the same rules as `identity.familyName`.
- `givenName` (string, optional) — The given name the fund holds, with the same rules as `identity.givenName`.

### MedicarePatientverificationHfV1PostResponsesContentApplicationJsonSchemaHealthFundStatusStatus

- `code` (integer, required) — Health fund status code, such as `0` when the fund holds the membership. The table at the top of this page lists the codes.
- `text` (string, required) — The message to show the user, exactly as supplied.

### MedicarePatientverificationHfV1PostResponsesContentApplicationJsonSchemaOneOf0ServiceMessageItems

- `code` (string, optional)
- `severity` (string, optional)
- `reason` (string, optional)

## Examples

### Membership Confirmed

**Request**

```json
{
  "patient": {
    "identity": {
      "dateOfBirth": "1993-08-14",
      "familyName": "NASH",
      "givenName": "Hazel",
      "sex": "2"
    },
    "healthFund": {
      "memberNumber": "1234567",
      "organisation": "TST",
      "memberRefNumber": "1"
    }
  },
  "typeCode": "PVF",
  "dateOfService": "2026-10-21"
}
```

**Response**

```json
{
  "correlationId": "urn:uuid:MDE00000cea54b744579411d",
  "healthFundStatus": {
    "status": {
      "code": 0,
      "text": "Patient is known to the Health Fund specified in the request."
    }
  }
}
```

**SDK Code**

```python Membership Confirmed
import requests

url = "https://test-api.rebateright.com.au/Medicare/patientverification/hf/v1"

payload = {
    "patient": {
        "identity": {
            "dateOfBirth": "1993-08-14",
            "familyName": "NASH",
            "givenName": "Hazel",
            "sex": "2"
        },
        "healthFund": {
            "memberNumber": "1234567",
            "organisation": "TST",
            "memberRefNumber": "1"
        }
    },
    "typeCode": "PVF",
    "dateOfService": "2026-10-21"
}
headers = {
    "x-minor-id": "<minorId>",
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Membership Confirmed
const url = 'https://test-api.rebateright.com.au/Medicare/patientverification/hf/v1';
const options = {
  method: 'POST',
  headers: {
    'x-minor-id': '<minorId>',
    'x-api-key': '<apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{"patient":{"identity":{"dateOfBirth":"1993-08-14","familyName":"NASH","givenName":"Hazel","sex":"2"},"healthFund":{"memberNumber":"1234567","organisation":"TST","memberRefNumber":"1"}},"typeCode":"PVF","dateOfService":"2026-10-21"}'
};

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

```go Membership Confirmed
package main

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

func main() {

	url := "https://test-api.rebateright.com.au/Medicare/patientverification/hf/v1"

	payload := strings.NewReader("{\n  \"patient\": {\n    \"identity\": {\n      \"dateOfBirth\": \"1993-08-14\",\n      \"familyName\": \"NASH\",\n      \"givenName\": \"Hazel\",\n      \"sex\": \"2\"\n    },\n    \"healthFund\": {\n      \"memberNumber\": \"1234567\",\n      \"organisation\": \"TST\",\n      \"memberRefNumber\": \"1\"\n    }\n  },\n  \"typeCode\": \"PVF\",\n  \"dateOfService\": \"2026-10-21\"\n}")

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

	req.Header.Add("x-minor-id", "<minorId>")
	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 Membership Confirmed
require 'uri'
require 'net/http'

url = URI("https://test-api.rebateright.com.au/Medicare/patientverification/hf/v1")

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

request = Net::HTTP::Post.new(url)
request["x-minor-id"] = '<minorId>'
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"patient\": {\n    \"identity\": {\n      \"dateOfBirth\": \"1993-08-14\",\n      \"familyName\": \"NASH\",\n      \"givenName\": \"Hazel\",\n      \"sex\": \"2\"\n    },\n    \"healthFund\": {\n      \"memberNumber\": \"1234567\",\n      \"organisation\": \"TST\",\n      \"memberRefNumber\": \"1\"\n    }\n  },\n  \"typeCode\": \"PVF\",\n  \"dateOfService\": \"2026-10-21\"\n}"

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

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

HttpResponse<String> response = Unirest.post("https://test-api.rebateright.com.au/Medicare/patientverification/hf/v1")
  .header("x-minor-id", "<minorId>")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"patient\": {\n    \"identity\": {\n      \"dateOfBirth\": \"1993-08-14\",\n      \"familyName\": \"NASH\",\n      \"givenName\": \"Hazel\",\n      \"sex\": \"2\"\n    },\n    \"healthFund\": {\n      \"memberNumber\": \"1234567\",\n      \"organisation\": \"TST\",\n      \"memberRefNumber\": \"1\"\n    }\n  },\n  \"typeCode\": \"PVF\",\n  \"dateOfService\": \"2026-10-21\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://test-api.rebateright.com.au/Medicare/patientverification/hf/v1', [
  'body' => '{
  "patient": {
    "identity": {
      "dateOfBirth": "1993-08-14",
      "familyName": "NASH",
      "givenName": "Hazel",
      "sex": "2"
    },
    "healthFund": {
      "memberNumber": "1234567",
      "organisation": "TST",
      "memberRefNumber": "1"
    }
  },
  "typeCode": "PVF",
  "dateOfService": "2026-10-21"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
    'x-minor-id' => '<minorId>',
  ],
]);

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

```csharp Membership Confirmed
using RestSharp;

var client = new RestClient("https://test-api.rebateright.com.au/Medicare/patientverification/hf/v1");
var request = new RestRequest(Method.POST);
request.AddHeader("x-minor-id", "<minorId>");
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"patient\": {\n    \"identity\": {\n      \"dateOfBirth\": \"1993-08-14\",\n      \"familyName\": \"NASH\",\n      \"givenName\": \"Hazel\",\n      \"sex\": \"2\"\n    },\n    \"healthFund\": {\n      \"memberNumber\": \"1234567\",\n      \"organisation\": \"TST\",\n      \"memberRefNumber\": \"1\"\n    }\n  },\n  \"typeCode\": \"PVF\",\n  \"dateOfService\": \"2026-10-21\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Membership Confirmed
import Foundation

let headers = [
  "x-minor-id": "<minorId>",
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "patient": [
    "identity": [
      "dateOfBirth": "1993-08-14",
      "familyName": "NASH",
      "givenName": "Hazel",
      "sex": "2"
    ],
    "healthFund": [
      "memberNumber": "1234567",
      "organisation": "TST",
      "memberRefNumber": "1"
    ]
  ],
  "typeCode": "PVF",
  "dateOfService": "2026-10-21"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://test-api.rebateright.com.au/Medicare/patientverification/hf/v1")! 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()
```

### Fund Code Out of Date

**Request**

```json
{
  "patient": {
    "identity": {
      "dateOfBirth": "1993-08-14",
      "familyName": "NASH",
      "givenName": "Hazel",
      "sex": "2"
    },
    "healthFund": {
      "memberNumber": "1234567",
      "organisation": "ZZZ",
      "memberRefNumber": "1"
    }
  },
  "typeCode": "PVF",
  "dateOfService": "2026-10-21"
}
```

**Response**

```json
{
  "correlationId": "urn:uuid:MDE00000a25d635c95034949",
  "healthFundStatus": {
    "status": {
      "code": 9672,
      "text": "Your Fund information is out of date. Please update your Fund list and resubmit."
    }
  }
}
```

**SDK Code**

```python Fund Code Out of Date
import requests

url = "https://test-api.rebateright.com.au/Medicare/patientverification/hf/v1"

payload = {
    "patient": {
        "identity": {
            "dateOfBirth": "1993-08-14",
            "familyName": "NASH",
            "givenName": "Hazel",
            "sex": "2"
        },
        "healthFund": {
            "memberNumber": "1234567",
            "organisation": "ZZZ",
            "memberRefNumber": "1"
        }
    },
    "typeCode": "PVF",
    "dateOfService": "2026-10-21"
}
headers = {
    "x-minor-id": "<minorId>",
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Fund Code Out of Date
const url = 'https://test-api.rebateright.com.au/Medicare/patientverification/hf/v1';
const options = {
  method: 'POST',
  headers: {
    'x-minor-id': '<minorId>',
    'x-api-key': '<apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{"patient":{"identity":{"dateOfBirth":"1993-08-14","familyName":"NASH","givenName":"Hazel","sex":"2"},"healthFund":{"memberNumber":"1234567","organisation":"ZZZ","memberRefNumber":"1"}},"typeCode":"PVF","dateOfService":"2026-10-21"}'
};

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

```go Fund Code Out of Date
package main

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

func main() {

	url := "https://test-api.rebateright.com.au/Medicare/patientverification/hf/v1"

	payload := strings.NewReader("{\n  \"patient\": {\n    \"identity\": {\n      \"dateOfBirth\": \"1993-08-14\",\n      \"familyName\": \"NASH\",\n      \"givenName\": \"Hazel\",\n      \"sex\": \"2\"\n    },\n    \"healthFund\": {\n      \"memberNumber\": \"1234567\",\n      \"organisation\": \"ZZZ\",\n      \"memberRefNumber\": \"1\"\n    }\n  },\n  \"typeCode\": \"PVF\",\n  \"dateOfService\": \"2026-10-21\"\n}")

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

	req.Header.Add("x-minor-id", "<minorId>")
	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 Fund Code Out of Date
require 'uri'
require 'net/http'

url = URI("https://test-api.rebateright.com.au/Medicare/patientverification/hf/v1")

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

request = Net::HTTP::Post.new(url)
request["x-minor-id"] = '<minorId>'
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"patient\": {\n    \"identity\": {\n      \"dateOfBirth\": \"1993-08-14\",\n      \"familyName\": \"NASH\",\n      \"givenName\": \"Hazel\",\n      \"sex\": \"2\"\n    },\n    \"healthFund\": {\n      \"memberNumber\": \"1234567\",\n      \"organisation\": \"ZZZ\",\n      \"memberRefNumber\": \"1\"\n    }\n  },\n  \"typeCode\": \"PVF\",\n  \"dateOfService\": \"2026-10-21\"\n}"

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

```java Fund Code Out of Date
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://test-api.rebateright.com.au/Medicare/patientverification/hf/v1")
  .header("x-minor-id", "<minorId>")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"patient\": {\n    \"identity\": {\n      \"dateOfBirth\": \"1993-08-14\",\n      \"familyName\": \"NASH\",\n      \"givenName\": \"Hazel\",\n      \"sex\": \"2\"\n    },\n    \"healthFund\": {\n      \"memberNumber\": \"1234567\",\n      \"organisation\": \"ZZZ\",\n      \"memberRefNumber\": \"1\"\n    }\n  },\n  \"typeCode\": \"PVF\",\n  \"dateOfService\": \"2026-10-21\"\n}")
  .asString();
```

```php Fund Code Out of Date
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://test-api.rebateright.com.au/Medicare/patientverification/hf/v1', [
  'body' => '{
  "patient": {
    "identity": {
      "dateOfBirth": "1993-08-14",
      "familyName": "NASH",
      "givenName": "Hazel",
      "sex": "2"
    },
    "healthFund": {
      "memberNumber": "1234567",
      "organisation": "ZZZ",
      "memberRefNumber": "1"
    }
  },
  "typeCode": "PVF",
  "dateOfService": "2026-10-21"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
    'x-minor-id' => '<minorId>',
  ],
]);

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

```csharp Fund Code Out of Date
using RestSharp;

var client = new RestClient("https://test-api.rebateright.com.au/Medicare/patientverification/hf/v1");
var request = new RestRequest(Method.POST);
request.AddHeader("x-minor-id", "<minorId>");
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"patient\": {\n    \"identity\": {\n      \"dateOfBirth\": \"1993-08-14\",\n      \"familyName\": \"NASH\",\n      \"givenName\": \"Hazel\",\n      \"sex\": \"2\"\n    },\n    \"healthFund\": {\n      \"memberNumber\": \"1234567\",\n      \"organisation\": \"ZZZ\",\n      \"memberRefNumber\": \"1\"\n    }\n  },\n  \"typeCode\": \"PVF\",\n  \"dateOfService\": \"2026-10-21\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Fund Code Out of Date
import Foundation

let headers = [
  "x-minor-id": "<minorId>",
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "patient": [
    "identity": [
      "dateOfBirth": "1993-08-14",
      "familyName": "NASH",
      "givenName": "Hazel",
      "sex": "2"
    ],
    "healthFund": [
      "memberNumber": "1234567",
      "organisation": "ZZZ",
      "memberRefNumber": "1"
    ]
  ],
  "typeCode": "PVF",
  "dateOfService": "2026-10-21"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://test-api.rebateright.com.au/Medicare/patientverification/hf/v1")! 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()
```