> 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.

# In-Patient Claim Report

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

**How did Medicare and the health fund assess this in-patient claim?**

That is the question this endpoint answers, for up to 1,000 claims in one submission. For every
claim type except Patient Claim, the report gives the benefit for each service.

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

Retrieve an in-patient claim's report once
[Status Report](/api-reference/medicare-claiming/in-patient-claims/status-report) gives its `reportStatus`
as `READY` or `REPORTED`. Send the claim's transaction ID, which is its `correlationId` without
`urn:uuid:`.

## Retrieval status

Each transaction ID gets its own entry in `content`, with one of these values in `status`:

| Value                  | Meaning                                                                                              |
| ---------------------- | ---------------------------------------------------------------------------------------------------- |
| `SUCCESS`              | The claim's report is in `report`.                                                                   |
| `REPORT_NOT_READY`     | Medicare or the health fund is still assessing the claim. Check its status again later.              |
| `REPORT_NOT_FOUND`     | No claim from this Minor ID has this transaction ID, or the claim was lodged more than 6 months ago. |
| `INVALID_CONTENT_TYPE` | The transaction ID belongs to another kind of record.                                                |

The report gives Medicare's assessment of each service, then the health fund's. A Medicare Only (`MO`)
claim has no health fund assessment, and neither does a claim on which Medicare paid no benefit for any
service. A Patient Claim (`PC`) report carries only the claim's status, because the assessment goes to
the patient.

In the **Medicare Rejected** example, Medicare rejected the claim because item `30195` is not in the
current MBS.

[Follow the claim to its outcome](/in-patient-claiming#follow-the-claim-to-its-outcome) gives the
steps from claim to payment, and how long you may retrieve a report.

A malformed request, such as one with a transaction ID that is not 24 characters, receives a **`400`**.
See the `400` response examples.

Reference: https://docs.rebateright.com.au/api-reference/medicare-claiming/in-patient-claims/in-patient-claim-report

## 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. Send the Minor ID that lodged the claims. See [Keys, Minor ID and environments](/keys-and-environments).

### Body (application/json)

This endpoint expects an object.

- `transactionId` (list of string, required) — The transaction IDs of the in-patient claims to retrieve, up to 1,000, each sent once. Send an array, even for one claim. A transaction ID is the claim's `correlationId` without `urn:uuid:`. It is 24 characters: the Minor ID that lodged the claim, then 16 letters or digits, as in `MDE000005b864a2b5f7a4538`.

## Response

### 200

OK

- `content` (list of MedicareInpatientmedicalclaimRetrievereportV1PostResponsesContentApplicationJsonSchemaContentItems, required) — One entry for each transaction ID you sent, in the same order.
- `correlationId` (string, required) — The ID RebateRight generated for this request. Quote it in a support enquiry. It is not a claim's transaction ID.

## Errors

### 400 Bad Request Error

The request failed a check (HTTP 400). The body is either Medicare's `serviceMessage` envelope or a gateway envelope (`code`, `codeType`, `message`). Both carry `correlationId`.

- `PostMedicareInpatientmedicalclaimRetrievereportV1RequestBadRequestError`

## Types

### MedicareInpatientmedicalclaimRetrievereportV1PostResponsesContentApplicationJsonSchemaContentItems

- `transactionId` (string, required) — The transaction ID this entry answers.
- `status` (enum, required) — Whether the report came back. The table at the top of this page explains each value.
  - Allowed values: `SUCCESS`, `REPORT_NOT_READY`, `REPORT_NOT_FOUND`, `INVALID_CONTENT_TYPE`
- `report` (MedicareInpatientmedicalclaimRetrievereportV1PostResponsesContentApplicationJsonSchemaContentItemsReport, optional) — Present when `status` is `SUCCESS`. The claim's assessment. Medicare may include properties beyond those listed.

### PostMedicareInpatientmedicalclaimRetrievereportV1RequestBadRequestError0

- `highestSeverity` (string, required) — The highest severity across the messages, usually `Error`.
- `correlationId` (string, required) — The ID RebateRight generated for this request.
- `serviceMessage` (list of MedicareInpatientmedicalclaimRetrievereportV1PostResponsesContentApplicationJsonSchemaOneOf0ServiceMessageItems, required) — One message for each check the request failed.

### PostMedicareInpatientmedicalclaimRetrievereportV1RequestBadRequestError1

- `code` (integer, required) — The gateway's error code.
- `codeType` (string, required) — The gateway's error category, such as `DHSEIN` for a body that does not match the schema.
- `message` (string, required) — What failed.
- `correlationId` (string, required) — The ID RebateRight generated for this request.

### MedicareInpatientmedicalclaimRetrievereportV1PostResponsesContentApplicationJsonSchemaContentItemsReport

Present when `status` is `SUCCESS`. The claim's assessment. Medicare may include properties beyond those listed.

- `status` (enum, required) — The claim's outcome. | Value | Meaning | |---|---| | `COMPLETE` | Assessment is complete. | | `MEDICARE_REJECTED` | Medicare rejected the claim. `medicareStatus` and each service's `explanationCode` say why. | | `HEALTH_FUND_REJECTED` | The health fund rejected the claim. `healthFundStatus` or `healthFundAssessment` says why. | | `HEALTH_FUND_ASSESSING` | A Billing Agent (`MB`) claim that the health fund has not finished assessing. Medicare's assessment is in the report. | | `HEALTH_FUND_UNPROCESSED` | Patient Claims (`PC`) only. The health fund has not processed the claim. | | `REQUESTED_DELETE` | Patient Claims (`PC`) only. The provider asked Medicare to delete the claim. |
  - Allowed values: `COMPLETE`, `MEDICARE_REJECTED`, `HEALTH_FUND_REJECTED`, `HEALTH_FUND_ASSESSING`, `HEALTH_FUND_UNPROCESSED`, `REQUESTED_DELETE`
- `claimSummary` (MedicareInpatientmedicalclaimRetrievereportV1PostResponsesContentApplicationJsonSchemaContentItemsReportClaimSummary, optional)
- `medicareStatus` (MedicareInpatientmedicalclaimRetrievereportV1PostResponsesContentApplicationJsonSchemaContentItemsReportMedicareStatus, optional) — Medicare's check of the patient.
- `healthFundStatus` (MedicareInpatientmedicalclaimRetrievereportV1PostResponsesContentApplicationJsonSchemaContentItemsReportHealthFundStatus, optional) — The health fund's check of the patient. Absent for a Medicare Only (`MO`) claim.
- `medicareAssessment` (MedicareInpatientmedicalclaimRetrievereportV1PostResponsesContentApplicationJsonSchemaContentItemsReportMedicareAssessment, optional) — Medicare's assessment of the claim. Absent when Medicare or the health fund could not verify the patient.
- `healthFundAssessment` (MedicareInpatientmedicalclaimRetrievereportV1PostResponsesContentApplicationJsonSchemaContentItemsReportHealthFundAssessment, optional) — The health fund's assessment of the claim. Absent for a Medicare Only (`MO`) claim, and for a claim on which Medicare paid nothing for every service.

### MedicareInpatientmedicalclaimRetrievereportV1PostResponsesContentApplicationJsonSchemaOneOf0ServiceMessageItems

- `code` (string, required) — Medicare's error code, such as `2030` for a broken rule or `9202` for an invalid value.
- `severity` (string, required) — The severity of this message, such as `Error`.
- `reason` (string, required) — What failed. Show it to your user exactly as returned.

### MedicareInpatientmedicalclaimRetrievereportV1PostResponsesContentApplicationJsonSchemaContentItemsReportClaimSummary

- `accountReferenceId` (string, optional) — The `accountReferenceId` sent on the claim.

### MedicareInpatientmedicalclaimRetrievereportV1PostResponsesContentApplicationJsonSchemaContentItemsReportMedicareStatus

Medicare's check of the patient.

- `status` (MedicareInpatientmedicalclaimRetrievereportV1PostResponsesContentApplicationJsonSchemaContentItemsReportMedicareStatusStatus, optional)
- `currentMembership` (MedicareInpatientmedicalclaimRetrievereportV1PostResponsesContentApplicationJsonSchemaContentItemsReportMedicareStatusCurrentMembership, optional) — Present when Medicare holds a different card number or IRN from the one on the claim. Offer the user an update to the patient's record.
- `currentMember` (MedicareInpatientmedicalclaimRetrievereportV1PostResponsesContentApplicationJsonSchemaContentItemsReportMedicareStatusCurrentMember, optional) — Present when Medicare holds a different first name from the one on the claim. Offer the user an update to the patient's record.

### MedicareInpatientmedicalclaimRetrievereportV1PostResponsesContentApplicationJsonSchemaContentItemsReportHealthFundStatus

The health fund's check of the patient. Absent for a Medicare Only (`MO`) claim.

- `status` (MedicareInpatientmedicalclaimRetrievereportV1PostResponsesContentApplicationJsonSchemaContentItemsReportHealthFundStatusStatus, optional)

### MedicareInpatientmedicalclaimRetrievereportV1PostResponsesContentApplicationJsonSchemaContentItemsReportMedicareAssessment

Medicare's assessment of the claim. Absent when Medicare or the health fund could not verify the patient.

- `claimId` (string, optional) — Medicare's 5-digit claim ID, as in `02193`. Together with `lodgementDate`, it identifies the claim.
- `fundLocationId` (string, optional) — For a claim paid to a billing agent (`MB` or `MO`), the billing agent's ID. For other claim types, the health fund's location ID.
- `lodgementDate` (date, optional) — The date Medicare received the claim.
- `currentPatient` (MedicareInpatientmedicalclaimRetrievereportV1PostResponsesContentApplicationJsonSchemaContentItemsReportMedicareAssessmentCurrentPatient, optional) — The patient as Medicare held them when it assessed the claim. Where Medicare returns different details, offer the user an update to the patient's record.
- `medicalEvent` (list of MedicareInpatientmedicalclaimRetrievereportV1PostResponsesContentApplicationJsonSchemaContentItemsReportMedicareAssessmentMedicalEventItems, optional) — Medicare's assessment of each medical event on the claim.

### MedicareInpatientmedicalclaimRetrievereportV1PostResponsesContentApplicationJsonSchemaContentItemsReportHealthFundAssessment

The health fund's assessment of the claim. Absent for a Medicare Only (`MO`) claim, and for a claim on which Medicare paid nothing for every service.

- `assessmentCode` (enum, optional) — The health fund's decision on the claim. | Code | Meaning | |------|---------| | `A` | Accepted | | `R` | Rejected |
  - Allowed values: `A`, `R`
- `authorityToPayInd` (string, optional) — Set by the health fund once it has processed the claim, as in `Y`.
- `explanation` (list of MedicareInpatientmedicalclaimRetrievereportV1PostResponsesContentApplicationJsonSchemaContentItemsReportHealthFundAssessmentExplanationItems, optional) — The health fund's explanation of its decision.
- `medicalEvent` (list of MedicareInpatientmedicalclaimRetrievereportV1PostResponsesContentApplicationJsonSchemaContentItemsReportHealthFundAssessmentMedicalEventItems, optional) — The health fund's assessment of each medical event on the claim.

### MedicareInpatientmedicalclaimRetrievereportV1PostResponsesContentApplicationJsonSchemaContentItemsReportMedicareStatusStatus

- `code` (integer, optional) — A code for the result of the check. `0` means the patient is eligible with the details on the claim.
- `text` (string, optional) — The result of the check. Show it to your user exactly as returned.

### MedicareInpatientmedicalclaimRetrievereportV1PostResponsesContentApplicationJsonSchemaContentItemsReportMedicareStatusCurrentMembership

Present when Medicare holds a different card number or IRN from the one on the claim. Offer the user an update to the patient's record.

- `memberNumber` (string, optional) — The 10-digit Medicare card number Medicare holds.
- `memberRefNumber` (string, optional) — The patient's IRN on that card.

### MedicareInpatientmedicalclaimRetrievereportV1PostResponsesContentApplicationJsonSchemaContentItemsReportMedicareStatusCurrentMember

Present when Medicare holds a different first name from the one on the claim. Offer the user an update to the patient's record.

- `givenName` (string, optional) — The first name Medicare holds.

### MedicareInpatientmedicalclaimRetrievereportV1PostResponsesContentApplicationJsonSchemaContentItemsReportHealthFundStatusStatus

- `code` (integer, optional) — A code for the result of the check. `0` means the health fund knows the patient.
- `text` (string, optional) — The result of the check. Show it to your user exactly as returned.

### MedicareInpatientmedicalclaimRetrievereportV1PostResponsesContentApplicationJsonSchemaContentItemsReportMedicareAssessmentCurrentPatient

The patient as Medicare held them when it assessed the claim. Where Medicare returns different details, offer the user an update to the patient's record.

- `status` (MedicareInpatientmedicalclaimRetrievereportV1PostResponsesContentApplicationJsonSchemaContentItemsReportMedicareAssessmentCurrentPatientStatus, optional) — Medicare's note on the patient's details, when it has one.
- `currentMembership` (MedicareInpatientmedicalclaimRetrievereportV1PostResponsesContentApplicationJsonSchemaContentItemsReportMedicareAssessmentCurrentPatientCurrentMembership, optional)
- `currentMember` (MedicareInpatientmedicalclaimRetrievereportV1PostResponsesContentApplicationJsonSchemaContentItemsReportMedicareAssessmentCurrentPatientCurrentMember, optional)

### MedicareInpatientmedicalclaimRetrievereportV1PostResponsesContentApplicationJsonSchemaContentItemsReportMedicareAssessmentMedicalEventItems

- `id` (string, optional) — The medical event's `id` from the claim, as in `01`.
- `cardFlagCode` (string, optional) — A note on the patient's Medicare card. | Code | Meaning | |------|---------| | A space | No change | | `W` | The card expires soon. | | `S` | The card has expired. Medicare may reject future services. | | `X` | The card's issue number is out of date. Medicare may reject future services. |
- `service` (list of MedicareInpatientmedicalclaimRetrievereportV1PostResponsesContentApplicationJsonSchemaContentItemsReportMedicareAssessmentMedicalEventItemsServiceItems, optional) — Medicare's assessment of each service in the medical event.

### MedicareInpatientmedicalclaimRetrievereportV1PostResponsesContentApplicationJsonSchemaContentItemsReportHealthFundAssessmentExplanationItems

- `code` (string, optional) — The health fund's explanation code. `0` means the claim was assessed.
- `text` (string, optional) — The explanation. Show it to your user exactly as returned.

### MedicareInpatientmedicalclaimRetrievereportV1PostResponsesContentApplicationJsonSchemaContentItemsReportHealthFundAssessmentMedicalEventItems

- `id` (string, optional) — The medical event's `id` from the claim, as in `01`.
- `service` (list of MedicareInpatientmedicalclaimRetrievereportV1PostResponsesContentApplicationJsonSchemaContentItemsReportHealthFundAssessmentMedicalEventItemsServiceItems, optional) — The health fund's assessment of each service in the medical event.

### MedicareInpatientmedicalclaimRetrievereportV1PostResponsesContentApplicationJsonSchemaContentItemsReportMedicareAssessmentCurrentPatientStatus

Medicare's note on the patient's details, when it has one.

- `code` (integer, optional) — A 4-digit code for the problem with the patient's details.
- `text` (string, optional) — Explanation of the `code`. Show it to your user exactly as returned.

### MedicareInpatientmedicalclaimRetrievereportV1PostResponsesContentApplicationJsonSchemaContentItemsReportMedicareAssessmentCurrentPatientCurrentMembership

- `memberNumber` (string, optional) — The patient's 10-digit Medicare card number.
- `memberRefNumber` (string, optional) — The patient's IRN on that card.

### MedicareInpatientmedicalclaimRetrievereportV1PostResponsesContentApplicationJsonSchemaContentItemsReportMedicareAssessmentCurrentPatientCurrentMember

- `familyName` (string, optional) — The family name Medicare holds.
- `givenName` (string, optional) — The given name Medicare holds.

### MedicareInpatientmedicalclaimRetrievereportV1PostResponsesContentApplicationJsonSchemaContentItemsReportMedicareAssessmentMedicalEventItemsServiceItems

- `id` (string, optional) — The service's `id` from the claim, as in `0001`.
- `itemNumber` (string, optional) — The MBS item number.
- `dateOfService` (date, optional) — The date of the service.
- `chargeAmount` (string, optional) — The amount charged for the service, in cents, as a string.
- `scheduleFee` (string, optional) — The MBS schedule fee for the item, in cents, as a string.
- `benefit` (string, optional) — The Medicare benefit for the service, in cents, as a string.
- `explanationCode` (string, optional) — Medicare's explanation code for the service. `0` means it has none. Use the [Services Australia lookup tool](https://www.servicesaustralia.gov.au/look-up-medicare-reason-code) to read a code.

### MedicareInpatientmedicalclaimRetrievereportV1PostResponsesContentApplicationJsonSchemaContentItemsReportHealthFundAssessmentMedicalEventItemsServiceItems

- `id` (string, optional) — The service's `id` from the claim, as in `0001`.
- `assessmentCode` (enum, optional) — The health fund's decision on the service. `A` is accepted and `R` is rejected.
  - Allowed values: `A`, `R`
- `itemNumber` (string, optional) — The MBS item number.
- `dateOfService` (date, optional) — The date of the service.
- `chargeAmount` (string, optional) — The amount charged for the service, in cents, as a string.
- `scheduleFee` (string, optional) — The MBS schedule fee for the item, in cents, as a string.
- `benefit` (string, optional) — The health fund benefit for the service, in cents, as a string.
- `explanation` (MedicareInpatientmedicalclaimRetrievereportV1PostResponsesContentApplicationJsonSchemaContentItemsReportHealthFundAssessmentMedicalEventItemsServiceItemsExplanation, optional) — The health fund's explanation for this service, when it has one.

### MedicareInpatientmedicalclaimRetrievereportV1PostResponsesContentApplicationJsonSchemaContentItemsReportHealthFundAssessmentMedicalEventItemsServiceItemsExplanation

The health fund's explanation for this service, when it has one.

- `code` (string, optional) — The health fund's explanation code.
- `text` (string, optional) — The explanation. Show it to your user exactly as returned.

## Examples

### Assessed Claims

**Request**

```json
{
  "transactionId": [
    "MDE000005b864a2b5f7a4538",
    "MDE00000d6e3921b131c4736"
  ]
}
```

**Response**

```json
{
  "content": [
    {
      "transactionId": "MDE000005b864a2b5f7a4538",
      "status": "SUCCESS",
      "report": {
        "status": "COMPLETE",
        "claimSummary": {
          "accountReferenceId": "SMOKEMO02"
        },
        "medicareStatus": {
          "status": {
            "code": 0,
            "text": "Patient is eligible to claim for Medicare with details provided."
          }
        },
        "medicareAssessment": {
          "claimId": "02193",
          "fundLocationId": "3530971X",
          "lodgementDate": "2026-10-21",
          "currentPatient": {
            "currentMembership": {
              "memberNumber": "2954536511",
              "memberRefNumber": "1"
            },
            "currentMember": {
              "familyName": "FULLER",
              "givenName": "MAURICE"
            }
          },
          "medicalEvent": [
            {
              "id": "01",
              "cardFlagCode": " ",
              "service": [
                {
                  "id": "0001",
                  "itemNumber": "30026",
                  "dateOfService": "2026-10-21",
                  "chargeAmount": "12000",
                  "scheduleFee": "6255",
                  "benefit": "4695",
                  "explanationCode": "0"
                }
              ]
            }
          ]
        }
      }
    },
    {
      "transactionId": "MDE00000d6e3921b131c4736",
      "status": "SUCCESS",
      "report": {
        "status": "COMPLETE",
        "claimSummary": {
          "accountReferenceId": "SMOKEAG02"
        },
        "medicareStatus": {
          "status": {
            "code": 0,
            "text": "Patient is eligible to claim for Medicare with details provided."
          }
        },
        "healthFundStatus": {
          "status": {
            "code": 0,
            "text": "Patient is known to the Health Fund specified in the request."
          }
        },
        "medicareAssessment": {
          "claimId": "02194",
          "fundLocationId": "AAA99556",
          "lodgementDate": "2026-10-21",
          "currentPatient": {
            "currentMembership": {
              "memberNumber": "2954536421",
              "memberRefNumber": "1"
            },
            "currentMember": {
              "familyName": "NASH",
              "givenName": "HAZEL"
            }
          },
          "medicalEvent": [
            {
              "id": "01",
              "cardFlagCode": " ",
              "service": [
                {
                  "id": "0001",
                  "itemNumber": "30026",
                  "dateOfService": "2026-10-21",
                  "chargeAmount": "12000",
                  "scheduleFee": "6255",
                  "benefit": "4695",
                  "explanationCode": "0"
                }
              ]
            }
          ]
        },
        "healthFundAssessment": {
          "assessmentCode": "A",
          "authorityToPayInd": "Y",
          "explanation": [
            {
              "code": "0",
              "text": "Claim has been successfully assessed"
            }
          ],
          "medicalEvent": [
            {
              "id": "01",
              "service": [
                {
                  "id": "0001",
                  "assessmentCode": "A",
                  "itemNumber": "30026",
                  "dateOfService": "2026-10-21",
                  "chargeAmount": "12000",
                  "scheduleFee": "6255",
                  "benefit": "1563"
                }
              ]
            }
          ]
        }
      }
    }
  ],
  "correlationId": "urn:uuid:MDE000009611366c86ca4046"
}
```

**SDK Code**

```python Assessed Claims
import requests

url = "https://test-api.rebateright.com.au/Medicare/inpatientmedicalclaim/retrievereport/v1"

payload = { "transactionId": ["MDE000005b864a2b5f7a4538", "MDE00000d6e3921b131c4736"] }
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 Assessed Claims
const url = 'https://test-api.rebateright.com.au/Medicare/inpatientmedicalclaim/retrievereport/v1';
const options = {
  method: 'POST',
  headers: {
    'x-minor-id': '<minorId>',
    'x-api-key': '<apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{"transactionId":["MDE000005b864a2b5f7a4538","MDE00000d6e3921b131c4736"]}'
};

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

```go Assessed Claims
package main

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

func main() {

	url := "https://test-api.rebateright.com.au/Medicare/inpatientmedicalclaim/retrievereport/v1"

	payload := strings.NewReader("{\n  \"transactionId\": [\n    \"MDE000005b864a2b5f7a4538\",\n    \"MDE00000d6e3921b131c4736\"\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 Assessed Claims
require 'uri'
require 'net/http'

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

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

request = Net::HTTP::Post.new(url)
request["x-minor-id"] = '<minorId>'
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"transactionId\": [\n    \"MDE000005b864a2b5f7a4538\",\n    \"MDE00000d6e3921b131c4736\"\n  ]\n}"

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

```java Assessed Claims
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://test-api.rebateright.com.au/Medicare/inpatientmedicalclaim/retrievereport/v1")
  .header("x-minor-id", "<minorId>")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"transactionId\": [\n    \"MDE000005b864a2b5f7a4538\",\n    \"MDE00000d6e3921b131c4736\"\n  ]\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://test-api.rebateright.com.au/Medicare/inpatientmedicalclaim/retrievereport/v1', [
  'body' => '{
  "transactionId": [
    "MDE000005b864a2b5f7a4538",
    "MDE00000d6e3921b131c4736"
  ]
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
    'x-minor-id' => '<minorId>',
  ],
]);

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

```csharp Assessed Claims
using RestSharp;

var client = new RestClient("https://test-api.rebateright.com.au/Medicare/inpatientmedicalclaim/retrievereport/v1");
var request = new RestRequest(Method.POST);
request.AddHeader("x-minor-id", "<minorId>");
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"transactionId\": [\n    \"MDE000005b864a2b5f7a4538\",\n    \"MDE00000d6e3921b131c4736\"\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Assessed Claims
import Foundation

let headers = [
  "x-minor-id": "<minorId>",
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["transactionId": ["MDE000005b864a2b5f7a4538", "MDE00000d6e3921b131c4736"]] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://test-api.rebateright.com.au/Medicare/inpatientmedicalclaim/retrievereport/v1")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Medicare Rejected

**Request**

```json
{
  "transactionId": [
    "MDE00000ec7a2a123121468e"
  ]
}
```

**Response**

```json
{
  "content": [
    {
      "transactionId": "MDE00000ec7a2a123121468e",
      "status": "SUCCESS",
      "report": {
        "status": "MEDICARE_REJECTED",
        "claimSummary": {
          "accountReferenceId": "SMOKEMO01"
        },
        "medicareStatus": {
          "status": {
            "code": 0,
            "text": "Patient is eligible to claim for Medicare with details provided."
          }
        },
        "medicareAssessment": {
          "claimId": "02191",
          "fundLocationId": "3530971X",
          "lodgementDate": "2026-10-21",
          "currentPatient": {
            "currentMembership": {
              "memberNumber": "2954536511",
              "memberRefNumber": "1"
            },
            "currentMember": {
              "familyName": "FULLER",
              "givenName": "MAURICE"
            }
          },
          "medicalEvent": [
            {
              "id": "01",
              "cardFlagCode": " ",
              "service": [
                {
                  "id": "0001",
                  "itemNumber": "30195",
                  "dateOfService": "2026-10-21",
                  "chargeAmount": "12000",
                  "scheduleFee": "0",
                  "benefit": "0",
                  "explanationCode": "206"
                }
              ]
            }
          ]
        }
      }
    }
  ],
  "correlationId": "urn:uuid:MDE0000081d41b9110364327"
}
```

**SDK Code**

```python Medicare Rejected
import requests

url = "https://test-api.rebateright.com.au/Medicare/inpatientmedicalclaim/retrievereport/v1"

payload = { "transactionId": ["MDE00000ec7a2a123121468e"] }
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 Medicare Rejected
const url = 'https://test-api.rebateright.com.au/Medicare/inpatientmedicalclaim/retrievereport/v1';
const options = {
  method: 'POST',
  headers: {
    'x-minor-id': '<minorId>',
    'x-api-key': '<apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{"transactionId":["MDE00000ec7a2a123121468e"]}'
};

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

```go Medicare Rejected
package main

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

func main() {

	url := "https://test-api.rebateright.com.au/Medicare/inpatientmedicalclaim/retrievereport/v1"

	payload := strings.NewReader("{\n  \"transactionId\": [\n    \"MDE00000ec7a2a123121468e\"\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 Medicare Rejected
require 'uri'
require 'net/http'

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

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

request = Net::HTTP::Post.new(url)
request["x-minor-id"] = '<minorId>'
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"transactionId\": [\n    \"MDE00000ec7a2a123121468e\"\n  ]\n}"

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

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

HttpResponse<String> response = Unirest.post("https://test-api.rebateright.com.au/Medicare/inpatientmedicalclaim/retrievereport/v1")
  .header("x-minor-id", "<minorId>")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"transactionId\": [\n    \"MDE00000ec7a2a123121468e\"\n  ]\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://test-api.rebateright.com.au/Medicare/inpatientmedicalclaim/retrievereport/v1', [
  'body' => '{
  "transactionId": [
    "MDE00000ec7a2a123121468e"
  ]
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
    'x-minor-id' => '<minorId>',
  ],
]);

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

```csharp Medicare Rejected
using RestSharp;

var client = new RestClient("https://test-api.rebateright.com.au/Medicare/inpatientmedicalclaim/retrievereport/v1");
var request = new RestRequest(Method.POST);
request.AddHeader("x-minor-id", "<minorId>");
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"transactionId\": [\n    \"MDE00000ec7a2a123121468e\"\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Medicare Rejected
import Foundation

let headers = [
  "x-minor-id": "<minorId>",
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["transactionId": ["MDE00000ec7a2a123121468e"]] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://test-api.rebateright.com.au/Medicare/inpatientmedicalclaim/retrievereport/v1")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Report Not Found

**Request**

```json
{
  "transactionId": [
    "MDE00000d83d269f45104652"
  ]
}
```

**Response**

```json
{
  "content": [
    {
      "transactionId": "MDE00000d83d269f45104652",
      "status": "REPORT_NOT_FOUND"
    }
  ],
  "correlationId": "urn:uuid:MDE0000071b9acb8ad604c0b"
}
```

**SDK Code**

```python Report Not Found
import requests

url = "https://test-api.rebateright.com.au/Medicare/inpatientmedicalclaim/retrievereport/v1"

payload = { "transactionId": ["MDE00000d83d269f45104652"] }
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 Report Not Found
const url = 'https://test-api.rebateright.com.au/Medicare/inpatientmedicalclaim/retrievereport/v1';
const options = {
  method: 'POST',
  headers: {
    'x-minor-id': '<minorId>',
    'x-api-key': '<apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{"transactionId":["MDE00000d83d269f45104652"]}'
};

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

```go Report Not Found
package main

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

func main() {

	url := "https://test-api.rebateright.com.au/Medicare/inpatientmedicalclaim/retrievereport/v1"

	payload := strings.NewReader("{\n  \"transactionId\": [\n    \"MDE00000d83d269f45104652\"\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 Report Not Found
require 'uri'
require 'net/http'

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

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

request = Net::HTTP::Post.new(url)
request["x-minor-id"] = '<minorId>'
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"transactionId\": [\n    \"MDE00000d83d269f45104652\"\n  ]\n}"

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

```java Report Not Found
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://test-api.rebateright.com.au/Medicare/inpatientmedicalclaim/retrievereport/v1")
  .header("x-minor-id", "<minorId>")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"transactionId\": [\n    \"MDE00000d83d269f45104652\"\n  ]\n}")
  .asString();
```

```php Report Not Found
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://test-api.rebateright.com.au/Medicare/inpatientmedicalclaim/retrievereport/v1', [
  'body' => '{
  "transactionId": [
    "MDE00000d83d269f45104652"
  ]
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
    'x-minor-id' => '<minorId>',
  ],
]);

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

```csharp Report Not Found
using RestSharp;

var client = new RestClient("https://test-api.rebateright.com.au/Medicare/inpatientmedicalclaim/retrievereport/v1");
var request = new RestRequest(Method.POST);
request.AddHeader("x-minor-id", "<minorId>");
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"transactionId\": [\n    \"MDE00000d83d269f45104652\"\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Report Not Found
import Foundation

let headers = [
  "x-minor-id": "<minorId>",
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["transactionId": ["MDE00000d83d269f45104652"]] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://test-api.rebateright.com.au/Medicare/inpatientmedicalclaim/retrievereport/v1")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```