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

# Overseas Visitor Eligibility Check

POST https://test-api.rebateright.com.au/Medicare/onlineeligibilitycheck/overseas/v2
Content-Type: application/json

**What will an overseas visitor's health fund pay for this treatment?**

That is the question this endpoint answers before treatment, in hospital or out of hospital,
as an estimate from the visitor's Australian health fund.

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

Use it when a medical provider treats an overseas visitor who holds cover with an Australian
health fund. The check goes to the visitor's health fund alone, and sends no Medicare details.
The fund returns its cover and its benefit for each MBS item, prosthesis or miscellaneous item
you send.

Send `typeCode` as `ECO`. Send `hospitalInd` as `Y` for treatment in hospital, or `N` for
treatment out of hospital. `hospitalInd` decides which admission fields you send:

| Field           | In hospital (`Y`)                 | Out of hospital (`N`) |
| --------------- | --------------------------------- | --------------------- |
| `facilityId`    | Required                          | Optional              |
| `sameDayInd`    | Required                          | Send `Y`              |
| `lengthOfStay`  | Required when `sameDayInd` is `N` | Leave out             |
| `admissionDate` | Required                          | Leave out             |
| `dischargeDate` | Optional                          | Leave out             |

Out of hospital, send `sameDayInd` as `Y`, because without it Medicare asks for `lengthOfStay`.

The estimate supports informed financial consent. The fund assesses the actual claim on the
visitor's cover when the claim is made.

#### Response `status`

| Value                     | Meaning                                                                                  |
| ------------------------- | ---------------------------------------------------------------------------------------- |
| `COMPLETE`                | The fund answered. `healthFundStatus` and `healthFundClaimEstimation` hold the estimate. |
| `HEALTH_FUND_REJECTED`    | The fund rejected the check                                                              |
| `HEALTH_FUND_UNAVAILABLE` | The fund's system is unavailable. Check again later.                                     |

If the fund takes longer than 30 seconds to answer, the check fails with code `3040`. Send it again.

#### Limits

A request holds up to 16 medical events, numbered from `01` in order. Each medical event holds
between 1 and 14 services, and the request holds up to 50.

#### Validation errors (`400`)

| Code                          | Meaning                                                                                                                                                          |
| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `9202`                        | A submitted field failed its checks. The `reason` in `serviceMessage` names the field and the problem.                                                           |
| `2030`                        | Two fields conflict, or a date breaks its rule. The `reason` names the rule and, where it applies, the medical event and service.                                |
| `9672`                        | `organisation` is missing from the current fund list. Refresh your list from [Get Participants](/api-reference/health-funds/get-participants), then check again. |
| `2025`, `2032`, `2033`        | The request is over one of the limits above.                                                                                                                     |
| `5`, with `codeType` `DHSEIN` | The request does not match the expected structure, such as a missing required field or a number sent as a string. `message` names the problem.                   |

#### Showing the result

[Give the patient the report](/health-fund-checks#give-the-patient-the-report) sets out what a
result shown or printed for the patient must carry.

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

Reference: https://docs.rebateright.com.au/api-reference/health-funds/overseas-visitor-eligibility-check

## Authentication

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

## Servers

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

## Request

### Headers

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

### Body (application/json)

This endpoint expects an object.

- `claim` (MedicareOnlineeligibilitycheckOverseasV2PostRequestBodyContentApplicationJsonSchemaClaim, required)

## Response

### 200

OK

- `status` (enum, required) — Outcome of the check. The status table at the top of this page explains each value.
  - Allowed values: `COMPLETE`, `HEALTH_FUND_REJECTED`, `HEALTH_FUND_UNAVAILABLE`
- `correlationId` (string, required) — Unique identifier for this transaction. Use it for tracing and support.
- `claimSummary` (MedicareOnlineeligibilitycheckOverseasV2PostResponsesContentApplicationJsonSchemaClaimSummary, optional)
- `healthFundStatus` (MedicareOnlineeligibilitycheckOverseasV2PostResponsesContentApplicationJsonSchemaHealthFundStatus, optional) — The fund's check of the membership. Code `0` means the fund holds the membership.
- `healthFundClaimEstimation` (MedicareOnlineeligibilitycheckOverseasV2PostResponsesContentApplicationJsonSchemaHealthFundClaimEstimation, optional) — The fund's estimate for the treatment. The test environment's fund returns the fields in the examples. A fund can also return `exclusionDescription`, `patientCoPayment`, `patientExcessPayment`, `productTier` and `additionalClinicalCategories`.

## Errors

### 400 Bad Request Error

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

- `PostMedicareOnlineeligibilitycheckOverseasV2RequestBadRequestError`

## Types

### MedicareOnlineeligibilitycheckOverseasV2PostRequestBodyContentApplicationJsonSchemaClaim

- `accountReferenceId` (string, required) — Your reference for this estimate, 1–20 letters or digits, not all zeros. The response returns it in `claimSummary.accountReferenceId`.
- `claimTypeCode` (enum, required) — The type of claim the estimate is for. | Code | Meaning | |------|---------| | `AG` | Agreement | | `SC` | Scheme | | `MB` | Billing Agent | | `PC` | Patient Claim | [Which claim type do I send?](/in-patient-claiming#which-claim-type-do-i-send) defines each claim type.
  - Allowed values: `AG`, `SC`, `MB`, `PC`
- `compensationClaimInd` (enum, required) — Whether the treatment is part of a compensation claim. | Code | Meaning | |------|---------| | `Y` | Compensation claim | | `N` | Not a compensation claim |
  - Allowed values: `Y`, `N`
- `hospitalInd` (enum, required) — Whether the treatment is in hospital. The table at the top of this page shows the fields each value needs. | Code | Meaning | |------|---------| | `Y` | In hospital | | `N` | Out of hospital |
  - Allowed values: `Y`, `N`
- `peaRequestInd` (enum, required) — Whether you ask the fund to assess a pre-existing ailment for this treatment. The fund's answer is in `peaPotentialInd`. | Code | Meaning | |------|---------| | `Y` | Assess a pre-existing ailment | | `N` | No assessment requested |
  - Allowed values: `Y`, `N`
- `serviceTypeCode` (enum, required) — The kind of service. | Code | Meaning | |------|---------| | `O` | General | | `P` | Pathology | | `S` | Specialist, including diagnostic imaging and radiation oncology |
  - Allowed values: `O`, `P`, `S`
- `submissionAuthorityInd` (enum, required) — Must be `Y`, confirming the visitor authorised your practice to send this check on their behalf. | Code | Meaning | |------|---------| | `Y` | Authorised by the visitor |
  - Allowed values: `Y`
- `typeCode` (enum, required) — Must be `ECO` on this endpoint. Any other value returns `400` with code `2030`. | Code | Meaning | |------|---------| | `ECO` | Overseas visitor eligibility check |
  - Allowed values: `ECO`
- `patient` (MedicareOnlineeligibilitycheckOverseasV2PostRequestBodyContentApplicationJsonSchemaClaimPatient, required)
- `principalProvider` (MedicareOnlineeligibilitycheckOverseasV2PostRequestBodyContentApplicationJsonSchemaClaimPrincipalProvider, required)
- `accident` (MedicareOnlineeligibilitycheckOverseasV2PostRequestBodyContentApplicationJsonSchemaClaimAccident, required)
- `medicalEvent` (list of MedicareOnlineeligibilitycheckOverseasV2PostRequestBodyContentApplicationJsonSchemaClaimMedicalEventItems, required) — The treatment, as up to 16 medical events. In hospital, every medical event carries the same `admissionDate` and `dischargeDate`.
- `emergencyAdmissionInd` (enum, optional) — Optional. Whether the admission is an emergency. | Code | Meaning | |------|---------| | `Y` | Emergency admission | | `N` | Planned admission |
  - Allowed values: `Y`, `N`
- `facilityId` (string, optional) — The hospital or day facility's 8-character facility ID, in provider number format. Required when `hospitalInd` is `Y`.
- `fundPayeeId` (string, optional) — Optional. The fund's agreement identifier for the practitioner, 1–12 letters or digits.
- `lengthOfStay` (integer, optional) — The expected length of stay in days, from 1 to 999, sent as a JSON number. It must equal the days from `admissionDate` to `dischargeDate`. Send it when `sameDayInd` is `N`, and leave it out when `sameDayInd` is `Y`.
- `presentingIllnessCode` (string, optional) — The presenting illness code, from `0` to `999`. Send this or `presentingIllnessItemNumber`, never both.
- `presentingIllnessItemNumber` (string, optional) — The MBS item that describes the presenting illness, such as `30026`. Send this or `presentingIllnessCode`, never both.
- `sameDayInd` (enum, optional) — Whether the visitor is admitted and discharged on the same day. Send `Y` for treatment out of hospital. | Code | Meaning | |------|---------| | `Y` | Same day, or out of hospital | | `N` | Overnight stay. Send `lengthOfStay`. |
  - Allowed values: `Y`, `N`
- `senderContact` (MedicareOnlineeligibilitycheckOverseasV2PostRequestBodyContentApplicationJsonSchemaClaimSenderContact, optional) — Optional. The person at your practice to contact about this check.

### MedicareOnlineeligibilitycheckOverseasV2PostResponsesContentApplicationJsonSchemaClaimSummary

- `accountReferenceId` (string, optional) — The `accountReferenceId` you sent.

### MedicareOnlineeligibilitycheckOverseasV2PostResponsesContentApplicationJsonSchemaHealthFundStatus

The fund's check of the membership. Code `0` means the fund holds the membership.

- `status` (MedicareOnlineeligibilitycheckOverseasV2PostResponsesContentApplicationJsonSchemaHealthFundStatusStatus, optional)

### MedicareOnlineeligibilitycheckOverseasV2PostResponsesContentApplicationJsonSchemaHealthFundClaimEstimation

The fund's estimate for the treatment. The test environment's fund returns the fields in the examples. A fund can also return `exclusionDescription`, `patientCoPayment`, `patientExcessPayment`, `productTier` and `additionalClinicalCategories`.

- `healthFundTable` (MedicareOnlineeligibilitycheckOverseasV2PostResponsesContentApplicationJsonSchemaHealthFundClaimEstimationHealthFundTable, optional) — The visitor's cover. A fund calls each of its covers a table.
- `productTier` (string, optional) — The tier of the visitor's hospital cover, such as `Gold`, `Silver Plus` or `Basic`.
- `additionalClinicalCategories` (list of string, optional) — The additional clinical categories the visitor's hospital cover includes, such as `Cataracts` or `Joint replacements`.
- `benefitLimitations` (string, optional) — The limits on the fund's benefits, in the fund's words.
- `exclusionDescription` (string, optional) — The treatments the cover excludes, in the fund's words.
- `financialStatus` (string, optional) — Whether the membership is financial, `Y` or `N`.
- `fundAssessmentCode` (string, optional) — The fund's assessment code for the treatment, such as `A`. The fund sets the codes.
- `fundReferenceId` (string, optional) — The fund's reference for this estimate.
- `peaPotentialInd` (string, optional) — Whether a pre-existing ailment may apply to the treatment, `Y` or `N`.
- `patientCoPayment` (MedicareOnlineeligibilitycheckOverseasV2PostResponsesContentApplicationJsonSchemaHealthFundClaimEstimationPatientCoPayment, optional) — The co-payment the visitor pays, as the fund supplies it. A blank `amount` beside an `amountDescription` means the fund gave no figure, so show it blank, never as zero.
- `patientExcessPayment` (MedicareOnlineeligibilitycheckOverseasV2PostResponsesContentApplicationJsonSchemaHealthFundClaimEstimationPatientExcessPayment, optional) — The excess the visitor pays, as the fund supplies it. A blank `amount` beside an `amountDescription` means the fund gave no figure, so show it blank, never as zero.
- `explanation` (list of MedicareOnlineeligibilitycheckOverseasV2PostResponsesContentApplicationJsonSchemaHealthFundClaimEstimationExplanationItems, optional) — The fund's explanations for the estimate.
- `medicalEvent` (list of MedicareOnlineeligibilitycheckOverseasV2PostResponsesContentApplicationJsonSchemaHealthFundClaimEstimationMedicalEventItems, optional) — The estimate for each medical event, with an estimate for each service.

### Service message

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

### Structure error

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

### MedicareOnlineeligibilitycheckOverseasV2PostRequestBodyContentApplicationJsonSchemaClaimPatient

- `identity` (MedicareOnlineeligibilitycheckOverseasV2PostRequestBodyContentApplicationJsonSchemaClaimPatientIdentity, required)
- `healthFund` (MedicareOnlineeligibilitycheckOverseasV2PostRequestBodyContentApplicationJsonSchemaClaimPatientHealthFund, required)
- `alsoKnownAs` (MedicareOnlineeligibilitycheckOverseasV2PostRequestBodyContentApplicationJsonSchemaClaimPatientAlsoKnownAs, optional) — Optional. The visitor's name as the fund holds it, when it differs from `identity`. Leave it out rather than send it empty.

### MedicareOnlineeligibilitycheckOverseasV2PostRequestBodyContentApplicationJsonSchemaClaimPrincipalProvider

- `providerNumber` (string, required) — The provider number of the principal provider for the treatment, such as `2447781L`.

### MedicareOnlineeligibilitycheckOverseasV2PostRequestBodyContentApplicationJsonSchemaClaimAccident

- `accidentInd` (enum, required) — Whether the treatment results from an accident. | Code | Meaning | |------|---------| | `Y` | Results from an accident. Send `accidentDate`. | | `N` | Does not result from an accident, or unknown |
  - Allowed values: `Y`, `N`
- `accidentDate` (date, optional) — The date of the accident. Send it when `accidentInd` is `Y`, and leave it out when `accidentInd` is `N`. It cannot be in the future.

### MedicareOnlineeligibilitycheckOverseasV2PostRequestBodyContentApplicationJsonSchemaClaimMedicalEventItems

- `id` (string, required) — The medical event number, 2 digits, starting at `01` and rising by 1 for each medical event.
- `serviceProvider` (MedicareOnlineeligibilitycheckOverseasV2PostRequestBodyContentApplicationJsonSchemaClaimMedicalEventItemsServiceProvider, required)
- `service` (list of MedicareOnlineeligibilitycheckOverseasV2PostRequestBodyContentApplicationJsonSchemaClaimMedicalEventItemsServiceItems, required) — The services to estimate, from 1 to 14 in each medical event.
- `admissionDate` (date, optional) — The admission date. Send it when `hospitalInd` is `Y`, and leave it out when `hospitalInd` is `N`. It can be up to 12 months ahead and up to 7 days in the past, and it cannot be before the visitor's date of birth or after a `dateOfService`.
- `dischargeDate` (date, optional) — The discharge date. It is optional when `hospitalInd` is `Y`, and left out when `hospitalInd` is `N`. It cannot be before `admissionDate`.

### MedicareOnlineeligibilitycheckOverseasV2PostRequestBodyContentApplicationJsonSchemaClaimSenderContact

Optional. The person at your practice to contact about this check.

- `name` (string, optional) — The contact's name, 1–40 letters, digits, spaces, apostrophes and hyphens.
- `phoneNumber` (string, optional) — The contact's phone number, 8–19 characters of digits, spaces and `( ) - +`.
- `emailAddress` (string, optional) — The contact's email address, 5–128 characters, with an `@` and no spaces.

### MedicareOnlineeligibilitycheckOverseasV2PostResponsesContentApplicationJsonSchemaHealthFundStatusStatus

- `code` (integer, required) — Health fund status code. [Health Fund Verification](/api-reference/health-funds/health-fund-verification) lists the codes.
- `text` (string, required) — The message to show the user, exactly as supplied.

### MedicareOnlineeligibilitycheckOverseasV2PostResponsesContentApplicationJsonSchemaHealthFundClaimEstimationHealthFundTable

The visitor's cover. A fund calls each of its covers a table.

- `tableName` (string, optional) — The name of the cover, such as `Basic Hospital`.
- `tableDescription` (string, optional) — The fund's description of the cover.
- `tableScale` (string, optional) — Who the cover is for, such as `SINGLE`.

### MedicareOnlineeligibilitycheckOverseasV2PostResponsesContentApplicationJsonSchemaHealthFundClaimEstimationPatientCoPayment

The co-payment the visitor pays, as the fund supplies it. A blank `amount` beside an `amountDescription` means the fund gave no figure, so show it blank, never as zero.

- `amount` (any, optional) — The co-payment amount.
- `amountDescription` (string, optional) — The fund's description of the co-payment.
- `daysRemaining` (any, optional) — The days remaining, as the fund supplies them.

### MedicareOnlineeligibilitycheckOverseasV2PostResponsesContentApplicationJsonSchemaHealthFundClaimEstimationPatientExcessPayment

The excess the visitor pays, as the fund supplies it. A blank `amount` beside an `amountDescription` means the fund gave no figure, so show it blank, never as zero.

- `amount` (any, optional) — The excess amount.
- `amountDescription` (string, optional) — The fund's description of the excess.
- `bonusAmount` (any, optional) — The bonus amount, as the fund supplies it.

### MedicareOnlineeligibilitycheckOverseasV2PostResponsesContentApplicationJsonSchemaHealthFundClaimEstimationExplanationItems

- `code` (string, optional) — The fund's explanation code.
- `text` (string, optional) — The explanation to show the user, exactly as supplied.

### MedicareOnlineeligibilitycheckOverseasV2PostResponsesContentApplicationJsonSchemaHealthFundClaimEstimationMedicalEventItems

- `id` (string, optional) — The medical event number you sent.
- `service` (list of MedicareOnlineeligibilitycheckOverseasV2PostResponsesContentApplicationJsonSchemaHealthFundClaimEstimationMedicalEventItemsServiceItems, optional)

### MedicareOnlineeligibilitycheckOverseasV2PostResponsesContentApplicationJsonSchemaOneOf0ServiceMessageItems

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

### MedicareOnlineeligibilitycheckOverseasV2PostRequestBodyContentApplicationJsonSchemaClaimPatientIdentity

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

### MedicareOnlineeligibilitycheckOverseasV2PostRequestBodyContentApplicationJsonSchemaClaimPatientHealthFund

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

### MedicareOnlineeligibilitycheckOverseasV2PostRequestBodyContentApplicationJsonSchemaClaimPatientAlsoKnownAs

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

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

### MedicareOnlineeligibilitycheckOverseasV2PostRequestBodyContentApplicationJsonSchemaClaimMedicalEventItemsServiceProvider

- `providerNumber` (string, required) — The provider number of the practitioner who gives the services, such as `2447781L`.

### MedicareOnlineeligibilitycheckOverseasV2PostRequestBodyContentApplicationJsonSchemaClaimMedicalEventItemsServiceItems

- `id` (string, required) — The service number, exactly 4 digits such as `0001`, unique across the request.
- `serviceCodeTypeCode` (enum, required) — The kind of item. | Code | Meaning | |------|---------| | `C` | MBS item. Send `itemNumber`. | | `M` | Miscellaneous item. Send `serviceCode`, `serviceQuantity` and `serviceRate`. | | `P` | Prosthesis. Send `serviceCode`, `serviceQuantity` and `serviceRate`. |
  - Allowed values: `C`, `M`, `P`
- `chargeAmount` (string, required) — The total charge in cents, sent as a string, from `100` ($1.00) to `999999999`.
- `dateOfService` (date, required) — The date of the service. It cannot be before the accident date, more than 7 days in the past, or before the visitor's date of birth.
- `itemNumber` (string, optional) — The MBS item number, such as `23`. Required when `serviceCodeTypeCode` is `C`.
- `serviceCode` (string, optional) — The code of the prosthesis or miscellaneous item, 1–11 letters or digits. It cannot be `0`. Send it when `serviceCodeTypeCode` is `M` or `P`, and leave it out when it is `C`.
- `serviceQuantity` (integer, optional) — The number of items, from 0 to 99, sent as a JSON number. Send it when `serviceCodeTypeCode` is `M` or `P`, and leave it out when it is `C`.
- `serviceRate` (integer, optional) — The price of one item in cents, sent as a JSON number. Send it when `serviceCodeTypeCode` is `M` or `P`, and leave it out when it is `C`.
- `duplicateServiceOverrideInd` (enum, optional) — Optional, for an MBS item when `serviceTypeCode` is `O` or `S`. Set to `Y` if multiple same-day services by the same provider should be treated as separate. | Code | Meaning | |------|---------| | `Y` | Treat as separate services |
  - Allowed values: `Y`

### MedicareOnlineeligibilitycheckOverseasV2PostResponsesContentApplicationJsonSchemaHealthFundClaimEstimationMedicalEventItemsServiceItems

- `id` (string, optional) — The service number you sent.
- `benefit` (integer, optional) — The fund's benefit for the service, in cents.
- `chargeAmount` (string, optional) — The charge you sent, in cents.
- `dateOfService` (date, optional) — The date of service you sent.
- `fundAssessmentCode` (string, optional) — The fund's assessment code for the service, such as `A`.
- `itemNumber` (string, optional) — The MBS item number you sent.
- `serviceCode` (string, optional) — The item code you sent, for a prosthesis or miscellaneous item.
- `serviceCodeTypeCode` (string, optional) — The kind of item you sent.
- `explanation` (list of MedicareOnlineeligibilitycheckOverseasV2PostResponsesContentApplicationJsonSchemaHealthFundClaimEstimationMedicalEventItemsServiceItemsExplanationItems, optional) — The fund's explanations for the service.

### MedicareOnlineeligibilitycheckOverseasV2PostResponsesContentApplicationJsonSchemaHealthFundClaimEstimationMedicalEventItemsServiceItemsExplanationItems

- `code` (string, optional) — The fund's explanation code.
- `text` (string, optional) — The explanation to show the user, exactly as supplied.

## Examples

### In Hospital

**Request**

```json
{
  "claim": {
    "accountReferenceId": "QUOTE0011",
    "claimTypeCode": "AG",
    "compensationClaimInd": "N",
    "hospitalInd": "Y",
    "peaRequestInd": "N",
    "serviceTypeCode": "O",
    "submissionAuthorityInd": "Y",
    "typeCode": "ECO",
    "patient": {
      "identity": {
        "dateOfBirth": "1993-08-14",
        "familyName": "NASH",
        "givenName": "Hazel",
        "sex": "2"
      },
      "healthFund": {
        "memberNumber": "1234567",
        "organisation": "TST",
        "memberRefNumber": "1"
      }
    },
    "principalProvider": {
      "providerNumber": "2447781L"
    },
    "accident": {
      "accidentInd": "N"
    },
    "medicalEvent": [
      {
        "id": "01",
        "serviceProvider": {
          "providerNumber": "2447781L"
        },
        "service": [
          {
            "id": "0001",
            "serviceCodeTypeCode": "C",
            "chargeAmount": "12000",
            "dateOfService": "2027-09-01",
            "itemNumber": "30026"
          }
        ],
        "admissionDate": "2027-09-01"
      }
    ],
    "facilityId": "9988770W",
    "presentingIllnessItemNumber": "30026",
    "sameDayInd": "Y"
  }
}
```

**Response**

```json
{
  "status": "COMPLETE",
  "correlationId": "urn:uuid:MDE00000227d6350388e426a",
  "claimSummary": {
    "accountReferenceId": "QUOTE0011"
  },
  "healthFundStatus": {
    "status": {
      "code": 0,
      "text": "Patient is known to the Health Fund specified in the request."
    }
  },
  "healthFundClaimEstimation": {
    "healthFundTable": {
      "tableName": "Basic Hospital",
      "tableDescription": "Hospital cover only",
      "tableScale": "SINGLE"
    },
    "benefitLimitations": "This is to test a return of 100 character entry in the table description or benefit limitations....",
    "financialStatus": "Y",
    "fundAssessmentCode": "A",
    "fundReferenceId": "STS012102",
    "peaPotentialInd": "N",
    "explanation": [
      {
        "code": "1001",
        "text": "Patient to contact Health Fund"
      }
    ],
    "medicalEvent": [
      {
        "id": "01",
        "service": [
          {
            "id": "0001",
            "benefit": 2000,
            "chargeAmount": "12000",
            "dateOfService": "2027-09-01",
            "fundAssessmentCode": "A",
            "itemNumber": "30026",
            "serviceCodeTypeCode": "C",
            "explanation": [
              {
                "code": "2001",
                "text": "The Fund does not pay for this sort of stuff"
              }
            ]
          }
        ]
      }
    ]
  }
}
```

**SDK Code**

```python In Hospital
import requests

url = "https://test-api.rebateright.com.au/Medicare/onlineeligibilitycheck/overseas/v2"

payload = { "claim": {
        "accountReferenceId": "QUOTE0011",
        "claimTypeCode": "AG",
        "compensationClaimInd": "N",
        "hospitalInd": "Y",
        "peaRequestInd": "N",
        "serviceTypeCode": "O",
        "submissionAuthorityInd": "Y",
        "typeCode": "ECO",
        "patient": {
            "identity": {
                "dateOfBirth": "1993-08-14",
                "familyName": "NASH",
                "givenName": "Hazel",
                "sex": "2"
            },
            "healthFund": {
                "memberNumber": "1234567",
                "organisation": "TST",
                "memberRefNumber": "1"
            }
        },
        "principalProvider": { "providerNumber": "2447781L" },
        "accident": { "accidentInd": "N" },
        "medicalEvent": [
            {
                "id": "01",
                "serviceProvider": { "providerNumber": "2447781L" },
                "service": [
                    {
                        "id": "0001",
                        "serviceCodeTypeCode": "C",
                        "chargeAmount": "12000",
                        "dateOfService": "2027-09-01",
                        "itemNumber": "30026"
                    }
                ],
                "admissionDate": "2027-09-01"
            }
        ],
        "facilityId": "9988770W",
        "presentingIllnessItemNumber": "30026",
        "sameDayInd": "Y"
    } }
headers = {
    "x-minor-id": "<minorId>",
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript In Hospital
const url = 'https://test-api.rebateright.com.au/Medicare/onlineeligibilitycheck/overseas/v2';
const options = {
  method: 'POST',
  headers: {
    'x-minor-id': '<minorId>',
    'x-api-key': '<apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{"claim":{"accountReferenceId":"QUOTE0011","claimTypeCode":"AG","compensationClaimInd":"N","hospitalInd":"Y","peaRequestInd":"N","serviceTypeCode":"O","submissionAuthorityInd":"Y","typeCode":"ECO","patient":{"identity":{"dateOfBirth":"1993-08-14","familyName":"NASH","givenName":"Hazel","sex":"2"},"healthFund":{"memberNumber":"1234567","organisation":"TST","memberRefNumber":"1"}},"principalProvider":{"providerNumber":"2447781L"},"accident":{"accidentInd":"N"},"medicalEvent":[{"id":"01","serviceProvider":{"providerNumber":"2447781L"},"service":[{"id":"0001","serviceCodeTypeCode":"C","chargeAmount":"12000","dateOfService":"2027-09-01","itemNumber":"30026"}],"admissionDate":"2027-09-01"}],"facilityId":"9988770W","presentingIllnessItemNumber":"30026","sameDayInd":"Y"}}'
};

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

```go In Hospital
package main

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

func main() {

	url := "https://test-api.rebateright.com.au/Medicare/onlineeligibilitycheck/overseas/v2"

	payload := strings.NewReader("{\n  \"claim\": {\n    \"accountReferenceId\": \"QUOTE0011\",\n    \"claimTypeCode\": \"AG\",\n    \"compensationClaimInd\": \"N\",\n    \"hospitalInd\": \"Y\",\n    \"peaRequestInd\": \"N\",\n    \"serviceTypeCode\": \"O\",\n    \"submissionAuthorityInd\": \"Y\",\n    \"typeCode\": \"ECO\",\n    \"patient\": {\n      \"identity\": {\n        \"dateOfBirth\": \"1993-08-14\",\n        \"familyName\": \"NASH\",\n        \"givenName\": \"Hazel\",\n        \"sex\": \"2\"\n      },\n      \"healthFund\": {\n        \"memberNumber\": \"1234567\",\n        \"organisation\": \"TST\",\n        \"memberRefNumber\": \"1\"\n      }\n    },\n    \"principalProvider\": {\n      \"providerNumber\": \"2447781L\"\n    },\n    \"accident\": {\n      \"accidentInd\": \"N\"\n    },\n    \"medicalEvent\": [\n      {\n        \"id\": \"01\",\n        \"serviceProvider\": {\n          \"providerNumber\": \"2447781L\"\n        },\n        \"service\": [\n          {\n            \"id\": \"0001\",\n            \"serviceCodeTypeCode\": \"C\",\n            \"chargeAmount\": \"12000\",\n            \"dateOfService\": \"2027-09-01\",\n            \"itemNumber\": \"30026\"\n          }\n        ],\n        \"admissionDate\": \"2027-09-01\"\n      }\n    ],\n    \"facilityId\": \"9988770W\",\n    \"presentingIllnessItemNumber\": \"30026\",\n    \"sameDayInd\": \"Y\"\n  }\n}")

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

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

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

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

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

}
```

```ruby In Hospital
require 'uri'
require 'net/http'

url = URI("https://test-api.rebateright.com.au/Medicare/onlineeligibilitycheck/overseas/v2")

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

request = Net::HTTP::Post.new(url)
request["x-minor-id"] = '<minorId>'
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"claim\": {\n    \"accountReferenceId\": \"QUOTE0011\",\n    \"claimTypeCode\": \"AG\",\n    \"compensationClaimInd\": \"N\",\n    \"hospitalInd\": \"Y\",\n    \"peaRequestInd\": \"N\",\n    \"serviceTypeCode\": \"O\",\n    \"submissionAuthorityInd\": \"Y\",\n    \"typeCode\": \"ECO\",\n    \"patient\": {\n      \"identity\": {\n        \"dateOfBirth\": \"1993-08-14\",\n        \"familyName\": \"NASH\",\n        \"givenName\": \"Hazel\",\n        \"sex\": \"2\"\n      },\n      \"healthFund\": {\n        \"memberNumber\": \"1234567\",\n        \"organisation\": \"TST\",\n        \"memberRefNumber\": \"1\"\n      }\n    },\n    \"principalProvider\": {\n      \"providerNumber\": \"2447781L\"\n    },\n    \"accident\": {\n      \"accidentInd\": \"N\"\n    },\n    \"medicalEvent\": [\n      {\n        \"id\": \"01\",\n        \"serviceProvider\": {\n          \"providerNumber\": \"2447781L\"\n        },\n        \"service\": [\n          {\n            \"id\": \"0001\",\n            \"serviceCodeTypeCode\": \"C\",\n            \"chargeAmount\": \"12000\",\n            \"dateOfService\": \"2027-09-01\",\n            \"itemNumber\": \"30026\"\n          }\n        ],\n        \"admissionDate\": \"2027-09-01\"\n      }\n    ],\n    \"facilityId\": \"9988770W\",\n    \"presentingIllnessItemNumber\": \"30026\",\n    \"sameDayInd\": \"Y\"\n  }\n}"

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

```java In Hospital
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://test-api.rebateright.com.au/Medicare/onlineeligibilitycheck/overseas/v2")
  .header("x-minor-id", "<minorId>")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"claim\": {\n    \"accountReferenceId\": \"QUOTE0011\",\n    \"claimTypeCode\": \"AG\",\n    \"compensationClaimInd\": \"N\",\n    \"hospitalInd\": \"Y\",\n    \"peaRequestInd\": \"N\",\n    \"serviceTypeCode\": \"O\",\n    \"submissionAuthorityInd\": \"Y\",\n    \"typeCode\": \"ECO\",\n    \"patient\": {\n      \"identity\": {\n        \"dateOfBirth\": \"1993-08-14\",\n        \"familyName\": \"NASH\",\n        \"givenName\": \"Hazel\",\n        \"sex\": \"2\"\n      },\n      \"healthFund\": {\n        \"memberNumber\": \"1234567\",\n        \"organisation\": \"TST\",\n        \"memberRefNumber\": \"1\"\n      }\n    },\n    \"principalProvider\": {\n      \"providerNumber\": \"2447781L\"\n    },\n    \"accident\": {\n      \"accidentInd\": \"N\"\n    },\n    \"medicalEvent\": [\n      {\n        \"id\": \"01\",\n        \"serviceProvider\": {\n          \"providerNumber\": \"2447781L\"\n        },\n        \"service\": [\n          {\n            \"id\": \"0001\",\n            \"serviceCodeTypeCode\": \"C\",\n            \"chargeAmount\": \"12000\",\n            \"dateOfService\": \"2027-09-01\",\n            \"itemNumber\": \"30026\"\n          }\n        ],\n        \"admissionDate\": \"2027-09-01\"\n      }\n    ],\n    \"facilityId\": \"9988770W\",\n    \"presentingIllnessItemNumber\": \"30026\",\n    \"sameDayInd\": \"Y\"\n  }\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://test-api.rebateright.com.au/Medicare/onlineeligibilitycheck/overseas/v2', [
  'body' => '{
  "claim": {
    "accountReferenceId": "QUOTE0011",
    "claimTypeCode": "AG",
    "compensationClaimInd": "N",
    "hospitalInd": "Y",
    "peaRequestInd": "N",
    "serviceTypeCode": "O",
    "submissionAuthorityInd": "Y",
    "typeCode": "ECO",
    "patient": {
      "identity": {
        "dateOfBirth": "1993-08-14",
        "familyName": "NASH",
        "givenName": "Hazel",
        "sex": "2"
      },
      "healthFund": {
        "memberNumber": "1234567",
        "organisation": "TST",
        "memberRefNumber": "1"
      }
    },
    "principalProvider": {
      "providerNumber": "2447781L"
    },
    "accident": {
      "accidentInd": "N"
    },
    "medicalEvent": [
      {
        "id": "01",
        "serviceProvider": {
          "providerNumber": "2447781L"
        },
        "service": [
          {
            "id": "0001",
            "serviceCodeTypeCode": "C",
            "chargeAmount": "12000",
            "dateOfService": "2027-09-01",
            "itemNumber": "30026"
          }
        ],
        "admissionDate": "2027-09-01"
      }
    ],
    "facilityId": "9988770W",
    "presentingIllnessItemNumber": "30026",
    "sameDayInd": "Y"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
    'x-minor-id' => '<minorId>',
  ],
]);

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

```csharp In Hospital
using RestSharp;

var client = new RestClient("https://test-api.rebateright.com.au/Medicare/onlineeligibilitycheck/overseas/v2");
var request = new RestRequest(Method.POST);
request.AddHeader("x-minor-id", "<minorId>");
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"claim\": {\n    \"accountReferenceId\": \"QUOTE0011\",\n    \"claimTypeCode\": \"AG\",\n    \"compensationClaimInd\": \"N\",\n    \"hospitalInd\": \"Y\",\n    \"peaRequestInd\": \"N\",\n    \"serviceTypeCode\": \"O\",\n    \"submissionAuthorityInd\": \"Y\",\n    \"typeCode\": \"ECO\",\n    \"patient\": {\n      \"identity\": {\n        \"dateOfBirth\": \"1993-08-14\",\n        \"familyName\": \"NASH\",\n        \"givenName\": \"Hazel\",\n        \"sex\": \"2\"\n      },\n      \"healthFund\": {\n        \"memberNumber\": \"1234567\",\n        \"organisation\": \"TST\",\n        \"memberRefNumber\": \"1\"\n      }\n    },\n    \"principalProvider\": {\n      \"providerNumber\": \"2447781L\"\n    },\n    \"accident\": {\n      \"accidentInd\": \"N\"\n    },\n    \"medicalEvent\": [\n      {\n        \"id\": \"01\",\n        \"serviceProvider\": {\n          \"providerNumber\": \"2447781L\"\n        },\n        \"service\": [\n          {\n            \"id\": \"0001\",\n            \"serviceCodeTypeCode\": \"C\",\n            \"chargeAmount\": \"12000\",\n            \"dateOfService\": \"2027-09-01\",\n            \"itemNumber\": \"30026\"\n          }\n        ],\n        \"admissionDate\": \"2027-09-01\"\n      }\n    ],\n    \"facilityId\": \"9988770W\",\n    \"presentingIllnessItemNumber\": \"30026\",\n    \"sameDayInd\": \"Y\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift In Hospital
import Foundation

let headers = [
  "x-minor-id": "<minorId>",
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["claim": [
    "accountReferenceId": "QUOTE0011",
    "claimTypeCode": "AG",
    "compensationClaimInd": "N",
    "hospitalInd": "Y",
    "peaRequestInd": "N",
    "serviceTypeCode": "O",
    "submissionAuthorityInd": "Y",
    "typeCode": "ECO",
    "patient": [
      "identity": [
        "dateOfBirth": "1993-08-14",
        "familyName": "NASH",
        "givenName": "Hazel",
        "sex": "2"
      ],
      "healthFund": [
        "memberNumber": "1234567",
        "organisation": "TST",
        "memberRefNumber": "1"
      ]
    ],
    "principalProvider": ["providerNumber": "2447781L"],
    "accident": ["accidentInd": "N"],
    "medicalEvent": [
      [
        "id": "01",
        "serviceProvider": ["providerNumber": "2447781L"],
        "service": [
          [
            "id": "0001",
            "serviceCodeTypeCode": "C",
            "chargeAmount": "12000",
            "dateOfService": "2027-09-01",
            "itemNumber": "30026"
          ]
        ],
        "admissionDate": "2027-09-01"
      ]
    ],
    "facilityId": "9988770W",
    "presentingIllnessItemNumber": "30026",
    "sameDayInd": "Y"
  ]] as [String : Any]

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

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

### Out of Hospital

**Request**

```json
{
  "claim": {
    "accountReferenceId": "QUOTE0012",
    "claimTypeCode": "PC",
    "compensationClaimInd": "N",
    "hospitalInd": "N",
    "peaRequestInd": "N",
    "serviceTypeCode": "O",
    "submissionAuthorityInd": "Y",
    "typeCode": "ECO",
    "patient": {
      "identity": {
        "dateOfBirth": "1993-08-14",
        "familyName": "NASH",
        "givenName": "Hazel",
        "sex": "2"
      },
      "healthFund": {
        "memberNumber": "1234567",
        "organisation": "TST",
        "memberRefNumber": "1"
      }
    },
    "principalProvider": {
      "providerNumber": "2447781L"
    },
    "accident": {
      "accidentInd": "N"
    },
    "medicalEvent": [
      {
        "id": "01",
        "serviceProvider": {
          "providerNumber": "2447781L"
        },
        "service": [
          {
            "id": "0001",
            "serviceCodeTypeCode": "C",
            "chargeAmount": "6000",
            "dateOfService": "2027-09-01",
            "itemNumber": "23"
          }
        ]
      }
    ],
    "presentingIllnessItemNumber": "23",
    "sameDayInd": "Y"
  }
}
```

**Response**

```json
{
  "status": "COMPLETE",
  "correlationId": "urn:uuid:MDE00000cc9c7ba5a87d4969",
  "claimSummary": {
    "accountReferenceId": "QUOTE0012"
  },
  "healthFundStatus": {
    "status": {
      "code": 0,
      "text": "Patient is known to the Health Fund specified in the request."
    }
  },
  "healthFundClaimEstimation": {
    "healthFundTable": {
      "tableName": "Basic Hospital",
      "tableDescription": "Hospital cover only",
      "tableScale": "SINGLE"
    },
    "benefitLimitations": "This is to test a return of 100 character entry in the table description or benefit limitations....",
    "financialStatus": "Y",
    "fundAssessmentCode": "A",
    "fundReferenceId": "STS012102",
    "peaPotentialInd": "N",
    "explanation": [
      {
        "code": "1001",
        "text": "Patient to contact Health Fund"
      }
    ],
    "medicalEvent": [
      {
        "id": "01",
        "service": [
          {
            "id": "0001",
            "benefit": 2000,
            "chargeAmount": "6000",
            "dateOfService": "2027-09-01",
            "fundAssessmentCode": "A",
            "itemNumber": "23",
            "serviceCodeTypeCode": "C",
            "explanation": [
              {
                "code": "2001",
                "text": "The Fund does not pay for this sort of stuff"
              }
            ]
          }
        ]
      }
    ]
  }
}
```

**SDK Code**

```python Out of Hospital
import requests

url = "https://test-api.rebateright.com.au/Medicare/onlineeligibilitycheck/overseas/v2"

payload = { "claim": {
        "accountReferenceId": "QUOTE0012",
        "claimTypeCode": "PC",
        "compensationClaimInd": "N",
        "hospitalInd": "N",
        "peaRequestInd": "N",
        "serviceTypeCode": "O",
        "submissionAuthorityInd": "Y",
        "typeCode": "ECO",
        "patient": {
            "identity": {
                "dateOfBirth": "1993-08-14",
                "familyName": "NASH",
                "givenName": "Hazel",
                "sex": "2"
            },
            "healthFund": {
                "memberNumber": "1234567",
                "organisation": "TST",
                "memberRefNumber": "1"
            }
        },
        "principalProvider": { "providerNumber": "2447781L" },
        "accident": { "accidentInd": "N" },
        "medicalEvent": [
            {
                "id": "01",
                "serviceProvider": { "providerNumber": "2447781L" },
                "service": [
                    {
                        "id": "0001",
                        "serviceCodeTypeCode": "C",
                        "chargeAmount": "6000",
                        "dateOfService": "2027-09-01",
                        "itemNumber": "23"
                    }
                ]
            }
        ],
        "presentingIllnessItemNumber": "23",
        "sameDayInd": "Y"
    } }
headers = {
    "x-minor-id": "<minorId>",
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Out of Hospital
const url = 'https://test-api.rebateright.com.au/Medicare/onlineeligibilitycheck/overseas/v2';
const options = {
  method: 'POST',
  headers: {
    'x-minor-id': '<minorId>',
    'x-api-key': '<apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{"claim":{"accountReferenceId":"QUOTE0012","claimTypeCode":"PC","compensationClaimInd":"N","hospitalInd":"N","peaRequestInd":"N","serviceTypeCode":"O","submissionAuthorityInd":"Y","typeCode":"ECO","patient":{"identity":{"dateOfBirth":"1993-08-14","familyName":"NASH","givenName":"Hazel","sex":"2"},"healthFund":{"memberNumber":"1234567","organisation":"TST","memberRefNumber":"1"}},"principalProvider":{"providerNumber":"2447781L"},"accident":{"accidentInd":"N"},"medicalEvent":[{"id":"01","serviceProvider":{"providerNumber":"2447781L"},"service":[{"id":"0001","serviceCodeTypeCode":"C","chargeAmount":"6000","dateOfService":"2027-09-01","itemNumber":"23"}]}],"presentingIllnessItemNumber":"23","sameDayInd":"Y"}}'
};

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

```go Out of Hospital
package main

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

func main() {

	url := "https://test-api.rebateright.com.au/Medicare/onlineeligibilitycheck/overseas/v2"

	payload := strings.NewReader("{\n  \"claim\": {\n    \"accountReferenceId\": \"QUOTE0012\",\n    \"claimTypeCode\": \"PC\",\n    \"compensationClaimInd\": \"N\",\n    \"hospitalInd\": \"N\",\n    \"peaRequestInd\": \"N\",\n    \"serviceTypeCode\": \"O\",\n    \"submissionAuthorityInd\": \"Y\",\n    \"typeCode\": \"ECO\",\n    \"patient\": {\n      \"identity\": {\n        \"dateOfBirth\": \"1993-08-14\",\n        \"familyName\": \"NASH\",\n        \"givenName\": \"Hazel\",\n        \"sex\": \"2\"\n      },\n      \"healthFund\": {\n        \"memberNumber\": \"1234567\",\n        \"organisation\": \"TST\",\n        \"memberRefNumber\": \"1\"\n      }\n    },\n    \"principalProvider\": {\n      \"providerNumber\": \"2447781L\"\n    },\n    \"accident\": {\n      \"accidentInd\": \"N\"\n    },\n    \"medicalEvent\": [\n      {\n        \"id\": \"01\",\n        \"serviceProvider\": {\n          \"providerNumber\": \"2447781L\"\n        },\n        \"service\": [\n          {\n            \"id\": \"0001\",\n            \"serviceCodeTypeCode\": \"C\",\n            \"chargeAmount\": \"6000\",\n            \"dateOfService\": \"2027-09-01\",\n            \"itemNumber\": \"23\"\n          }\n        ]\n      }\n    ],\n    \"presentingIllnessItemNumber\": \"23\",\n    \"sameDayInd\": \"Y\"\n  }\n}")

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

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

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

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

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

}
```

```ruby Out of Hospital
require 'uri'
require 'net/http'

url = URI("https://test-api.rebateright.com.au/Medicare/onlineeligibilitycheck/overseas/v2")

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

request = Net::HTTP::Post.new(url)
request["x-minor-id"] = '<minorId>'
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"claim\": {\n    \"accountReferenceId\": \"QUOTE0012\",\n    \"claimTypeCode\": \"PC\",\n    \"compensationClaimInd\": \"N\",\n    \"hospitalInd\": \"N\",\n    \"peaRequestInd\": \"N\",\n    \"serviceTypeCode\": \"O\",\n    \"submissionAuthorityInd\": \"Y\",\n    \"typeCode\": \"ECO\",\n    \"patient\": {\n      \"identity\": {\n        \"dateOfBirth\": \"1993-08-14\",\n        \"familyName\": \"NASH\",\n        \"givenName\": \"Hazel\",\n        \"sex\": \"2\"\n      },\n      \"healthFund\": {\n        \"memberNumber\": \"1234567\",\n        \"organisation\": \"TST\",\n        \"memberRefNumber\": \"1\"\n      }\n    },\n    \"principalProvider\": {\n      \"providerNumber\": \"2447781L\"\n    },\n    \"accident\": {\n      \"accidentInd\": \"N\"\n    },\n    \"medicalEvent\": [\n      {\n        \"id\": \"01\",\n        \"serviceProvider\": {\n          \"providerNumber\": \"2447781L\"\n        },\n        \"service\": [\n          {\n            \"id\": \"0001\",\n            \"serviceCodeTypeCode\": \"C\",\n            \"chargeAmount\": \"6000\",\n            \"dateOfService\": \"2027-09-01\",\n            \"itemNumber\": \"23\"\n          }\n        ]\n      }\n    ],\n    \"presentingIllnessItemNumber\": \"23\",\n    \"sameDayInd\": \"Y\"\n  }\n}"

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

```java Out of Hospital
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://test-api.rebateright.com.au/Medicare/onlineeligibilitycheck/overseas/v2")
  .header("x-minor-id", "<minorId>")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"claim\": {\n    \"accountReferenceId\": \"QUOTE0012\",\n    \"claimTypeCode\": \"PC\",\n    \"compensationClaimInd\": \"N\",\n    \"hospitalInd\": \"N\",\n    \"peaRequestInd\": \"N\",\n    \"serviceTypeCode\": \"O\",\n    \"submissionAuthorityInd\": \"Y\",\n    \"typeCode\": \"ECO\",\n    \"patient\": {\n      \"identity\": {\n        \"dateOfBirth\": \"1993-08-14\",\n        \"familyName\": \"NASH\",\n        \"givenName\": \"Hazel\",\n        \"sex\": \"2\"\n      },\n      \"healthFund\": {\n        \"memberNumber\": \"1234567\",\n        \"organisation\": \"TST\",\n        \"memberRefNumber\": \"1\"\n      }\n    },\n    \"principalProvider\": {\n      \"providerNumber\": \"2447781L\"\n    },\n    \"accident\": {\n      \"accidentInd\": \"N\"\n    },\n    \"medicalEvent\": [\n      {\n        \"id\": \"01\",\n        \"serviceProvider\": {\n          \"providerNumber\": \"2447781L\"\n        },\n        \"service\": [\n          {\n            \"id\": \"0001\",\n            \"serviceCodeTypeCode\": \"C\",\n            \"chargeAmount\": \"6000\",\n            \"dateOfService\": \"2027-09-01\",\n            \"itemNumber\": \"23\"\n          }\n        ]\n      }\n    ],\n    \"presentingIllnessItemNumber\": \"23\",\n    \"sameDayInd\": \"Y\"\n  }\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://test-api.rebateright.com.au/Medicare/onlineeligibilitycheck/overseas/v2', [
  'body' => '{
  "claim": {
    "accountReferenceId": "QUOTE0012",
    "claimTypeCode": "PC",
    "compensationClaimInd": "N",
    "hospitalInd": "N",
    "peaRequestInd": "N",
    "serviceTypeCode": "O",
    "submissionAuthorityInd": "Y",
    "typeCode": "ECO",
    "patient": {
      "identity": {
        "dateOfBirth": "1993-08-14",
        "familyName": "NASH",
        "givenName": "Hazel",
        "sex": "2"
      },
      "healthFund": {
        "memberNumber": "1234567",
        "organisation": "TST",
        "memberRefNumber": "1"
      }
    },
    "principalProvider": {
      "providerNumber": "2447781L"
    },
    "accident": {
      "accidentInd": "N"
    },
    "medicalEvent": [
      {
        "id": "01",
        "serviceProvider": {
          "providerNumber": "2447781L"
        },
        "service": [
          {
            "id": "0001",
            "serviceCodeTypeCode": "C",
            "chargeAmount": "6000",
            "dateOfService": "2027-09-01",
            "itemNumber": "23"
          }
        ]
      }
    ],
    "presentingIllnessItemNumber": "23",
    "sameDayInd": "Y"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
    'x-minor-id' => '<minorId>',
  ],
]);

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

```csharp Out of Hospital
using RestSharp;

var client = new RestClient("https://test-api.rebateright.com.au/Medicare/onlineeligibilitycheck/overseas/v2");
var request = new RestRequest(Method.POST);
request.AddHeader("x-minor-id", "<minorId>");
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"claim\": {\n    \"accountReferenceId\": \"QUOTE0012\",\n    \"claimTypeCode\": \"PC\",\n    \"compensationClaimInd\": \"N\",\n    \"hospitalInd\": \"N\",\n    \"peaRequestInd\": \"N\",\n    \"serviceTypeCode\": \"O\",\n    \"submissionAuthorityInd\": \"Y\",\n    \"typeCode\": \"ECO\",\n    \"patient\": {\n      \"identity\": {\n        \"dateOfBirth\": \"1993-08-14\",\n        \"familyName\": \"NASH\",\n        \"givenName\": \"Hazel\",\n        \"sex\": \"2\"\n      },\n      \"healthFund\": {\n        \"memberNumber\": \"1234567\",\n        \"organisation\": \"TST\",\n        \"memberRefNumber\": \"1\"\n      }\n    },\n    \"principalProvider\": {\n      \"providerNumber\": \"2447781L\"\n    },\n    \"accident\": {\n      \"accidentInd\": \"N\"\n    },\n    \"medicalEvent\": [\n      {\n        \"id\": \"01\",\n        \"serviceProvider\": {\n          \"providerNumber\": \"2447781L\"\n        },\n        \"service\": [\n          {\n            \"id\": \"0001\",\n            \"serviceCodeTypeCode\": \"C\",\n            \"chargeAmount\": \"6000\",\n            \"dateOfService\": \"2027-09-01\",\n            \"itemNumber\": \"23\"\n          }\n        ]\n      }\n    ],\n    \"presentingIllnessItemNumber\": \"23\",\n    \"sameDayInd\": \"Y\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Out of Hospital
import Foundation

let headers = [
  "x-minor-id": "<minorId>",
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["claim": [
    "accountReferenceId": "QUOTE0012",
    "claimTypeCode": "PC",
    "compensationClaimInd": "N",
    "hospitalInd": "N",
    "peaRequestInd": "N",
    "serviceTypeCode": "O",
    "submissionAuthorityInd": "Y",
    "typeCode": "ECO",
    "patient": [
      "identity": [
        "dateOfBirth": "1993-08-14",
        "familyName": "NASH",
        "givenName": "Hazel",
        "sex": "2"
      ],
      "healthFund": [
        "memberNumber": "1234567",
        "organisation": "TST",
        "memberRefNumber": "1"
      ]
    ],
    "principalProvider": ["providerNumber": "2447781L"],
    "accident": ["accidentInd": "N"],
    "medicalEvent": [
      [
        "id": "01",
        "serviceProvider": ["providerNumber": "2447781L"],
        "service": [
          [
            "id": "0001",
            "serviceCodeTypeCode": "C",
            "chargeAmount": "6000",
            "dateOfService": "2027-09-01",
            "itemNumber": "23"
          ]
        ]
      ]
    ],
    "presentingIllnessItemNumber": "23",
    "sameDayInd": "Y"
  ]] as [String : Any]

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

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