For clean Markdown of any page, append .md to the page URL. For a complete documentation index, see https://docs.rebateright.com.au/api-reference/medicare-eligibility/llms.txt. For full documentation content, see https://docs.rebateright.com.au/api-reference/medicare-eligibility/llms-full.txt.

# Patient Verification

POST https://api.rebateright.com.au/VerifyPatient
Content-Type: application/json

Verify that the patient details you hold (name, date of birth, sex, Medicare card number and IRN) match
Medicare's records. RebateRight runs its own field-format checks first, then calls Medicare's **Patient
Verification Check** service.

When Medicare accepts the check but some details differ, the corrected value is echoed on the matching
**`Correct…`** field so you can propose an update to the patient's record.

Every `Reason` string is prefixed with **`[Medicare]`** (passthrough from Medicare) or **`[RebateRight]`**
(RebateRight-side validation) so each sentence can be attributed to its source.

## 📑 How Medicare handles individual fields

| Field | Behaviour when only this field is wrong | Behaviour when another field is also wrong |
|---|---|---|
| **Medicare Card Number** | Fails. No correction provided. | Fails. No correction provided. |
| **Date of Birth** | Accepted with a prompt to confirm DOB. No correction provided. | Fails. No correction provided. |
| **Medicare Reference Number (IRN)** | Accepted with the correct IRN in `CorrectMedicareReferenceNumber`. | Fails. No correction provided. |
| **Given Name** | First 5 characters must match (so `ELIZA` vs `ELIZABETH` passes). If only the given name differs, the correct value is returned in `CorrectGivenName`. | Fails. No correction provided. |
| **Family Name / Sex** | Ignored — verification still passes with no correction reported. | Does not by itself cause failure. |
| **New Medicare card issued** | `Verified: false`; Medicare supplies `CorrectMedicareNumber`, `CorrectMedicareReferenceNumber`, and `CorrectGivenName` so you can update the patient's record. |  |

## 👤 Patients with a single name

For single-name patients, submit the single name as **`PatientFamilyName`** and set **`PatientGivenName`** to
the literal string **`ONLYNAME`**.


Reference: https://docs.rebateright.com.au/api-reference/medicare-eligibility/patient-verification

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /VerifyPatient:
    post:
      operationId: patient-verification
      summary: Patient Verification
      description: >
        Verify that the patient details you hold (name, date of birth, sex,
        Medicare card number and IRN) match

        Medicare's records. RebateRight runs its own field-format checks first,
        then calls Medicare's **Patient

        Verification Check** service.


        When Medicare accepts the check but some details differ, the corrected
        value is echoed on the matching

        **`Correct…`** field so you can propose an update to the patient's
        record.


        Every `Reason` string is prefixed with **`[Medicare]`** (passthrough
        from Medicare) or **`[RebateRight]`**

        (RebateRight-side validation) so each sentence can be attributed to its
        source.


        ## 📑 How Medicare handles individual fields


        | Field | Behaviour when only this field is wrong | Behaviour when
        another field is also wrong |

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

        | **Medicare Card Number** | Fails. No correction provided. | Fails. No
        correction provided. |

        | **Date of Birth** | Accepted with a prompt to confirm DOB. No
        correction provided. | Fails. No correction provided. |

        | **Medicare Reference Number (IRN)** | Accepted with the correct IRN in
        `CorrectMedicareReferenceNumber`. | Fails. No correction provided. |

        | **Given Name** | First 5 characters must match (so `ELIZA` vs
        `ELIZABETH` passes). If only the given name differs, the correct value
        is returned in `CorrectGivenName`. | Fails. No correction provided. |

        | **Family Name / Sex** | Ignored — verification still passes with no
        correction reported. | Does not by itself cause failure. |

        | **New Medicare card issued** | `Verified: false`; Medicare supplies
        `CorrectMedicareNumber`, `CorrectMedicareReferenceNumber`, and
        `CorrectGivenName` so you can update the patient's record. |  |


        ## 👤 Patients with a single name


        For single-name patients, submit the single name as
        **`PatientFamilyName`** and set **`PatientGivenName`** to

        the literal string **`ONLYNAME`**.
      tags:
        - subpackage_medicareEligibility
      parameters:
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Medicare Eligibility_Patient
                  Verification_Response_200
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                PatientDateOfBirth:
                  type: string
                  format: date
                  description: >-
                    Patient date of birth (`YYYY-MM-DD`). Cannot be a future
                    date or more than 130 years in the past.
                PatientFamilyName:
                  type: string
                  description: >-
                    Patient family name as it appears on the Medicare card. For
                    single-name patients, put the single name here.
                PatientGivenName:
                  type: string
                  description: >-
                    Patient first given name as it appears on the Medicare card.
                    Medicare matches on the first 5 characters, so `ELIZA` is
                    accepted against a record of `ELIZABETH`. For single-name
                    patients, set this to the literal string `ONLYNAME`.
                PatientSex:
                  $ref: >-
                    #/components/schemas/VerifyPatientPostRequestBodyContentApplicationJsonSchemaPatientSex
                  description: >
                    Patient sex (Services Australia coding). Medicare does not
                    fail verification on a sex mismatch

                    alone and does not report a correction for this field.


                    | Code | Meaning |

                    |---|---|

                    | `1` | Male |

                    | `2` | Female |

                    | `3` | Other |

                    | `9` | Not stated / inadequately described |
                PatientMedicareNumber:
                  type: string
                  description: >-
                    Patient's 10-digit Medicare card number. Must pass the
                    Medicare card check-digit routine — RebateRight validates
                    this before calling Medicare.
                PatientMedicareRefNumber:
                  type: string
                  description: >-
                    Individual Reference Number (IRN) from the patient's
                    Medicare card — a single digit identifying the family
                    member.
              required:
                - PatientDateOfBirth
                - PatientFamilyName
                - PatientGivenName
                - PatientSex
                - PatientMedicareNumber
                - PatientMedicareRefNumber
servers:
  - url: https://api.rebateright.com.au
  - url: https://test-api.rebateright.com.au
components:
  schemas:
    VerifyPatientPostRequestBodyContentApplicationJsonSchemaPatientSex:
      type: string
      enum:
        - '1'
        - '2'
        - '3'
        - '9'
      description: >
        Patient sex (Services Australia coding). Medicare does not fail
        verification on a sex mismatch

        alone and does not report a correction for this field.


        | Code | Meaning |

        |---|---|

        | `1` | Male |

        | `2` | Female |

        | `3` | Other |

        | `9` | Not stated / inadequately described |
      title: VerifyPatientPostRequestBodyContentApplicationJsonSchemaPatientSex
    Medicare Eligibility_Patient Verification_Response_200:
      type: object
      properties:
        Verified:
          type:
            - boolean
            - 'null'
          description: >-
            Tri-state verification outcome. `true` means Medicare confirms an
            exact match, `false` means Medicare accepted the check with
            corrections or returned a mismatch, and a null value means the check
            did not run (the request failed RebateRight-side validation). Always
            check `Reason` for the full explanation.
        Reason:
          type: string
          description: >-
            Human-readable explanation of the outcome, prefixed with
            `[Medicare]` (passthrough from Medicare) or `[RebateRight]`
            (RebateRight-side validation).
        CorrectSex:
          type:
            - string
            - 'null'
          description: Always `null` — Medicare does not report corrections to sex.
        CorrectGivenName:
          type:
            - string
            - 'null'
          description: >-
            Corrected given name when Medicare's records differ and the given
            name is the only field wrong; `null` otherwise.
        CorrectFamilyName:
          type:
            - string
            - 'null'
          description: Always `null` — Medicare does not report corrections to family name.
        CorrectDateOfBirth:
          type:
            - string
            - 'null'
          description: >-
            Always `null` — Medicare signals a DOB mismatch in `Reason` but does
            not return the correct value.
        CorrectMedicareNumber:
          type:
            - string
            - 'null'
          description: >-
            Corrected 10-digit Medicare card number when Medicare has re-issued
            the card; `null` otherwise.
        CorrectMedicareReferenceNumber:
          type:
            - string
            - 'null'
          description: >-
            Corrected IRN when the IRN was the only field wrong, or when a new
            Medicare card has been issued; `null` otherwise.
      required:
        - Verified
        - Reason
      description: Patient-verification result.
      title: Medicare Eligibility_Patient Verification_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/VerifyPatient"

payload = {
    "PatientDateOfBirth": "1986-12-18",
    "PatientFamilyName": "FLETCHER",
    "PatientGivenName": "Edmond",
    "PatientSex": "1",
    "PatientMedicareNumber": "4951525561",
    "PatientMedicareRefNumber": "2"
}
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/VerifyPatient';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"PatientDateOfBirth":"1986-12-18","PatientFamilyName":"FLETCHER","PatientGivenName":"Edmond","PatientSex":"1","PatientMedicareNumber":"4951525561","PatientMedicareRefNumber":"2"}'
};

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/VerifyPatient"

	payload := strings.NewReader("{\n  \"PatientDateOfBirth\": \"1986-12-18\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"Edmond\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"2\"\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/VerifyPatient")

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  \"PatientDateOfBirth\": \"1986-12-18\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"Edmond\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"2\"\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/VerifyPatient")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"PatientDateOfBirth\": \"1986-12-18\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"Edmond\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"2\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.rebateright.com.au/VerifyPatient', [
  'body' => '{
  "PatientDateOfBirth": "1986-12-18",
  "PatientFamilyName": "FLETCHER",
  "PatientGivenName": "Edmond",
  "PatientSex": "1",
  "PatientMedicareNumber": "4951525561",
  "PatientMedicareRefNumber": "2"
}',
  '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/VerifyPatient");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"PatientDateOfBirth\": \"1986-12-18\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"Edmond\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"2\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Success
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "PatientDateOfBirth": "1986-12-18",
  "PatientFamilyName": "FLETCHER",
  "PatientGivenName": "Edmond",
  "PatientSex": "1",
  "PatientMedicareNumber": "4951525561",
  "PatientMedicareRefNumber": "2"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.rebateright.com.au/VerifyPatient")! 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 Only Name
import requests

url = "https://api.rebateright.com.au/VerifyPatient"

payload = {
    "PatientDateOfBirth": "1980-01-01",
    "PatientFamilyName": "Devo",
    "PatientGivenName": "ONLYNAME",
    "PatientSex": "1",
    "PatientMedicareNumber": "2297460337",
    "PatientMedicareRefNumber": "1"
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Only Name
const url = 'https://api.rebateright.com.au/VerifyPatient';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"PatientDateOfBirth":"1980-01-01","PatientFamilyName":"Devo","PatientGivenName":"ONLYNAME","PatientSex":"1","PatientMedicareNumber":"2297460337","PatientMedicareRefNumber":"1"}'
};

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

```go Only Name
package main

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

func main() {

	url := "https://api.rebateright.com.au/VerifyPatient"

	payload := strings.NewReader("{\n  \"PatientDateOfBirth\": \"1980-01-01\",\n  \"PatientFamilyName\": \"Devo\",\n  \"PatientGivenName\": \"ONLYNAME\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"2297460337\",\n  \"PatientMedicareRefNumber\": \"1\"\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 Only Name
require 'uri'
require 'net/http'

url = URI("https://api.rebateright.com.au/VerifyPatient")

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  \"PatientDateOfBirth\": \"1980-01-01\",\n  \"PatientFamilyName\": \"Devo\",\n  \"PatientGivenName\": \"ONLYNAME\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"2297460337\",\n  \"PatientMedicareRefNumber\": \"1\"\n}"

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

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

HttpResponse<String> response = Unirest.post("https://api.rebateright.com.au/VerifyPatient")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"PatientDateOfBirth\": \"1980-01-01\",\n  \"PatientFamilyName\": \"Devo\",\n  \"PatientGivenName\": \"ONLYNAME\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"2297460337\",\n  \"PatientMedicareRefNumber\": \"1\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.rebateright.com.au/VerifyPatient', [
  'body' => '{
  "PatientDateOfBirth": "1980-01-01",
  "PatientFamilyName": "Devo",
  "PatientGivenName": "ONLYNAME",
  "PatientSex": "1",
  "PatientMedicareNumber": "2297460337",
  "PatientMedicareRefNumber": "1"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Only Name
using RestSharp;

var client = new RestClient("https://api.rebateright.com.au/VerifyPatient");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"PatientDateOfBirth\": \"1980-01-01\",\n  \"PatientFamilyName\": \"Devo\",\n  \"PatientGivenName\": \"ONLYNAME\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"2297460337\",\n  \"PatientMedicareRefNumber\": \"1\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Only Name
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "PatientDateOfBirth": "1980-01-01",
  "PatientFamilyName": "Devo",
  "PatientGivenName": "ONLYNAME",
  "PatientSex": "1",
  "PatientMedicareNumber": "2297460337",
  "PatientMedicareRefNumber": "1"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.rebateright.com.au/VerifyPatient")! 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 Deceased Patient
import requests

url = "https://api.rebateright.com.au/VerifyPatient"

payload = {
    "PatientDateOfBirth": "1964-09-15",
    "PatientFamilyName": "Jones",
    "PatientGivenName": "Sad",
    "PatientSex": "1",
    "PatientMedicareNumber": "2296510128",
    "PatientMedicareRefNumber": "4"
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Deceased Patient
const url = 'https://api.rebateright.com.au/VerifyPatient';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"PatientDateOfBirth":"1964-09-15","PatientFamilyName":"Jones","PatientGivenName":"Sad","PatientSex":"1","PatientMedicareNumber":"2296510128","PatientMedicareRefNumber":"4"}'
};

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

```go Deceased Patient
package main

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

func main() {

	url := "https://api.rebateright.com.au/VerifyPatient"

	payload := strings.NewReader("{\n  \"PatientDateOfBirth\": \"1964-09-15\",\n  \"PatientFamilyName\": \"Jones\",\n  \"PatientGivenName\": \"Sad\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"2296510128\",\n  \"PatientMedicareRefNumber\": \"4\"\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 Deceased Patient
require 'uri'
require 'net/http'

url = URI("https://api.rebateright.com.au/VerifyPatient")

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  \"PatientDateOfBirth\": \"1964-09-15\",\n  \"PatientFamilyName\": \"Jones\",\n  \"PatientGivenName\": \"Sad\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"2296510128\",\n  \"PatientMedicareRefNumber\": \"4\"\n}"

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

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

HttpResponse<String> response = Unirest.post("https://api.rebateright.com.au/VerifyPatient")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"PatientDateOfBirth\": \"1964-09-15\",\n  \"PatientFamilyName\": \"Jones\",\n  \"PatientGivenName\": \"Sad\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"2296510128\",\n  \"PatientMedicareRefNumber\": \"4\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.rebateright.com.au/VerifyPatient', [
  'body' => '{
  "PatientDateOfBirth": "1964-09-15",
  "PatientFamilyName": "Jones",
  "PatientGivenName": "Sad",
  "PatientSex": "1",
  "PatientMedicareNumber": "2296510128",
  "PatientMedicareRefNumber": "4"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Deceased Patient
using RestSharp;

var client = new RestClient("https://api.rebateright.com.au/VerifyPatient");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"PatientDateOfBirth\": \"1964-09-15\",\n  \"PatientFamilyName\": \"Jones\",\n  \"PatientGivenName\": \"Sad\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"2296510128\",\n  \"PatientMedicareRefNumber\": \"4\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Deceased Patient
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "PatientDateOfBirth": "1964-09-15",
  "PatientFamilyName": "Jones",
  "PatientGivenName": "Sad",
  "PatientSex": "1",
  "PatientMedicareNumber": "2296510128",
  "PatientMedicareRefNumber": "4"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.rebateright.com.au/VerifyPatient")! 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 New Medicare Card
import requests

url = "https://api.rebateright.com.au/VerifyPatient"

payload = {
    "PatientDateOfBirth": "2000-09-12",
    "PatientFamilyName": "Harris",
    "PatientGivenName": "Sam",
    "PatientSex": "2",
    "PatientMedicareNumber": "6951393261",
    "PatientMedicareRefNumber": "3"
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript New Medicare Card
const url = 'https://api.rebateright.com.au/VerifyPatient';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"PatientDateOfBirth":"2000-09-12","PatientFamilyName":"Harris","PatientGivenName":"Sam","PatientSex":"2","PatientMedicareNumber":"6951393261","PatientMedicareRefNumber":"3"}'
};

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

```go New Medicare Card
package main

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

func main() {

	url := "https://api.rebateright.com.au/VerifyPatient"

	payload := strings.NewReader("{\n  \"PatientDateOfBirth\": \"2000-09-12\",\n  \"PatientFamilyName\": \"Harris\",\n  \"PatientGivenName\": \"Sam\",\n  \"PatientSex\": \"2\",\n  \"PatientMedicareNumber\": \"6951393261\",\n  \"PatientMedicareRefNumber\": \"3\"\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 New Medicare Card
require 'uri'
require 'net/http'

url = URI("https://api.rebateright.com.au/VerifyPatient")

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  \"PatientDateOfBirth\": \"2000-09-12\",\n  \"PatientFamilyName\": \"Harris\",\n  \"PatientGivenName\": \"Sam\",\n  \"PatientSex\": \"2\",\n  \"PatientMedicareNumber\": \"6951393261\",\n  \"PatientMedicareRefNumber\": \"3\"\n}"

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

```java New Medicare Card
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.rebateright.com.au/VerifyPatient")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"PatientDateOfBirth\": \"2000-09-12\",\n  \"PatientFamilyName\": \"Harris\",\n  \"PatientGivenName\": \"Sam\",\n  \"PatientSex\": \"2\",\n  \"PatientMedicareNumber\": \"6951393261\",\n  \"PatientMedicareRefNumber\": \"3\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.rebateright.com.au/VerifyPatient', [
  'body' => '{
  "PatientDateOfBirth": "2000-09-12",
  "PatientFamilyName": "Harris",
  "PatientGivenName": "Sam",
  "PatientSex": "2",
  "PatientMedicareNumber": "6951393261",
  "PatientMedicareRefNumber": "3"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp New Medicare Card
using RestSharp;

var client = new RestClient("https://api.rebateright.com.au/VerifyPatient");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"PatientDateOfBirth\": \"2000-09-12\",\n  \"PatientFamilyName\": \"Harris\",\n  \"PatientGivenName\": \"Sam\",\n  \"PatientSex\": \"2\",\n  \"PatientMedicareNumber\": \"6951393261\",\n  \"PatientMedicareRefNumber\": \"3\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift New Medicare Card
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "PatientDateOfBirth": "2000-09-12",
  "PatientFamilyName": "Harris",
  "PatientGivenName": "Sam",
  "PatientSex": "2",
  "PatientMedicareNumber": "6951393261",
  "PatientMedicareRefNumber": "3"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.rebateright.com.au/VerifyPatient")! 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 Incorrect Given Name
import requests

url = "https://api.rebateright.com.au/VerifyPatient"

payload = {
    "PatientDateOfBirth": "2009-02-08",
    "PatientFamilyName": "FLETCHER",
    "PatientGivenName": "PETER",
    "PatientSex": "1",
    "PatientMedicareNumber": "4951525561",
    "PatientMedicareRefNumber": "3"
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Incorrect Given Name
const url = 'https://api.rebateright.com.au/VerifyPatient';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"PatientDateOfBirth":"2009-02-08","PatientFamilyName":"FLETCHER","PatientGivenName":"PETER","PatientSex":"1","PatientMedicareNumber":"4951525561","PatientMedicareRefNumber":"3"}'
};

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

```go Incorrect Given Name
package main

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

func main() {

	url := "https://api.rebateright.com.au/VerifyPatient"

	payload := strings.NewReader("{\n  \"PatientDateOfBirth\": \"2009-02-08\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"PETER\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"3\"\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 Incorrect Given Name
require 'uri'
require 'net/http'

url = URI("https://api.rebateright.com.au/VerifyPatient")

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  \"PatientDateOfBirth\": \"2009-02-08\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"PETER\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"3\"\n}"

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

```java Incorrect Given Name
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.rebateright.com.au/VerifyPatient")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"PatientDateOfBirth\": \"2009-02-08\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"PETER\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"3\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.rebateright.com.au/VerifyPatient', [
  'body' => '{
  "PatientDateOfBirth": "2009-02-08",
  "PatientFamilyName": "FLETCHER",
  "PatientGivenName": "PETER",
  "PatientSex": "1",
  "PatientMedicareNumber": "4951525561",
  "PatientMedicareRefNumber": "3"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Incorrect Given Name
using RestSharp;

var client = new RestClient("https://api.rebateright.com.au/VerifyPatient");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"PatientDateOfBirth\": \"2009-02-08\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"PETER\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"3\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Incorrect Given Name
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "PatientDateOfBirth": "2009-02-08",
  "PatientFamilyName": "FLETCHER",
  "PatientGivenName": "PETER",
  "PatientSex": "1",
  "PatientMedicareNumber": "4951525561",
  "PatientMedicareRefNumber": "3"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.rebateright.com.au/VerifyPatient")! 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 Incorrect Reference Number
import requests

url = "https://api.rebateright.com.au/VerifyPatient"

payload = {
    "PatientDateOfBirth": "2009-02-08",
    "PatientFamilyName": "FLETCHER",
    "PatientGivenName": "Clint",
    "PatientSex": "1",
    "PatientMedicareNumber": "4951525561",
    "PatientMedicareRefNumber": "1"
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Incorrect Reference Number
const url = 'https://api.rebateright.com.au/VerifyPatient';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"PatientDateOfBirth":"2009-02-08","PatientFamilyName":"FLETCHER","PatientGivenName":"Clint","PatientSex":"1","PatientMedicareNumber":"4951525561","PatientMedicareRefNumber":"1"}'
};

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

```go Incorrect Reference Number
package main

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

func main() {

	url := "https://api.rebateright.com.au/VerifyPatient"

	payload := strings.NewReader("{\n  \"PatientDateOfBirth\": \"2009-02-08\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"Clint\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"1\"\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 Incorrect Reference Number
require 'uri'
require 'net/http'

url = URI("https://api.rebateright.com.au/VerifyPatient")

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  \"PatientDateOfBirth\": \"2009-02-08\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"Clint\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"1\"\n}"

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

```java Incorrect Reference Number
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.rebateright.com.au/VerifyPatient")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"PatientDateOfBirth\": \"2009-02-08\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"Clint\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"1\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.rebateright.com.au/VerifyPatient', [
  'body' => '{
  "PatientDateOfBirth": "2009-02-08",
  "PatientFamilyName": "FLETCHER",
  "PatientGivenName": "Clint",
  "PatientSex": "1",
  "PatientMedicareNumber": "4951525561",
  "PatientMedicareRefNumber": "1"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Incorrect Reference Number
using RestSharp;

var client = new RestClient("https://api.rebateright.com.au/VerifyPatient");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"PatientDateOfBirth\": \"2009-02-08\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"Clint\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"1\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Incorrect Reference Number
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "PatientDateOfBirth": "2009-02-08",
  "PatientFamilyName": "FLETCHER",
  "PatientGivenName": "Clint",
  "PatientSex": "1",
  "PatientMedicareNumber": "4951525561",
  "PatientMedicareRefNumber": "1"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.rebateright.com.au/VerifyPatient")! 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 Incorrect Date of Birth
import requests

url = "https://api.rebateright.com.au/VerifyPatient"

payload = {
    "PatientDateOfBirth": "1990-01-01",
    "PatientFamilyName": "FLETCHER",
    "PatientGivenName": "Edmond",
    "PatientSex": "1",
    "PatientMedicareNumber": "4951525561",
    "PatientMedicareRefNumber": "2"
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Incorrect Date of Birth
const url = 'https://api.rebateright.com.au/VerifyPatient';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"PatientDateOfBirth":"1990-01-01","PatientFamilyName":"FLETCHER","PatientGivenName":"Edmond","PatientSex":"1","PatientMedicareNumber":"4951525561","PatientMedicareRefNumber":"2"}'
};

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

```go Incorrect Date of Birth
package main

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

func main() {

	url := "https://api.rebateright.com.au/VerifyPatient"

	payload := strings.NewReader("{\n  \"PatientDateOfBirth\": \"1990-01-01\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"Edmond\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"2\"\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 Incorrect Date of Birth
require 'uri'
require 'net/http'

url = URI("https://api.rebateright.com.au/VerifyPatient")

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  \"PatientDateOfBirth\": \"1990-01-01\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"Edmond\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"2\"\n}"

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

```java Incorrect Date of Birth
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.rebateright.com.au/VerifyPatient")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"PatientDateOfBirth\": \"1990-01-01\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"Edmond\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"2\"\n}")
  .asString();
```

```php Incorrect Date of Birth
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.rebateright.com.au/VerifyPatient', [
  'body' => '{
  "PatientDateOfBirth": "1990-01-01",
  "PatientFamilyName": "FLETCHER",
  "PatientGivenName": "Edmond",
  "PatientSex": "1",
  "PatientMedicareNumber": "4951525561",
  "PatientMedicareRefNumber": "2"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Incorrect Date of Birth
using RestSharp;

var client = new RestClient("https://api.rebateright.com.au/VerifyPatient");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"PatientDateOfBirth\": \"1990-01-01\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"Edmond\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"2\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Incorrect Date of Birth
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "PatientDateOfBirth": "1990-01-01",
  "PatientFamilyName": "FLETCHER",
  "PatientGivenName": "Edmond",
  "PatientSex": "1",
  "PatientMedicareNumber": "4951525561",
  "PatientMedicareRefNumber": "2"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.rebateright.com.au/VerifyPatient")! 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 Incorrect Medicare Number
import requests

url = "https://api.rebateright.com.au/VerifyPatient"

payload = {
    "PatientDateOfBirth": "1979-09-13",
    "PatientFamilyName": "Doe",
    "PatientGivenName": "John",
    "PatientSex": "1",
    "PatientMedicareNumber": "2398125261",
    "PatientMedicareRefNumber": "1"
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Incorrect Medicare Number
const url = 'https://api.rebateright.com.au/VerifyPatient';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"PatientDateOfBirth":"1979-09-13","PatientFamilyName":"Doe","PatientGivenName":"John","PatientSex":"1","PatientMedicareNumber":"2398125261","PatientMedicareRefNumber":"1"}'
};

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

```go Incorrect Medicare Number
package main

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

func main() {

	url := "https://api.rebateright.com.au/VerifyPatient"

	payload := strings.NewReader("{\n  \"PatientDateOfBirth\": \"1979-09-13\",\n  \"PatientFamilyName\": \"Doe\",\n  \"PatientGivenName\": \"John\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"2398125261\",\n  \"PatientMedicareRefNumber\": \"1\"\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 Incorrect Medicare Number
require 'uri'
require 'net/http'

url = URI("https://api.rebateright.com.au/VerifyPatient")

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  \"PatientDateOfBirth\": \"1979-09-13\",\n  \"PatientFamilyName\": \"Doe\",\n  \"PatientGivenName\": \"John\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"2398125261\",\n  \"PatientMedicareRefNumber\": \"1\"\n}"

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

```java Incorrect Medicare Number
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.rebateright.com.au/VerifyPatient")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"PatientDateOfBirth\": \"1979-09-13\",\n  \"PatientFamilyName\": \"Doe\",\n  \"PatientGivenName\": \"John\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"2398125261\",\n  \"PatientMedicareRefNumber\": \"1\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.rebateright.com.au/VerifyPatient', [
  'body' => '{
  "PatientDateOfBirth": "1979-09-13",
  "PatientFamilyName": "Doe",
  "PatientGivenName": "John",
  "PatientSex": "1",
  "PatientMedicareNumber": "2398125261",
  "PatientMedicareRefNumber": "1"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Incorrect Medicare Number
using RestSharp;

var client = new RestClient("https://api.rebateright.com.au/VerifyPatient");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"PatientDateOfBirth\": \"1979-09-13\",\n  \"PatientFamilyName\": \"Doe\",\n  \"PatientGivenName\": \"John\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"2398125261\",\n  \"PatientMedicareRefNumber\": \"1\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Incorrect Medicare Number
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "PatientDateOfBirth": "1979-09-13",
  "PatientFamilyName": "Doe",
  "PatientGivenName": "John",
  "PatientSex": "1",
  "PatientMedicareNumber": "2398125261",
  "PatientMedicareRefNumber": "1"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.rebateright.com.au/VerifyPatient")! 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 Incorrect Gender (Accepted)
import requests

url = "https://api.rebateright.com.au/VerifyPatient"

payload = {
    "PatientDateOfBirth": "1986-12-18",
    "PatientFamilyName": "FLETCHER",
    "PatientGivenName": "Edmond",
    "PatientSex": "2",
    "PatientMedicareNumber": "4951525561",
    "PatientMedicareRefNumber": "2"
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Incorrect Gender (Accepted)
const url = 'https://api.rebateright.com.au/VerifyPatient';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"PatientDateOfBirth":"1986-12-18","PatientFamilyName":"FLETCHER","PatientGivenName":"Edmond","PatientSex":"2","PatientMedicareNumber":"4951525561","PatientMedicareRefNumber":"2"}'
};

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

```go Incorrect Gender (Accepted)
package main

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

func main() {

	url := "https://api.rebateright.com.au/VerifyPatient"

	payload := strings.NewReader("{\n  \"PatientDateOfBirth\": \"1986-12-18\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"Edmond\",\n  \"PatientSex\": \"2\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"2\"\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 Incorrect Gender (Accepted)
require 'uri'
require 'net/http'

url = URI("https://api.rebateright.com.au/VerifyPatient")

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  \"PatientDateOfBirth\": \"1986-12-18\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"Edmond\",\n  \"PatientSex\": \"2\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"2\"\n}"

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

```java Incorrect Gender (Accepted)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.rebateright.com.au/VerifyPatient")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"PatientDateOfBirth\": \"1986-12-18\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"Edmond\",\n  \"PatientSex\": \"2\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"2\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.rebateright.com.au/VerifyPatient', [
  'body' => '{
  "PatientDateOfBirth": "1986-12-18",
  "PatientFamilyName": "FLETCHER",
  "PatientGivenName": "Edmond",
  "PatientSex": "2",
  "PatientMedicareNumber": "4951525561",
  "PatientMedicareRefNumber": "2"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Incorrect Gender (Accepted)
using RestSharp;

var client = new RestClient("https://api.rebateright.com.au/VerifyPatient");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"PatientDateOfBirth\": \"1986-12-18\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"Edmond\",\n  \"PatientSex\": \"2\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"2\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Incorrect Gender (Accepted)
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "PatientDateOfBirth": "1986-12-18",
  "PatientFamilyName": "FLETCHER",
  "PatientGivenName": "Edmond",
  "PatientSex": "2",
  "PatientMedicareNumber": "4951525561",
  "PatientMedicareRefNumber": "2"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.rebateright.com.au/VerifyPatient")! 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 Incorrect Gender and Given Name
import requests

url = "https://api.rebateright.com.au/VerifyPatient"

payload = {
    "PatientDateOfBirth": "2009-02-08",
    "PatientFamilyName": "FLETCHER",
    "PatientGivenName": "PETER",
    "PatientSex": "2",
    "PatientMedicareNumber": "4951525561",
    "PatientMedicareRefNumber": "3"
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Incorrect Gender and Given Name
const url = 'https://api.rebateright.com.au/VerifyPatient';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"PatientDateOfBirth":"2009-02-08","PatientFamilyName":"FLETCHER","PatientGivenName":"PETER","PatientSex":"2","PatientMedicareNumber":"4951525561","PatientMedicareRefNumber":"3"}'
};

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

```go Incorrect Gender and Given Name
package main

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

func main() {

	url := "https://api.rebateright.com.au/VerifyPatient"

	payload := strings.NewReader("{\n  \"PatientDateOfBirth\": \"2009-02-08\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"PETER\",\n  \"PatientSex\": \"2\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"3\"\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 Incorrect Gender and Given Name
require 'uri'
require 'net/http'

url = URI("https://api.rebateright.com.au/VerifyPatient")

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  \"PatientDateOfBirth\": \"2009-02-08\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"PETER\",\n  \"PatientSex\": \"2\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"3\"\n}"

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

```java Incorrect Gender and Given Name
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.rebateright.com.au/VerifyPatient")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"PatientDateOfBirth\": \"2009-02-08\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"PETER\",\n  \"PatientSex\": \"2\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"3\"\n}")
  .asString();
```

```php Incorrect Gender and Given Name
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.rebateright.com.au/VerifyPatient', [
  'body' => '{
  "PatientDateOfBirth": "2009-02-08",
  "PatientFamilyName": "FLETCHER",
  "PatientGivenName": "PETER",
  "PatientSex": "2",
  "PatientMedicareNumber": "4951525561",
  "PatientMedicareRefNumber": "3"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Incorrect Gender and Given Name
using RestSharp;

var client = new RestClient("https://api.rebateright.com.au/VerifyPatient");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"PatientDateOfBirth\": \"2009-02-08\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"PETER\",\n  \"PatientSex\": \"2\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"3\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Incorrect Gender and Given Name
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "PatientDateOfBirth": "2009-02-08",
  "PatientFamilyName": "FLETCHER",
  "PatientGivenName": "PETER",
  "PatientSex": "2",
  "PatientMedicareNumber": "4951525561",
  "PatientMedicareRefNumber": "3"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.rebateright.com.au/VerifyPatient")! 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 Incorrect Given and Family Name
import requests

url = "https://api.rebateright.com.au/VerifyPatient"

payload = {
    "PatientDateOfBirth": "2009-02-08",
    "PatientFamilyName": "SMITH",
    "PatientGivenName": "PETER",
    "PatientSex": "1",
    "PatientMedicareNumber": "4951525561",
    "PatientMedicareRefNumber": "3"
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Incorrect Given and Family Name
const url = 'https://api.rebateright.com.au/VerifyPatient';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"PatientDateOfBirth":"2009-02-08","PatientFamilyName":"SMITH","PatientGivenName":"PETER","PatientSex":"1","PatientMedicareNumber":"4951525561","PatientMedicareRefNumber":"3"}'
};

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

```go Incorrect Given and Family Name
package main

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

func main() {

	url := "https://api.rebateright.com.au/VerifyPatient"

	payload := strings.NewReader("{\n  \"PatientDateOfBirth\": \"2009-02-08\",\n  \"PatientFamilyName\": \"SMITH\",\n  \"PatientGivenName\": \"PETER\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"3\"\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 Incorrect Given and Family Name
require 'uri'
require 'net/http'

url = URI("https://api.rebateright.com.au/VerifyPatient")

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  \"PatientDateOfBirth\": \"2009-02-08\",\n  \"PatientFamilyName\": \"SMITH\",\n  \"PatientGivenName\": \"PETER\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"3\"\n}"

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

```java Incorrect Given and Family Name
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.rebateright.com.au/VerifyPatient")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"PatientDateOfBirth\": \"2009-02-08\",\n  \"PatientFamilyName\": \"SMITH\",\n  \"PatientGivenName\": \"PETER\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"3\"\n}")
  .asString();
```

```php Incorrect Given and Family Name
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.rebateright.com.au/VerifyPatient', [
  'body' => '{
  "PatientDateOfBirth": "2009-02-08",
  "PatientFamilyName": "SMITH",
  "PatientGivenName": "PETER",
  "PatientSex": "1",
  "PatientMedicareNumber": "4951525561",
  "PatientMedicareRefNumber": "3"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Incorrect Given and Family Name
using RestSharp;

var client = new RestClient("https://api.rebateright.com.au/VerifyPatient");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"PatientDateOfBirth\": \"2009-02-08\",\n  \"PatientFamilyName\": \"SMITH\",\n  \"PatientGivenName\": \"PETER\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"3\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Incorrect Given and Family Name
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "PatientDateOfBirth": "2009-02-08",
  "PatientFamilyName": "SMITH",
  "PatientGivenName": "PETER",
  "PatientSex": "1",
  "PatientMedicareNumber": "4951525561",
  "PatientMedicareRefNumber": "3"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.rebateright.com.au/VerifyPatient")! 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 Incorrect Family Name (Accepted)
import requests

url = "https://api.rebateright.com.au/VerifyPatient"

payload = {
    "PatientDateOfBirth": "1986-12-18",
    "PatientFamilyName": "SMITH",
    "PatientGivenName": "Edmond",
    "PatientSex": "1",
    "PatientMedicareNumber": "4951525561",
    "PatientMedicareRefNumber": "2"
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Incorrect Family Name (Accepted)
const url = 'https://api.rebateright.com.au/VerifyPatient';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"PatientDateOfBirth":"1986-12-18","PatientFamilyName":"SMITH","PatientGivenName":"Edmond","PatientSex":"1","PatientMedicareNumber":"4951525561","PatientMedicareRefNumber":"2"}'
};

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

```go Incorrect Family Name (Accepted)
package main

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

func main() {

	url := "https://api.rebateright.com.au/VerifyPatient"

	payload := strings.NewReader("{\n  \"PatientDateOfBirth\": \"1986-12-18\",\n  \"PatientFamilyName\": \"SMITH\",\n  \"PatientGivenName\": \"Edmond\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"2\"\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 Incorrect Family Name (Accepted)
require 'uri'
require 'net/http'

url = URI("https://api.rebateright.com.au/VerifyPatient")

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  \"PatientDateOfBirth\": \"1986-12-18\",\n  \"PatientFamilyName\": \"SMITH\",\n  \"PatientGivenName\": \"Edmond\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"2\"\n}"

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

```java Incorrect Family Name (Accepted)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.rebateright.com.au/VerifyPatient")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"PatientDateOfBirth\": \"1986-12-18\",\n  \"PatientFamilyName\": \"SMITH\",\n  \"PatientGivenName\": \"Edmond\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"2\"\n}")
  .asString();
```

```php Incorrect Family Name (Accepted)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.rebateright.com.au/VerifyPatient', [
  'body' => '{
  "PatientDateOfBirth": "1986-12-18",
  "PatientFamilyName": "SMITH",
  "PatientGivenName": "Edmond",
  "PatientSex": "1",
  "PatientMedicareNumber": "4951525561",
  "PatientMedicareRefNumber": "2"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Incorrect Family Name (Accepted)
using RestSharp;

var client = new RestClient("https://api.rebateright.com.au/VerifyPatient");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"PatientDateOfBirth\": \"1986-12-18\",\n  \"PatientFamilyName\": \"SMITH\",\n  \"PatientGivenName\": \"Edmond\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"2\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Incorrect Family Name (Accepted)
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "PatientDateOfBirth": "1986-12-18",
  "PatientFamilyName": "SMITH",
  "PatientGivenName": "Edmond",
  "PatientSex": "1",
  "PatientMedicareNumber": "4951525561",
  "PatientMedicareRefNumber": "2"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.rebateright.com.au/VerifyPatient")! 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 Incorrect Gender and Family Name (Accepted)
import requests

url = "https://api.rebateright.com.au/VerifyPatient"

payload = {
    "PatientDateOfBirth": "1986-12-18",
    "PatientFamilyName": "SMITH",
    "PatientGivenName": "Edmond",
    "PatientSex": "2",
    "PatientMedicareNumber": "4951525561",
    "PatientMedicareRefNumber": "2"
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Incorrect Gender and Family Name (Accepted)
const url = 'https://api.rebateright.com.au/VerifyPatient';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"PatientDateOfBirth":"1986-12-18","PatientFamilyName":"SMITH","PatientGivenName":"Edmond","PatientSex":"2","PatientMedicareNumber":"4951525561","PatientMedicareRefNumber":"2"}'
};

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

```go Incorrect Gender and Family Name (Accepted)
package main

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

func main() {

	url := "https://api.rebateright.com.au/VerifyPatient"

	payload := strings.NewReader("{\n  \"PatientDateOfBirth\": \"1986-12-18\",\n  \"PatientFamilyName\": \"SMITH\",\n  \"PatientGivenName\": \"Edmond\",\n  \"PatientSex\": \"2\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"2\"\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 Incorrect Gender and Family Name (Accepted)
require 'uri'
require 'net/http'

url = URI("https://api.rebateright.com.au/VerifyPatient")

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  \"PatientDateOfBirth\": \"1986-12-18\",\n  \"PatientFamilyName\": \"SMITH\",\n  \"PatientGivenName\": \"Edmond\",\n  \"PatientSex\": \"2\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"2\"\n}"

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

```java Incorrect Gender and Family Name (Accepted)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.rebateright.com.au/VerifyPatient")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"PatientDateOfBirth\": \"1986-12-18\",\n  \"PatientFamilyName\": \"SMITH\",\n  \"PatientGivenName\": \"Edmond\",\n  \"PatientSex\": \"2\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"2\"\n}")
  .asString();
```

```php Incorrect Gender and Family Name (Accepted)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.rebateright.com.au/VerifyPatient', [
  'body' => '{
  "PatientDateOfBirth": "1986-12-18",
  "PatientFamilyName": "SMITH",
  "PatientGivenName": "Edmond",
  "PatientSex": "2",
  "PatientMedicareNumber": "4951525561",
  "PatientMedicareRefNumber": "2"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Incorrect Gender and Family Name (Accepted)
using RestSharp;

var client = new RestClient("https://api.rebateright.com.au/VerifyPatient");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"PatientDateOfBirth\": \"1986-12-18\",\n  \"PatientFamilyName\": \"SMITH\",\n  \"PatientGivenName\": \"Edmond\",\n  \"PatientSex\": \"2\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"2\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Incorrect Gender and Family Name (Accepted)
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "PatientDateOfBirth": "1986-12-18",
  "PatientFamilyName": "SMITH",
  "PatientGivenName": "Edmond",
  "PatientSex": "2",
  "PatientMedicareNumber": "4951525561",
  "PatientMedicareRefNumber": "2"
] as [String : Any]

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

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