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.

# Calculate Rebate

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

Runs a single, combined **patient verification** and **per-item rebate calculation** for up to 50 MBS items.
Behind the scenes this call orchestrates three services:

- **Medicare Patient Verification** — confirms patient identity against Medicare.
- **Medicare Online Eligibility Check (OECW)** — asks Medicare whether benefit is payable.
- **RebateRight Rules Engine** — applies MBS rules (age / sex restrictions, referrer specialty, coning,
  in-hospital vs out-of-hospital, frequency limits, etc.) and returns a plain-language reason.

## 📑 Response shape

- **`PatientVerification`** — `null` when no identity check ran (e.g. request failed RebateRight-side validation).
  Otherwise describes the Medicare patient-verification outcome; when Medicare corrects a detail (name, DOB, card
  number, etc.) the corrected value is echoed on the matching `Correct…` field.
- **`Rebates`** — one entry per submitted item, in request order. `IsEligible` is **tri-state**: `true` (eligible),
  `false` (not eligible), `null` (cannot determine — usually a missing dependency like `ReferrerProviderNumber`).
- **`Reason`** — top-level summary; mirrors `PatientVerification.Reason` when the patient check ran.

Every `Reason` string is prefixed with **`[RebateRight]`** (rules-engine output) and/or **`[Medicare]`** (passthrough
from Medicare) so integrators can attribute each sentence to its source.

## 💰 Amounts are dollar strings

`Benefit` and `ItemScheduleFee` are returned as **decimal strings in dollars** (for example `"20.05"`) — **not**
cents. This is distinct from RebateRight's Bulk Bill reports, which report amounts in cents.

## 📏 Request limits

Up to **50 items** per request, grouped into up to **16 medical events** (via `MedicalEventId`) with up to
**14 items per event**.


Reference: https://docs.rebateright.com.au/api-reference/medicare-eligibility/calculate-rebate

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /CalculateRebate:
    post:
      operationId: calculate-rebate
      summary: Calculate Rebate
      description: >
        Runs a single, combined **patient verification** and **per-item rebate
        calculation** for up to 50 MBS items.

        Behind the scenes this call orchestrates three services:


        - **Medicare Patient Verification** — confirms patient identity against
        Medicare.

        - **Medicare Online Eligibility Check (OECW)** — asks Medicare whether
        benefit is payable.

        - **RebateRight Rules Engine** — applies MBS rules (age / sex
        restrictions, referrer specialty, coning,
          in-hospital vs out-of-hospital, frequency limits, etc.) and returns a plain-language reason.

        ## 📑 Response shape


        - **`PatientVerification`** — `null` when no identity check ran (e.g.
        request failed RebateRight-side validation).
          Otherwise describes the Medicare patient-verification outcome; when Medicare corrects a detail (name, DOB, card
          number, etc.) the corrected value is echoed on the matching `Correct…` field.
        - **`Rebates`** — one entry per submitted item, in request order.
        `IsEligible` is **tri-state**: `true` (eligible),
          `false` (not eligible), `null` (cannot determine — usually a missing dependency like `ReferrerProviderNumber`).
        - **`Reason`** — top-level summary; mirrors `PatientVerification.Reason`
        when the patient check ran.


        Every `Reason` string is prefixed with **`[RebateRight]`** (rules-engine
        output) and/or **`[Medicare]`** (passthrough

        from Medicare) so integrators can attribute each sentence to its source.


        ## 💰 Amounts are dollar strings


        `Benefit` and `ItemScheduleFee` are returned as **decimal strings in
        dollars** (for example `"20.05"`) — **not**

        cents. This is distinct from RebateRight's Bulk Bill reports, which
        report amounts in cents.


        ## 📏 Request limits


        Up to **50 items** per request, grouped into up to **16 medical events**
        (via `MedicalEventId`) with up to

        **14 items per event**.
      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_Calculate
                  Rebate_Response_200
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                DateOfService:
                  type: string
                  format: date
                  description: >-
                    Date the service was / will be performed (`YYYY-MM-DD`).
                    Defaults to today when omitted. Cannot be in the future or
                    more than 2 years in the past.
                InHospitalTreatment:
                  type: boolean
                  description: >-
                    Whether the service is provided to an in-hospital patient.
                    Drives the in-hospital vs out-of-hospital rebate percentage
                    and several MBS restriction rules.
                BulkBilled:
                  type: boolean
                  description: >-
                    Optional. Indicates the service will be bulk-billed. Used
                    only by rules that differ between bulk-bill and
                    non-bulk-bill scenarios.
                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.
                PatientGivenName:
                  type: string
                  description: Patient first given name as it appears on the Medicare card.
                PatientSex:
                  $ref: >-
                    #/components/schemas/CalculateRebatePostRequestBodyContentApplicationJsonSchemaPatientSex
                  description: |
                    Patient sex (Services Australia coding).

                    | Code | Meaning |
                    |---|---|
                    | `1` | Male |
                    | `2` | Female |
                    | `3` | Other |
                    | `9` | Not stated / inadequately described |
                PatientMedicareNumber:
                  type: string
                  description: Patient's 10-digit Medicare card number.
                PatientMedicareRefNumber:
                  type: string
                  description: >-
                    Individual Reference Number (IRN) from the patient's
                    Medicare card — a single digit identifying the family
                    member.
                ReferrerProviderNumber:
                  type: string
                  description: >-
                    Referring provider's Medicare provider number. Required when
                    any requested item has a referrer restriction; omit it and
                    the affected items will come back with a null `IsEligible`
                    and a `Reason` explaining that the referrer could not be
                    validated.
                ServicingProviderNumber:
                  type: string
                  description: >-
                    Provider number of the health professional who performs the
                    service.
                PrincipalProviderNumber:
                  type: string
                  description: >-
                    Provider number of the practice / principal provider the
                    service is billed under. Often the same as
                    `ServicingProviderNumber`.
                MedicareItems:
                  type: array
                  items:
                    $ref: >-
                      #/components/schemas/CalculateRebatePostRequestBodyContentApplicationJsonSchemaMedicareItemsItems
                  description: >-
                    MBS items to evaluate. Up to **50 items total**, grouped
                    into up to **16 medical events** (via `MedicalEventId`) with
                    up to **14 items per event**.
              required:
                - InHospitalTreatment
                - PatientDateOfBirth
                - PatientFamilyName
                - PatientGivenName
                - PatientSex
                - PatientMedicareNumber
                - PatientMedicareRefNumber
                - ServicingProviderNumber
                - PrincipalProviderNumber
                - MedicareItems
servers:
  - url: https://api.rebateright.com.au
  - url: https://test-api.rebateright.com.au
components:
  schemas:
    CalculateRebatePostRequestBodyContentApplicationJsonSchemaPatientSex:
      type: string
      enum:
        - '1'
        - '2'
        - '3'
        - '9'
      description: |
        Patient sex (Services Australia coding).

        | Code | Meaning |
        |---|---|
        | `1` | Male |
        | `2` | Female |
        | `3` | Other |
        | `9` | Not stated / inadequately described |
      title: CalculateRebatePostRequestBodyContentApplicationJsonSchemaPatientSex
    CalculateRebatePostRequestBodyContentApplicationJsonSchemaMedicareItemsItems:
      type: object
      properties:
        ItemNumber:
          type: string
          description: Numeric MBS item number (`1`–`99999`, up to 5 digits).
        ChargeAmount:
          type: string
          description: >-
            Optional. Overrides the charge sent to Medicare for this item,
            expressed in **whole cents** as a numeric string (`100`–`999999`, no
            decimal, no spaces — `$1.00` is `"100"`, `$150.00` is `"15000"`).
            Minimum `"100"` (`$1.00`). When omitted, RebateRight supplies a high
            default so eligibility isn't masked by under-charging.
        MedicalEventId:
          type: string
          description: >-
            Optional. Groups items into the same medical event (same provider,
            same visit). Items sharing a value are sent to Medicare under one
            medical event; items with no `MedicalEventId` each become their own
            event. Useful for coning and same-day-rule evaluation.
        FieldQuantity:
          type: string
          description: >-
            Optional. Service quantity passed to Medicare as `fieldQuantity`.
            Leave unset for single-service items.
        NumberOfPatientsSeen:
          type: string
          description: >-
            Optional. Number of patients seen for a group attendance item
            (`1`–`99`).
        NotNormalAftercare:
          type: boolean
          description: >-
            Optional. Set to `true` to flag the service as **not normal
            aftercare** (sends `aftercareOverrideInd` = `Y` to Medicare). Use
            only when the aftercare rule genuinely doesn't apply.
        MoreThanOnceOnSameDay:
          type: boolean
          description: >-
            Optional. Set to `true` to override Medicare's duplicate-service
            rule when the same item legitimately happens more than once on the
            same day (sends `duplicateServiceOverrideInd` = `Y`).
        IgnoreItemRestrictions:
          type: boolean
          description: >-
            Optional. Overrides Medicare's item-restriction rule
            (`restrictionOverrideInd`). `true` sends `Y`, `false` sends `N`;
            omit to let Medicare apply the default.
        IgnoreTimeDependantRestrictions:
          type: boolean
          description: >-
            Optional. Overrides Medicare's time-dependant restriction rule
            (`timeDependantOverrideInd`). `true` sends `Y`, `false` sends `N`;
            omit to let Medicare apply the default.
        NonMBSItem:
          type: boolean
          description: >-
            Optional. Set to `true` to indicate the item is not an MBS-coded
            item, which suppresses the `serviceCodeTypeCode` = `C` flag on the
            Medicare payload.
      required:
        - ItemNumber
      description: >
        A single MBS item to evaluate.


        Only `ItemNumber` is required. The remaining fields are **optional
        service overrides** used when

        integrators need precise control over how the item is sent to Medicare
        or to group multiple items

        into the same medical event — ignore them all if you don't need that
        control.
      title: >-
        CalculateRebatePostRequestBodyContentApplicationJsonSchemaMedicareItemsItems
    CalculateRebatePostResponsesContentApplicationJsonSchemaPatientVerification:
      type: object
      properties:
        Verified:
          type: boolean
          description: >-
            `true` when Medicare confirms an exact identity match, `false` when
            Medicare accepted the check with corrections or found a mismatch.
        Reason:
          type: string
          description: >-
            Human-readable explanation of the verification outcome (prefixed
            `[Medicare]`).
        CorrectSex:
          type:
            - string
            - 'null'
          description: >-
            Corrected sex code when Medicare's records differ from what was
            submitted; `null` otherwise.
        CorrectGivenName:
          type:
            - string
            - 'null'
          description: >-
            Corrected given name when Medicare's records differ; `null`
            otherwise.
        CorrectFamilyName:
          type:
            - string
            - 'null'
          description: >-
            Corrected family name when Medicare's records differ; `null`
            otherwise.
        CorrectDateOfBirth:
          type:
            - string
            - 'null'
          description: >-
            Corrected date of birth (`YYYY-MM-DD`) when Medicare's records
            differ; `null` otherwise.
        CorrectMedicareNumber:
          type:
            - string
            - 'null'
          description: >-
            Corrected 10-digit Medicare card number when Medicare has re-issued
            the card or has a different number on file; `null` otherwise.
        CorrectMedicareReferenceNumber:
          type:
            - string
            - 'null'
          description: Corrected IRN when Medicare's records differ; `null` otherwise.
      required:
        - Verified
        - Reason
      description: >-
        Medicare patient-verification outcome, or `null` when no identity check
        ran (typically because the request failed RebateRight-side validation).
      title: >-
        CalculateRebatePostResponsesContentApplicationJsonSchemaPatientVerification
    CalculateRebatePostResponsesContentApplicationJsonSchemaRebatesItems:
      type: object
      properties:
        ItemNumber:
          type: string
          description: Echo of the submitted MBS item number.
        IsEligible:
          type:
            - boolean
            - 'null'
          description: >-
            Tri-state eligibility verdict. `true` means eligible, `false` means
            not eligible, and `null` means it cannot be determined — usually
            because of a missing dependency such as `ReferrerProviderNumber` for
            a referrer-restricted item. Always check `Reason` for the full
            explanation.
        Reason:
          type: string
          description: >-
            Human-readable explanation of the verdict. Sentences are prefixed
            with `[RebateRight]` (rules engine) or `[Medicare]` (passthrough
            from Medicare) so each piece of reasoning can be attributed to its
            source.
        Benefit:
          type: string
          description: >-
            Medicare benefit payable for this item, as a **dollar decimal
            string** (for example `"20.05"`). `"0"` when no benefit is payable.
        ItemScheduleFee:
          type:
            - string
            - 'null'
          description: >-
            MBS schedule fee for this item at `DateOfService`, as a **dollar
            decimal string** (for example `"452.05"`). `null` when the item
            number is unknown.
      required:
        - ItemNumber
        - IsEligible
        - Reason
        - Benefit
        - ItemScheduleFee
      title: CalculateRebatePostResponsesContentApplicationJsonSchemaRebatesItems
    Medicare Eligibility_Calculate Rebate_Response_200:
      type: object
      properties:
        PatientVerification:
          oneOf:
            - $ref: >-
                #/components/schemas/CalculateRebatePostResponsesContentApplicationJsonSchemaPatientVerification
            - type: 'null'
          description: >-
            Medicare patient-verification outcome, or `null` when no identity
            check ran (typically because the request failed RebateRight-side
            validation).
        Rebates:
          type: array
          items:
            $ref: >-
              #/components/schemas/CalculateRebatePostResponsesContentApplicationJsonSchemaRebatesItems
          description: >-
            One entry per submitted item, in the same order as `MedicareItems`.
            Empty when the request failed RebateRight-side validation.
        Reason:
          type: string
          description: >-
            Top-level summary reason. Mirrors `PatientVerification.Reason` when
            the identity check ran; on validation failure, describes the
            specific field / rule that failed (prefixed `[RebateRight]`).
      required:
        - PatientVerification
        - Rebates
        - Reason
      description: >-
        Eligibility result. On validation failure, `PatientVerification` is
        `null` and `Rebates` is an empty array — the failure is described in the
        top-level `Reason`.
      title: Medicare Eligibility_Calculate Rebate_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/CalculateRebate"

payload = {
    "InHospitalTreatment": False,
    "PatientDateOfBirth": "1986-12-18",
    "PatientFamilyName": "FLETCHER",
    "PatientGivenName": "Edmond",
    "PatientSex": "1",
    "PatientMedicareNumber": "4951525561",
    "PatientMedicareRefNumber": "2",
    "ServicingProviderNumber": "2447781L",
    "PrincipalProviderNumber": "2447781L",
    "MedicareItems": [{ "ItemNumber": "3" }, { "ItemNumber": "123" }]
}
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/CalculateRebate';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"InHospitalTreatment":false,"PatientDateOfBirth":"1986-12-18","PatientFamilyName":"FLETCHER","PatientGivenName":"Edmond","PatientSex":"1","PatientMedicareNumber":"4951525561","PatientMedicareRefNumber":"2","ServicingProviderNumber":"2447781L","PrincipalProviderNumber":"2447781L","MedicareItems":[{"ItemNumber":"3"},{"ItemNumber":"123"}]}'
};

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

	payload := strings.NewReader("{\n  \"InHospitalTreatment\": false,\n  \"PatientDateOfBirth\": \"1986-12-18\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"Edmond\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"2\",\n  \"ServicingProviderNumber\": \"2447781L\",\n  \"PrincipalProviderNumber\": \"2447781L\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"3\"\n    },\n    {\n      \"ItemNumber\": \"123\"\n    }\n  ]\n}")

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

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

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

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

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

}
```

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

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

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  \"InHospitalTreatment\": false,\n  \"PatientDateOfBirth\": \"1986-12-18\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"Edmond\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"2\",\n  \"ServicingProviderNumber\": \"2447781L\",\n  \"PrincipalProviderNumber\": \"2447781L\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"3\"\n    },\n    {\n      \"ItemNumber\": \"123\"\n    }\n  ]\n}"

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

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

HttpResponse<String> response = Unirest.post("https://api.rebateright.com.au/CalculateRebate")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"InHospitalTreatment\": false,\n  \"PatientDateOfBirth\": \"1986-12-18\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"Edmond\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"2\",\n  \"ServicingProviderNumber\": \"2447781L\",\n  \"PrincipalProviderNumber\": \"2447781L\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"3\"\n    },\n    {\n      \"ItemNumber\": \"123\"\n    }\n  ]\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

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

```swift Success
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "InHospitalTreatment": false,
  "PatientDateOfBirth": "1986-12-18",
  "PatientFamilyName": "FLETCHER",
  "PatientGivenName": "Edmond",
  "PatientSex": "1",
  "PatientMedicareNumber": "4951525561",
  "PatientMedicareRefNumber": "2",
  "ServicingProviderNumber": "2447781L",
  "PrincipalProviderNumber": "2447781L",
  "MedicareItems": [["ItemNumber": "3"], ["ItemNumber": "123"]]
] as [String : Any]

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

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

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

payload = {
    "InHospitalTreatment": False,
    "PatientDateOfBirth": "2012-09-20",
    "PatientFamilyName": "Smith",
    "PatientGivenName": "Lyndall",
    "PatientSex": "2",
    "PatientMedicareNumber": "2951386025",
    "PatientMedicareRefNumber": "2",
    "ServicingProviderNumber": "2447781L",
    "PrincipalProviderNumber": "2447781L",
    "MedicareItems": [{ "ItemNumber": "145" }]
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Age Verification
const url = 'https://api.rebateright.com.au/CalculateRebate';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"InHospitalTreatment":false,"PatientDateOfBirth":"2012-09-20","PatientFamilyName":"Smith","PatientGivenName":"Lyndall","PatientSex":"2","PatientMedicareNumber":"2951386025","PatientMedicareRefNumber":"2","ServicingProviderNumber":"2447781L","PrincipalProviderNumber":"2447781L","MedicareItems":[{"ItemNumber":"145"}]}'
};

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

```go Age Verification
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"InHospitalTreatment\": false,\n  \"PatientDateOfBirth\": \"2012-09-20\",\n  \"PatientFamilyName\": \"Smith\",\n  \"PatientGivenName\": \"Lyndall\",\n  \"PatientSex\": \"2\",\n  \"PatientMedicareNumber\": \"2951386025\",\n  \"PatientMedicareRefNumber\": \"2\",\n  \"ServicingProviderNumber\": \"2447781L\",\n  \"PrincipalProviderNumber\": \"2447781L\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"145\"\n    }\n  ]\n}")

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

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

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

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

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

}
```

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

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

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  \"InHospitalTreatment\": false,\n  \"PatientDateOfBirth\": \"2012-09-20\",\n  \"PatientFamilyName\": \"Smith\",\n  \"PatientGivenName\": \"Lyndall\",\n  \"PatientSex\": \"2\",\n  \"PatientMedicareNumber\": \"2951386025\",\n  \"PatientMedicareRefNumber\": \"2\",\n  \"ServicingProviderNumber\": \"2447781L\",\n  \"PrincipalProviderNumber\": \"2447781L\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"145\"\n    }\n  ]\n}"

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

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

HttpResponse<String> response = Unirest.post("https://api.rebateright.com.au/CalculateRebate")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"InHospitalTreatment\": false,\n  \"PatientDateOfBirth\": \"2012-09-20\",\n  \"PatientFamilyName\": \"Smith\",\n  \"PatientGivenName\": \"Lyndall\",\n  \"PatientSex\": \"2\",\n  \"PatientMedicareNumber\": \"2951386025\",\n  \"PatientMedicareRefNumber\": \"2\",\n  \"ServicingProviderNumber\": \"2447781L\",\n  \"PrincipalProviderNumber\": \"2447781L\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"145\"\n    }\n  ]\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.rebateright.com.au/CalculateRebate', [
  'body' => '{
  "InHospitalTreatment": false,
  "PatientDateOfBirth": "2012-09-20",
  "PatientFamilyName": "Smith",
  "PatientGivenName": "Lyndall",
  "PatientSex": "2",
  "PatientMedicareNumber": "2951386025",
  "PatientMedicareRefNumber": "2",
  "ServicingProviderNumber": "2447781L",
  "PrincipalProviderNumber": "2447781L",
  "MedicareItems": [
    {
      "ItemNumber": "145"
    }
  ]
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Age Verification
using RestSharp;

var client = new RestClient("https://api.rebateright.com.au/CalculateRebate");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"InHospitalTreatment\": false,\n  \"PatientDateOfBirth\": \"2012-09-20\",\n  \"PatientFamilyName\": \"Smith\",\n  \"PatientGivenName\": \"Lyndall\",\n  \"PatientSex\": \"2\",\n  \"PatientMedicareNumber\": \"2951386025\",\n  \"PatientMedicareRefNumber\": \"2\",\n  \"ServicingProviderNumber\": \"2447781L\",\n  \"PrincipalProviderNumber\": \"2447781L\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"145\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Age Verification
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "InHospitalTreatment": false,
  "PatientDateOfBirth": "2012-09-20",
  "PatientFamilyName": "Smith",
  "PatientGivenName": "Lyndall",
  "PatientSex": "2",
  "PatientMedicareNumber": "2951386025",
  "PatientMedicareRefNumber": "2",
  "ServicingProviderNumber": "2447781L",
  "PrincipalProviderNumber": "2447781L",
  "MedicareItems": [["ItemNumber": "145"]]
] as [String : Any]

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

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

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

payload = {
    "InHospitalTreatment": False,
    "PatientDateOfBirth": "1940-06-17",
    "PatientFamilyName": "Smith",
    "PatientGivenName": "Henry",
    "PatientSex": "1",
    "PatientMedicareNumber": "2951386025",
    "PatientMedicareRefNumber": "1",
    "ServicingProviderNumber": "2447781L",
    "PrincipalProviderNumber": "2447781L",
    "MedicareItems": [{ "ItemNumber": "145" }]
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Missing Referrer
const url = 'https://api.rebateright.com.au/CalculateRebate';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"InHospitalTreatment":false,"PatientDateOfBirth":"1940-06-17","PatientFamilyName":"Smith","PatientGivenName":"Henry","PatientSex":"1","PatientMedicareNumber":"2951386025","PatientMedicareRefNumber":"1","ServicingProviderNumber":"2447781L","PrincipalProviderNumber":"2447781L","MedicareItems":[{"ItemNumber":"145"}]}'
};

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

```go Missing Referrer
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"InHospitalTreatment\": false,\n  \"PatientDateOfBirth\": \"1940-06-17\",\n  \"PatientFamilyName\": \"Smith\",\n  \"PatientGivenName\": \"Henry\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"2951386025\",\n  \"PatientMedicareRefNumber\": \"1\",\n  \"ServicingProviderNumber\": \"2447781L\",\n  \"PrincipalProviderNumber\": \"2447781L\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"145\"\n    }\n  ]\n}")

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

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

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

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

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

}
```

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

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

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  \"InHospitalTreatment\": false,\n  \"PatientDateOfBirth\": \"1940-06-17\",\n  \"PatientFamilyName\": \"Smith\",\n  \"PatientGivenName\": \"Henry\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"2951386025\",\n  \"PatientMedicareRefNumber\": \"1\",\n  \"ServicingProviderNumber\": \"2447781L\",\n  \"PrincipalProviderNumber\": \"2447781L\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"145\"\n    }\n  ]\n}"

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

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

HttpResponse<String> response = Unirest.post("https://api.rebateright.com.au/CalculateRebate")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"InHospitalTreatment\": false,\n  \"PatientDateOfBirth\": \"1940-06-17\",\n  \"PatientFamilyName\": \"Smith\",\n  \"PatientGivenName\": \"Henry\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"2951386025\",\n  \"PatientMedicareRefNumber\": \"1\",\n  \"ServicingProviderNumber\": \"2447781L\",\n  \"PrincipalProviderNumber\": \"2447781L\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"145\"\n    }\n  ]\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.rebateright.com.au/CalculateRebate', [
  'body' => '{
  "InHospitalTreatment": false,
  "PatientDateOfBirth": "1940-06-17",
  "PatientFamilyName": "Smith",
  "PatientGivenName": "Henry",
  "PatientSex": "1",
  "PatientMedicareNumber": "2951386025",
  "PatientMedicareRefNumber": "1",
  "ServicingProviderNumber": "2447781L",
  "PrincipalProviderNumber": "2447781L",
  "MedicareItems": [
    {
      "ItemNumber": "145"
    }
  ]
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Missing Referrer
using RestSharp;

var client = new RestClient("https://api.rebateright.com.au/CalculateRebate");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"InHospitalTreatment\": false,\n  \"PatientDateOfBirth\": \"1940-06-17\",\n  \"PatientFamilyName\": \"Smith\",\n  \"PatientGivenName\": \"Henry\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"2951386025\",\n  \"PatientMedicareRefNumber\": \"1\",\n  \"ServicingProviderNumber\": \"2447781L\",\n  \"PrincipalProviderNumber\": \"2447781L\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"145\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Missing Referrer
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "InHospitalTreatment": false,
  "PatientDateOfBirth": "1940-06-17",
  "PatientFamilyName": "Smith",
  "PatientGivenName": "Henry",
  "PatientSex": "1",
  "PatientMedicareNumber": "2951386025",
  "PatientMedicareRefNumber": "1",
  "ServicingProviderNumber": "2447781L",
  "PrincipalProviderNumber": "2447781L",
  "MedicareItems": [["ItemNumber": "145"]]
] as [String : Any]

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

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

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

payload = {
    "InHospitalTreatment": False,
    "PatientDateOfBirth": "1993-08-14",
    "PatientFamilyName": "NASH",
    "PatientGivenName": "Hazel",
    "PatientSex": "2",
    "PatientMedicareNumber": "2954536421",
    "PatientMedicareRefNumber": "1",
    "ServicingProviderNumber": "2446081F",
    "PrincipalProviderNumber": "2446081F",
    "MedicareItems": [{ "ItemNumber": "72846" }, { "ItemNumber": "65070" }, { "ItemNumber": "66503" }, { "ItemNumber": "66500" }],
    "ReferrerProviderNumber": "2054781W"
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Coning Rule
const url = 'https://api.rebateright.com.au/CalculateRebate';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"InHospitalTreatment":false,"PatientDateOfBirth":"1993-08-14","PatientFamilyName":"NASH","PatientGivenName":"Hazel","PatientSex":"2","PatientMedicareNumber":"2954536421","PatientMedicareRefNumber":"1","ServicingProviderNumber":"2446081F","PrincipalProviderNumber":"2446081F","MedicareItems":[{"ItemNumber":"72846"},{"ItemNumber":"65070"},{"ItemNumber":"66503"},{"ItemNumber":"66500"}],"ReferrerProviderNumber":"2054781W"}'
};

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

```go Coning Rule
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"InHospitalTreatment\": false,\n  \"PatientDateOfBirth\": \"1993-08-14\",\n  \"PatientFamilyName\": \"NASH\",\n  \"PatientGivenName\": \"Hazel\",\n  \"PatientSex\": \"2\",\n  \"PatientMedicareNumber\": \"2954536421\",\n  \"PatientMedicareRefNumber\": \"1\",\n  \"ServicingProviderNumber\": \"2446081F\",\n  \"PrincipalProviderNumber\": \"2446081F\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"72846\"\n    },\n    {\n      \"ItemNumber\": \"65070\"\n    },\n    {\n      \"ItemNumber\": \"66503\"\n    },\n    {\n      \"ItemNumber\": \"66500\"\n    }\n  ],\n  \"ReferrerProviderNumber\": \"2054781W\"\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 Coning Rule
require 'uri'
require 'net/http'

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

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  \"InHospitalTreatment\": false,\n  \"PatientDateOfBirth\": \"1993-08-14\",\n  \"PatientFamilyName\": \"NASH\",\n  \"PatientGivenName\": \"Hazel\",\n  \"PatientSex\": \"2\",\n  \"PatientMedicareNumber\": \"2954536421\",\n  \"PatientMedicareRefNumber\": \"1\",\n  \"ServicingProviderNumber\": \"2446081F\",\n  \"PrincipalProviderNumber\": \"2446081F\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"72846\"\n    },\n    {\n      \"ItemNumber\": \"65070\"\n    },\n    {\n      \"ItemNumber\": \"66503\"\n    },\n    {\n      \"ItemNumber\": \"66500\"\n    }\n  ],\n  \"ReferrerProviderNumber\": \"2054781W\"\n}"

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

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

HttpResponse<String> response = Unirest.post("https://api.rebateright.com.au/CalculateRebate")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"InHospitalTreatment\": false,\n  \"PatientDateOfBirth\": \"1993-08-14\",\n  \"PatientFamilyName\": \"NASH\",\n  \"PatientGivenName\": \"Hazel\",\n  \"PatientSex\": \"2\",\n  \"PatientMedicareNumber\": \"2954536421\",\n  \"PatientMedicareRefNumber\": \"1\",\n  \"ServicingProviderNumber\": \"2446081F\",\n  \"PrincipalProviderNumber\": \"2446081F\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"72846\"\n    },\n    {\n      \"ItemNumber\": \"65070\"\n    },\n    {\n      \"ItemNumber\": \"66503\"\n    },\n    {\n      \"ItemNumber\": \"66500\"\n    }\n  ],\n  \"ReferrerProviderNumber\": \"2054781W\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.rebateright.com.au/CalculateRebate', [
  'body' => '{
  "InHospitalTreatment": false,
  "PatientDateOfBirth": "1993-08-14",
  "PatientFamilyName": "NASH",
  "PatientGivenName": "Hazel",
  "PatientSex": "2",
  "PatientMedicareNumber": "2954536421",
  "PatientMedicareRefNumber": "1",
  "ServicingProviderNumber": "2446081F",
  "PrincipalProviderNumber": "2446081F",
  "MedicareItems": [
    {
      "ItemNumber": "72846"
    },
    {
      "ItemNumber": "65070"
    },
    {
      "ItemNumber": "66503"
    },
    {
      "ItemNumber": "66500"
    }
  ],
  "ReferrerProviderNumber": "2054781W"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Coning Rule
using RestSharp;

var client = new RestClient("https://api.rebateright.com.au/CalculateRebate");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"InHospitalTreatment\": false,\n  \"PatientDateOfBirth\": \"1993-08-14\",\n  \"PatientFamilyName\": \"NASH\",\n  \"PatientGivenName\": \"Hazel\",\n  \"PatientSex\": \"2\",\n  \"PatientMedicareNumber\": \"2954536421\",\n  \"PatientMedicareRefNumber\": \"1\",\n  \"ServicingProviderNumber\": \"2446081F\",\n  \"PrincipalProviderNumber\": \"2446081F\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"72846\"\n    },\n    {\n      \"ItemNumber\": \"65070\"\n    },\n    {\n      \"ItemNumber\": \"66503\"\n    },\n    {\n      \"ItemNumber\": \"66500\"\n    }\n  ],\n  \"ReferrerProviderNumber\": \"2054781W\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Coning Rule
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "InHospitalTreatment": false,
  "PatientDateOfBirth": "1993-08-14",
  "PatientFamilyName": "NASH",
  "PatientGivenName": "Hazel",
  "PatientSex": "2",
  "PatientMedicareNumber": "2954536421",
  "PatientMedicareRefNumber": "1",
  "ServicingProviderNumber": "2446081F",
  "PrincipalProviderNumber": "2446081F",
  "MedicareItems": [["ItemNumber": "72846"], ["ItemNumber": "65070"], ["ItemNumber": "66503"], ["ItemNumber": "66500"]],
  "ReferrerProviderNumber": "2054781W"
] as [String : Any]

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

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

payload = {
    "InHospitalTreatment": False,
    "PatientDateOfBirth": "2009-02-08",
    "PatientFamilyName": "FLETCHER",
    "PatientGivenName": "PETER",
    "PatientSex": "1",
    "PatientMedicareNumber": "4951525561",
    "PatientMedicareRefNumber": "3",
    "ServicingProviderNumber": "2447781L",
    "PrincipalProviderNumber": "2447781L",
    "MedicareItems": [{ "ItemNumber": "82118" }]
}
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/CalculateRebate';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"InHospitalTreatment":false,"PatientDateOfBirth":"2009-02-08","PatientFamilyName":"FLETCHER","PatientGivenName":"PETER","PatientSex":"1","PatientMedicareNumber":"4951525561","PatientMedicareRefNumber":"3","ServicingProviderNumber":"2447781L","PrincipalProviderNumber":"2447781L","MedicareItems":[{"ItemNumber":"82118"}]}'
};

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

	payload := strings.NewReader("{\n  \"InHospitalTreatment\": false,\n  \"PatientDateOfBirth\": \"2009-02-08\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"PETER\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"3\",\n  \"ServicingProviderNumber\": \"2447781L\",\n  \"PrincipalProviderNumber\": \"2447781L\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"82118\"\n    }\n  ]\n}")

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

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

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

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

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

}
```

```ruby Incorrect Given Name
require 'uri'
require 'net/http'

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

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  \"InHospitalTreatment\": false,\n  \"PatientDateOfBirth\": \"2009-02-08\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"PETER\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"3\",\n  \"ServicingProviderNumber\": \"2447781L\",\n  \"PrincipalProviderNumber\": \"2447781L\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"82118\"\n    }\n  ]\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/CalculateRebate")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"InHospitalTreatment\": false,\n  \"PatientDateOfBirth\": \"2009-02-08\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"PETER\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"3\",\n  \"ServicingProviderNumber\": \"2447781L\",\n  \"PrincipalProviderNumber\": \"2447781L\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"82118\"\n    }\n  ]\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/CalculateRebate', [
  'body' => '{
  "InHospitalTreatment": false,
  "PatientDateOfBirth": "2009-02-08",
  "PatientFamilyName": "FLETCHER",
  "PatientGivenName": "PETER",
  "PatientSex": "1",
  "PatientMedicareNumber": "4951525561",
  "PatientMedicareRefNumber": "3",
  "ServicingProviderNumber": "2447781L",
  "PrincipalProviderNumber": "2447781L",
  "MedicareItems": [
    {
      "ItemNumber": "82118"
    }
  ]
}',
  '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/CalculateRebate");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"InHospitalTreatment\": false,\n  \"PatientDateOfBirth\": \"2009-02-08\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"PETER\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"3\",\n  \"ServicingProviderNumber\": \"2447781L\",\n  \"PrincipalProviderNumber\": \"2447781L\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"82118\"\n    }\n  ]\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 = [
  "InHospitalTreatment": false,
  "PatientDateOfBirth": "2009-02-08",
  "PatientFamilyName": "FLETCHER",
  "PatientGivenName": "PETER",
  "PatientSex": "1",
  "PatientMedicareNumber": "4951525561",
  "PatientMedicareRefNumber": "3",
  "ServicingProviderNumber": "2447781L",
  "PrincipalProviderNumber": "2447781L",
  "MedicareItems": [["ItemNumber": "82118"]]
] as [String : Any]

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

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

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

payload = {
    "InHospitalTreatment": False,
    "PatientDateOfBirth": "1993-08-14",
    "PatientFamilyName": "NASH",
    "PatientGivenName": "Hazel",
    "PatientSex": "2",
    "PatientMedicareNumber": "2954536421",
    "PatientMedicareRefNumber": "1",
    "ServicingProviderNumber": "2447781L",
    "PrincipalProviderNumber": "2447781L",
    "MedicareItems": [{ "ItemNumber": "73452" }]
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Male Item
const url = 'https://api.rebateright.com.au/CalculateRebate';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"InHospitalTreatment":false,"PatientDateOfBirth":"1993-08-14","PatientFamilyName":"NASH","PatientGivenName":"Hazel","PatientSex":"2","PatientMedicareNumber":"2954536421","PatientMedicareRefNumber":"1","ServicingProviderNumber":"2447781L","PrincipalProviderNumber":"2447781L","MedicareItems":[{"ItemNumber":"73452"}]}'
};

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

```go Male Item
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"InHospitalTreatment\": false,\n  \"PatientDateOfBirth\": \"1993-08-14\",\n  \"PatientFamilyName\": \"NASH\",\n  \"PatientGivenName\": \"Hazel\",\n  \"PatientSex\": \"2\",\n  \"PatientMedicareNumber\": \"2954536421\",\n  \"PatientMedicareRefNumber\": \"1\",\n  \"ServicingProviderNumber\": \"2447781L\",\n  \"PrincipalProviderNumber\": \"2447781L\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"73452\"\n    }\n  ]\n}")

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

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

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

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

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

}
```

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

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

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  \"InHospitalTreatment\": false,\n  \"PatientDateOfBirth\": \"1993-08-14\",\n  \"PatientFamilyName\": \"NASH\",\n  \"PatientGivenName\": \"Hazel\",\n  \"PatientSex\": \"2\",\n  \"PatientMedicareNumber\": \"2954536421\",\n  \"PatientMedicareRefNumber\": \"1\",\n  \"ServicingProviderNumber\": \"2447781L\",\n  \"PrincipalProviderNumber\": \"2447781L\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"73452\"\n    }\n  ]\n}"

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

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

HttpResponse<String> response = Unirest.post("https://api.rebateright.com.au/CalculateRebate")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"InHospitalTreatment\": false,\n  \"PatientDateOfBirth\": \"1993-08-14\",\n  \"PatientFamilyName\": \"NASH\",\n  \"PatientGivenName\": \"Hazel\",\n  \"PatientSex\": \"2\",\n  \"PatientMedicareNumber\": \"2954536421\",\n  \"PatientMedicareRefNumber\": \"1\",\n  \"ServicingProviderNumber\": \"2447781L\",\n  \"PrincipalProviderNumber\": \"2447781L\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"73452\"\n    }\n  ]\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.rebateright.com.au/CalculateRebate', [
  'body' => '{
  "InHospitalTreatment": false,
  "PatientDateOfBirth": "1993-08-14",
  "PatientFamilyName": "NASH",
  "PatientGivenName": "Hazel",
  "PatientSex": "2",
  "PatientMedicareNumber": "2954536421",
  "PatientMedicareRefNumber": "1",
  "ServicingProviderNumber": "2447781L",
  "PrincipalProviderNumber": "2447781L",
  "MedicareItems": [
    {
      "ItemNumber": "73452"
    }
  ]
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Male Item
using RestSharp;

var client = new RestClient("https://api.rebateright.com.au/CalculateRebate");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"InHospitalTreatment\": false,\n  \"PatientDateOfBirth\": \"1993-08-14\",\n  \"PatientFamilyName\": \"NASH\",\n  \"PatientGivenName\": \"Hazel\",\n  \"PatientSex\": \"2\",\n  \"PatientMedicareNumber\": \"2954536421\",\n  \"PatientMedicareRefNumber\": \"1\",\n  \"ServicingProviderNumber\": \"2447781L\",\n  \"PrincipalProviderNumber\": \"2447781L\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"73452\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Male Item
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "InHospitalTreatment": false,
  "PatientDateOfBirth": "1993-08-14",
  "PatientFamilyName": "NASH",
  "PatientGivenName": "Hazel",
  "PatientSex": "2",
  "PatientMedicareNumber": "2954536421",
  "PatientMedicareRefNumber": "1",
  "ServicingProviderNumber": "2447781L",
  "PrincipalProviderNumber": "2447781L",
  "MedicareItems": [["ItemNumber": "73452"]]
] as [String : Any]

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

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

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

payload = {
    "InHospitalTreatment": False,
    "PatientDateOfBirth": "1986-12-18",
    "PatientFamilyName": "FLETCHER",
    "PatientGivenName": "Edmond",
    "PatientSex": "1",
    "PatientMedicareNumber": "4951525561",
    "PatientMedicareRefNumber": "2",
    "ServicingProviderNumber": "2447781L",
    "PrincipalProviderNumber": "2447781L",
    "MedicareItems": [{ "ItemNumber": "73451" }]
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Female Item
const url = 'https://api.rebateright.com.au/CalculateRebate';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"InHospitalTreatment":false,"PatientDateOfBirth":"1986-12-18","PatientFamilyName":"FLETCHER","PatientGivenName":"Edmond","PatientSex":"1","PatientMedicareNumber":"4951525561","PatientMedicareRefNumber":"2","ServicingProviderNumber":"2447781L","PrincipalProviderNumber":"2447781L","MedicareItems":[{"ItemNumber":"73451"}]}'
};

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

```go Female Item
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"InHospitalTreatment\": false,\n  \"PatientDateOfBirth\": \"1986-12-18\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"Edmond\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"2\",\n  \"ServicingProviderNumber\": \"2447781L\",\n  \"PrincipalProviderNumber\": \"2447781L\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"73451\"\n    }\n  ]\n}")

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

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

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

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

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

}
```

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

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

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  \"InHospitalTreatment\": false,\n  \"PatientDateOfBirth\": \"1986-12-18\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"Edmond\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"2\",\n  \"ServicingProviderNumber\": \"2447781L\",\n  \"PrincipalProviderNumber\": \"2447781L\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"73451\"\n    }\n  ]\n}"

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

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

HttpResponse<String> response = Unirest.post("https://api.rebateright.com.au/CalculateRebate")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"InHospitalTreatment\": false,\n  \"PatientDateOfBirth\": \"1986-12-18\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"Edmond\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"2\",\n  \"ServicingProviderNumber\": \"2447781L\",\n  \"PrincipalProviderNumber\": \"2447781L\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"73451\"\n    }\n  ]\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

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

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

```csharp Female Item
using RestSharp;

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

```swift Female Item
import Foundation

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

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

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

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

payload = {
    "InHospitalTreatment": False,
    "PatientDateOfBirth": "1986-12-18",
    "PatientFamilyName": "FLETCHER",
    "PatientGivenName": "Edmond",
    "PatientSex": "1",
    "PatientMedicareNumber": "4951525561",
    "PatientMedicareRefNumber": "2",
    "ServicingProviderNumber": "2447781L",
    "PrincipalProviderNumber": "2447781L",
    "MedicareItems": [{ "ItemNumber": "104" }],
    "ReferrerProviderNumber": "272476MB"
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Practice Closed
const url = 'https://api.rebateright.com.au/CalculateRebate';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"InHospitalTreatment":false,"PatientDateOfBirth":"1986-12-18","PatientFamilyName":"FLETCHER","PatientGivenName":"Edmond","PatientSex":"1","PatientMedicareNumber":"4951525561","PatientMedicareRefNumber":"2","ServicingProviderNumber":"2447781L","PrincipalProviderNumber":"2447781L","MedicareItems":[{"ItemNumber":"104"}],"ReferrerProviderNumber":"272476MB"}'
};

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

```go Practice Closed
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"InHospitalTreatment\": false,\n  \"PatientDateOfBirth\": \"1986-12-18\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"Edmond\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"2\",\n  \"ServicingProviderNumber\": \"2447781L\",\n  \"PrincipalProviderNumber\": \"2447781L\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"104\"\n    }\n  ],\n  \"ReferrerProviderNumber\": \"272476MB\"\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 Practice Closed
require 'uri'
require 'net/http'

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

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  \"InHospitalTreatment\": false,\n  \"PatientDateOfBirth\": \"1986-12-18\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"Edmond\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"2\",\n  \"ServicingProviderNumber\": \"2447781L\",\n  \"PrincipalProviderNumber\": \"2447781L\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"104\"\n    }\n  ],\n  \"ReferrerProviderNumber\": \"272476MB\"\n}"

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

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

HttpResponse<String> response = Unirest.post("https://api.rebateright.com.au/CalculateRebate")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"InHospitalTreatment\": false,\n  \"PatientDateOfBirth\": \"1986-12-18\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"Edmond\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"2\",\n  \"ServicingProviderNumber\": \"2447781L\",\n  \"PrincipalProviderNumber\": \"2447781L\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"104\"\n    }\n  ],\n  \"ReferrerProviderNumber\": \"272476MB\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.rebateright.com.au/CalculateRebate', [
  'body' => '{
  "InHospitalTreatment": false,
  "PatientDateOfBirth": "1986-12-18",
  "PatientFamilyName": "FLETCHER",
  "PatientGivenName": "Edmond",
  "PatientSex": "1",
  "PatientMedicareNumber": "4951525561",
  "PatientMedicareRefNumber": "2",
  "ServicingProviderNumber": "2447781L",
  "PrincipalProviderNumber": "2447781L",
  "MedicareItems": [
    {
      "ItemNumber": "104"
    }
  ],
  "ReferrerProviderNumber": "272476MB"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Practice Closed
using RestSharp;

var client = new RestClient("https://api.rebateright.com.au/CalculateRebate");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"InHospitalTreatment\": false,\n  \"PatientDateOfBirth\": \"1986-12-18\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"Edmond\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"2\",\n  \"ServicingProviderNumber\": \"2447781L\",\n  \"PrincipalProviderNumber\": \"2447781L\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"104\"\n    }\n  ],\n  \"ReferrerProviderNumber\": \"272476MB\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Practice Closed
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "InHospitalTreatment": false,
  "PatientDateOfBirth": "1986-12-18",
  "PatientFamilyName": "FLETCHER",
  "PatientGivenName": "Edmond",
  "PatientSex": "1",
  "PatientMedicareNumber": "4951525561",
  "PatientMedicareRefNumber": "2",
  "ServicingProviderNumber": "2447781L",
  "PrincipalProviderNumber": "2447781L",
  "MedicareItems": [["ItemNumber": "104"]],
  "ReferrerProviderNumber": "272476MB"
] as [String : Any]

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

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

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

payload = {
    "InHospitalTreatment": False,
    "PatientDateOfBirth": "1993-08-14",
    "PatientFamilyName": "NASH",
    "PatientGivenName": "Hazel",
    "PatientSex": "2",
    "PatientMedicareNumber": "2954536421",
    "PatientMedicareRefNumber": "1",
    "ServicingProviderNumber": "2447791K",
    "PrincipalProviderNumber": "2447781L",
    "MedicareItems": [{ "ItemNumber": "55712" }],
    "ReferrerProviderNumber": "2121331W"
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Referrer Not Eligible
const url = 'https://api.rebateright.com.au/CalculateRebate';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"InHospitalTreatment":false,"PatientDateOfBirth":"1993-08-14","PatientFamilyName":"NASH","PatientGivenName":"Hazel","PatientSex":"2","PatientMedicareNumber":"2954536421","PatientMedicareRefNumber":"1","ServicingProviderNumber":"2447791K","PrincipalProviderNumber":"2447781L","MedicareItems":[{"ItemNumber":"55712"}],"ReferrerProviderNumber":"2121331W"}'
};

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

```go Referrer Not Eligible
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"InHospitalTreatment\": false,\n  \"PatientDateOfBirth\": \"1993-08-14\",\n  \"PatientFamilyName\": \"NASH\",\n  \"PatientGivenName\": \"Hazel\",\n  \"PatientSex\": \"2\",\n  \"PatientMedicareNumber\": \"2954536421\",\n  \"PatientMedicareRefNumber\": \"1\",\n  \"ServicingProviderNumber\": \"2447791K\",\n  \"PrincipalProviderNumber\": \"2447781L\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"55712\"\n    }\n  ],\n  \"ReferrerProviderNumber\": \"2121331W\"\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 Referrer Not Eligible
require 'uri'
require 'net/http'

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

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  \"InHospitalTreatment\": false,\n  \"PatientDateOfBirth\": \"1993-08-14\",\n  \"PatientFamilyName\": \"NASH\",\n  \"PatientGivenName\": \"Hazel\",\n  \"PatientSex\": \"2\",\n  \"PatientMedicareNumber\": \"2954536421\",\n  \"PatientMedicareRefNumber\": \"1\",\n  \"ServicingProviderNumber\": \"2447791K\",\n  \"PrincipalProviderNumber\": \"2447781L\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"55712\"\n    }\n  ],\n  \"ReferrerProviderNumber\": \"2121331W\"\n}"

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

```java Referrer Not Eligible
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.rebateright.com.au/CalculateRebate")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"InHospitalTreatment\": false,\n  \"PatientDateOfBirth\": \"1993-08-14\",\n  \"PatientFamilyName\": \"NASH\",\n  \"PatientGivenName\": \"Hazel\",\n  \"PatientSex\": \"2\",\n  \"PatientMedicareNumber\": \"2954536421\",\n  \"PatientMedicareRefNumber\": \"1\",\n  \"ServicingProviderNumber\": \"2447791K\",\n  \"PrincipalProviderNumber\": \"2447781L\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"55712\"\n    }\n  ],\n  \"ReferrerProviderNumber\": \"2121331W\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.rebateright.com.au/CalculateRebate', [
  'body' => '{
  "InHospitalTreatment": false,
  "PatientDateOfBirth": "1993-08-14",
  "PatientFamilyName": "NASH",
  "PatientGivenName": "Hazel",
  "PatientSex": "2",
  "PatientMedicareNumber": "2954536421",
  "PatientMedicareRefNumber": "1",
  "ServicingProviderNumber": "2447791K",
  "PrincipalProviderNumber": "2447781L",
  "MedicareItems": [
    {
      "ItemNumber": "55712"
    }
  ],
  "ReferrerProviderNumber": "2121331W"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Referrer Not Eligible
using RestSharp;

var client = new RestClient("https://api.rebateright.com.au/CalculateRebate");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"InHospitalTreatment\": false,\n  \"PatientDateOfBirth\": \"1993-08-14\",\n  \"PatientFamilyName\": \"NASH\",\n  \"PatientGivenName\": \"Hazel\",\n  \"PatientSex\": \"2\",\n  \"PatientMedicareNumber\": \"2954536421\",\n  \"PatientMedicareRefNumber\": \"1\",\n  \"ServicingProviderNumber\": \"2447791K\",\n  \"PrincipalProviderNumber\": \"2447781L\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"55712\"\n    }\n  ],\n  \"ReferrerProviderNumber\": \"2121331W\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Referrer Not Eligible
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "InHospitalTreatment": false,
  "PatientDateOfBirth": "1993-08-14",
  "PatientFamilyName": "NASH",
  "PatientGivenName": "Hazel",
  "PatientSex": "2",
  "PatientMedicareNumber": "2954536421",
  "PatientMedicareRefNumber": "1",
  "ServicingProviderNumber": "2447791K",
  "PrincipalProviderNumber": "2447781L",
  "MedicareItems": [["ItemNumber": "55712"]],
  "ReferrerProviderNumber": "2121331W"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.rebateright.com.au/CalculateRebate")! 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 Same Day Item Restrictions
import requests

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

payload = {
    "InHospitalTreatment": True,
    "PatientDateOfBirth": "1986-12-18",
    "PatientFamilyName": "FLETCHER",
    "PatientGivenName": "Edmond",
    "PatientSex": "1",
    "PatientMedicareNumber": "4951525561",
    "PatientMedicareRefNumber": "2",
    "ServicingProviderNumber": "2447781L",
    "PrincipalProviderNumber": "2447781L",
    "MedicareItems": [{ "ItemNumber": "55703" }, { "ItemNumber": "55704" }],
    "BulkBilled": True
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Same Day Item Restrictions
const url = 'https://api.rebateright.com.au/CalculateRebate';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"InHospitalTreatment":true,"PatientDateOfBirth":"1986-12-18","PatientFamilyName":"FLETCHER","PatientGivenName":"Edmond","PatientSex":"1","PatientMedicareNumber":"4951525561","PatientMedicareRefNumber":"2","ServicingProviderNumber":"2447781L","PrincipalProviderNumber":"2447781L","MedicareItems":[{"ItemNumber":"55703"},{"ItemNumber":"55704"}],"BulkBilled":true}'
};

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

```go Same Day Item Restrictions
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"InHospitalTreatment\": true,\n  \"PatientDateOfBirth\": \"1986-12-18\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"Edmond\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"2\",\n  \"ServicingProviderNumber\": \"2447781L\",\n  \"PrincipalProviderNumber\": \"2447781L\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"55703\"\n    },\n    {\n      \"ItemNumber\": \"55704\"\n    }\n  ],\n  \"BulkBilled\": true\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 Same Day Item Restrictions
require 'uri'
require 'net/http'

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

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  \"InHospitalTreatment\": true,\n  \"PatientDateOfBirth\": \"1986-12-18\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"Edmond\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"2\",\n  \"ServicingProviderNumber\": \"2447781L\",\n  \"PrincipalProviderNumber\": \"2447781L\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"55703\"\n    },\n    {\n      \"ItemNumber\": \"55704\"\n    }\n  ],\n  \"BulkBilled\": true\n}"

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

```java Same Day Item Restrictions
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.rebateright.com.au/CalculateRebate")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"InHospitalTreatment\": true,\n  \"PatientDateOfBirth\": \"1986-12-18\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"Edmond\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"2\",\n  \"ServicingProviderNumber\": \"2447781L\",\n  \"PrincipalProviderNumber\": \"2447781L\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"55703\"\n    },\n    {\n      \"ItemNumber\": \"55704\"\n    }\n  ],\n  \"BulkBilled\": true\n}")
  .asString();
```

```php Same Day Item Restrictions
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.rebateright.com.au/CalculateRebate', [
  'body' => '{
  "InHospitalTreatment": true,
  "PatientDateOfBirth": "1986-12-18",
  "PatientFamilyName": "FLETCHER",
  "PatientGivenName": "Edmond",
  "PatientSex": "1",
  "PatientMedicareNumber": "4951525561",
  "PatientMedicareRefNumber": "2",
  "ServicingProviderNumber": "2447781L",
  "PrincipalProviderNumber": "2447781L",
  "MedicareItems": [
    {
      "ItemNumber": "55703"
    },
    {
      "ItemNumber": "55704"
    }
  ],
  "BulkBilled": true
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Same Day Item Restrictions
using RestSharp;

var client = new RestClient("https://api.rebateright.com.au/CalculateRebate");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"InHospitalTreatment\": true,\n  \"PatientDateOfBirth\": \"1986-12-18\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"Edmond\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"2\",\n  \"ServicingProviderNumber\": \"2447781L\",\n  \"PrincipalProviderNumber\": \"2447781L\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"55703\"\n    },\n    {\n      \"ItemNumber\": \"55704\"\n    }\n  ],\n  \"BulkBilled\": true\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Same Day Item Restrictions
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "InHospitalTreatment": true,
  "PatientDateOfBirth": "1986-12-18",
  "PatientFamilyName": "FLETCHER",
  "PatientGivenName": "Edmond",
  "PatientSex": "1",
  "PatientMedicareNumber": "4951525561",
  "PatientMedicareRefNumber": "2",
  "ServicingProviderNumber": "2447781L",
  "PrincipalProviderNumber": "2447781L",
  "MedicareItems": [["ItemNumber": "55703"], ["ItemNumber": "55704"]],
  "BulkBilled": true
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.rebateright.com.au/CalculateRebate")! 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 Item Does Not Exist
import requests

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

payload = {
    "InHospitalTreatment": False,
    "PatientDateOfBirth": "1986-12-18",
    "PatientFamilyName": "FLETCHER",
    "PatientGivenName": "Edmond",
    "PatientSex": "1",
    "PatientMedicareNumber": "4951525561",
    "PatientMedicareRefNumber": "2",
    "ServicingProviderNumber": "2447781L",
    "PrincipalProviderNumber": "2447781L",
    "MedicareItems": [{ "ItemNumber": "1" }]
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Item Does Not Exist
const url = 'https://api.rebateright.com.au/CalculateRebate';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"InHospitalTreatment":false,"PatientDateOfBirth":"1986-12-18","PatientFamilyName":"FLETCHER","PatientGivenName":"Edmond","PatientSex":"1","PatientMedicareNumber":"4951525561","PatientMedicareRefNumber":"2","ServicingProviderNumber":"2447781L","PrincipalProviderNumber":"2447781L","MedicareItems":[{"ItemNumber":"1"}]}'
};

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

```go Item Does Not Exist
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"InHospitalTreatment\": false,\n  \"PatientDateOfBirth\": \"1986-12-18\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"Edmond\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"2\",\n  \"ServicingProviderNumber\": \"2447781L\",\n  \"PrincipalProviderNumber\": \"2447781L\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"1\"\n    }\n  ]\n}")

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

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

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

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

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

}
```

```ruby Item Does Not Exist
require 'uri'
require 'net/http'

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

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  \"InHospitalTreatment\": false,\n  \"PatientDateOfBirth\": \"1986-12-18\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"Edmond\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"2\",\n  \"ServicingProviderNumber\": \"2447781L\",\n  \"PrincipalProviderNumber\": \"2447781L\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"1\"\n    }\n  ]\n}"

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

```java Item Does Not Exist
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.rebateright.com.au/CalculateRebate")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"InHospitalTreatment\": false,\n  \"PatientDateOfBirth\": \"1986-12-18\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"Edmond\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"2\",\n  \"ServicingProviderNumber\": \"2447781L\",\n  \"PrincipalProviderNumber\": \"2447781L\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"1\"\n    }\n  ]\n}")
  .asString();
```

```php Item Does Not Exist
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

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

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

```csharp Item Does Not Exist
using RestSharp;

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

```swift Item Does Not Exist
import Foundation

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

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

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

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

payload = {
    "InHospitalTreatment": False,
    "PatientDateOfBirth": "1986-12-18",
    "PatientFamilyName": "FLETCHER",
    "PatientGivenName": "Edmond",
    "PatientSex": "1",
    "PatientMedicareNumber": "4951525561",
    "PatientMedicareRefNumber": "2",
    "ServicingProviderNumber": "2447781L",
    "PrincipalProviderNumber": "2447781L",
    "MedicareItems": [{ "ItemNumber": "104" }],
    "ReferrerProviderNumber": "2447791K"
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Max Claim Limit
const url = 'https://api.rebateright.com.au/CalculateRebate';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"InHospitalTreatment":false,"PatientDateOfBirth":"1986-12-18","PatientFamilyName":"FLETCHER","PatientGivenName":"Edmond","PatientSex":"1","PatientMedicareNumber":"4951525561","PatientMedicareRefNumber":"2","ServicingProviderNumber":"2447781L","PrincipalProviderNumber":"2447781L","MedicareItems":[{"ItemNumber":"104"}],"ReferrerProviderNumber":"2447791K"}'
};

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

```go Max Claim Limit
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"InHospitalTreatment\": false,\n  \"PatientDateOfBirth\": \"1986-12-18\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"Edmond\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"2\",\n  \"ServicingProviderNumber\": \"2447781L\",\n  \"PrincipalProviderNumber\": \"2447781L\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"104\"\n    }\n  ],\n  \"ReferrerProviderNumber\": \"2447791K\"\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 Max Claim Limit
require 'uri'
require 'net/http'

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

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  \"InHospitalTreatment\": false,\n  \"PatientDateOfBirth\": \"1986-12-18\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"Edmond\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"2\",\n  \"ServicingProviderNumber\": \"2447781L\",\n  \"PrincipalProviderNumber\": \"2447781L\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"104\"\n    }\n  ],\n  \"ReferrerProviderNumber\": \"2447791K\"\n}"

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

```java Max Claim Limit
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.rebateright.com.au/CalculateRebate")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"InHospitalTreatment\": false,\n  \"PatientDateOfBirth\": \"1986-12-18\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"Edmond\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"2\",\n  \"ServicingProviderNumber\": \"2447781L\",\n  \"PrincipalProviderNumber\": \"2447781L\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"104\"\n    }\n  ],\n  \"ReferrerProviderNumber\": \"2447791K\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.rebateright.com.au/CalculateRebate', [
  'body' => '{
  "InHospitalTreatment": false,
  "PatientDateOfBirth": "1986-12-18",
  "PatientFamilyName": "FLETCHER",
  "PatientGivenName": "Edmond",
  "PatientSex": "1",
  "PatientMedicareNumber": "4951525561",
  "PatientMedicareRefNumber": "2",
  "ServicingProviderNumber": "2447781L",
  "PrincipalProviderNumber": "2447781L",
  "MedicareItems": [
    {
      "ItemNumber": "104"
    }
  ],
  "ReferrerProviderNumber": "2447791K"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Max Claim Limit
using RestSharp;

var client = new RestClient("https://api.rebateright.com.au/CalculateRebate");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"InHospitalTreatment\": false,\n  \"PatientDateOfBirth\": \"1986-12-18\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"Edmond\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"2\",\n  \"ServicingProviderNumber\": \"2447781L\",\n  \"PrincipalProviderNumber\": \"2447781L\",\n  \"MedicareItems\": [\n    {\n      \"ItemNumber\": \"104\"\n    }\n  ],\n  \"ReferrerProviderNumber\": \"2447791K\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Max Claim Limit
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "InHospitalTreatment": false,
  "PatientDateOfBirth": "1986-12-18",
  "PatientFamilyName": "FLETCHER",
  "PatientGivenName": "Edmond",
  "PatientSex": "1",
  "PatientMedicareNumber": "4951525561",
  "PatientMedicareRefNumber": "2",
  "ServicingProviderNumber": "2447781L",
  "PrincipalProviderNumber": "2447781L",
  "MedicareItems": [["ItemNumber": "104"]],
  "ReferrerProviderNumber": "2447791K"
] as [String : Any]

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

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

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

payload = {
    "InHospitalTreatment": False,
    "PatientDateOfBirth": "1986-12-18",
    "PatientFamilyName": "FLETCHER",
    "PatientGivenName": "Edmond",
    "PatientSex": "1",
    "PatientMedicareNumber": "4951525561",
    "PatientMedicareRefNumber": "2",
    "ServicingProviderNumber": "2447781L",
    "PrincipalProviderNumber": "2447781L",
    "MedicareItems": []
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript No Medicare Items
const url = 'https://api.rebateright.com.au/CalculateRebate';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"InHospitalTreatment":false,"PatientDateOfBirth":"1986-12-18","PatientFamilyName":"FLETCHER","PatientGivenName":"Edmond","PatientSex":"1","PatientMedicareNumber":"4951525561","PatientMedicareRefNumber":"2","ServicingProviderNumber":"2447781L","PrincipalProviderNumber":"2447781L","MedicareItems":[]}'
};

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

```go No Medicare Items
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"InHospitalTreatment\": false,\n  \"PatientDateOfBirth\": \"1986-12-18\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"Edmond\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"2\",\n  \"ServicingProviderNumber\": \"2447781L\",\n  \"PrincipalProviderNumber\": \"2447781L\",\n  \"MedicareItems\": []\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 No Medicare Items
require 'uri'
require 'net/http'

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

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  \"InHospitalTreatment\": false,\n  \"PatientDateOfBirth\": \"1986-12-18\",\n  \"PatientFamilyName\": \"FLETCHER\",\n  \"PatientGivenName\": \"Edmond\",\n  \"PatientSex\": \"1\",\n  \"PatientMedicareNumber\": \"4951525561\",\n  \"PatientMedicareRefNumber\": \"2\",\n  \"ServicingProviderNumber\": \"2447781L\",\n  \"PrincipalProviderNumber\": \"2447781L\",\n  \"MedicareItems\": []\n}"

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

```java No Medicare Items
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

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

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

$client = new \GuzzleHttp\Client();

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

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

```csharp No Medicare Items
using RestSharp;

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

```swift No Medicare Items
import Foundation

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

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

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