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

# Same Day Delete

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

Same Day Delete lets a practice **withdraw an interactive patient claim** that was sent **earlier the same calendar
day**. Medicare only allows the delete when the original claim was **accepted and assessed** (final status
**`MEDICARE_ASSESSED`**).

**Matching the original submission:** use the **same transaction correlation**, **location context**, and **patient
details** as the claim you are withdrawing, sent through this API.

**Headers and registration:** use the same Medicare claiming header pattern as your other interactive patient claims (including
`dhs-correlationId` and `dhs-auditId`, which Medicare uses in its business rules). Your organisation must have suitable
**PRODA** access and a **Notice of Intent (NOI)** that covers interactive claiming **and** same-day delete.

**Messages from Medicare:** when you surface errors to end users, show **`serviceMessage[].reason`** **exactly as
returned** — do not shorten, paraphrase, or “improve” the wording.

Field rules, lengths, formats, and examples are on the **request body**, **`200`**, and **`400`** schemas below.


Reference: https://docs.rebateright.com.au/api-reference/medicare-claiming/interactive-patient-claims/same-day-delete

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /Medicare/samedaydelete/v1:
    post:
      operationId: same-day-delete
      summary: Same Day Delete
      description: >
        Same Day Delete lets a practice **withdraw an interactive patient
        claim** that was sent **earlier the same calendar

        day**. Medicare only allows the delete when the original claim was
        **accepted and assessed** (final status

        **`MEDICARE_ASSESSED`**).


        **Matching the original submission:** use the **same transaction
        correlation**, **location context**, and **patient

        details** as the claim you are withdrawing, sent through this API.


        **Headers and registration:** use the same Medicare claiming header
        pattern as your other interactive patient claims (including

        `dhs-correlationId` and `dhs-auditId`, which Medicare uses in its
        business rules). Your organisation must have suitable

        **PRODA** access and a **Notice of Intent (NOI)** that covers
        interactive claiming **and** same-day delete.


        **Messages from Medicare:** when you surface errors to end users, show
        **`serviceMessage[].reason`** **exactly as

        returned** — do not shorten, paraphrase, or “improve” the wording.


        Field rules, lengths, formats, and examples are on the **request body**,
        **`200`**, and **`400`** schemas below.
      tags:
        - >-
          subpackage_medicareClaiming.subpackage_medicareClaiming/interactivePatientClaims
      parameters:
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: >-
            OK — delete accepted. When Medicare removes the claim, **status** is
            **`SUCCESS`**.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Medicare Claiming_Interactive patient
                  claims_Same Day Delete_Response_200
        '400':
          description: >-
            YAML / schema validation or Medicare business-rule failure
            (`serviceMessage` + `correlationId`).
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PostMedicareSamedaydeleteV1RequestBadRequestError
      requestBody:
        description: >
          Body for a same-day delete. It identifies the **original claim’s
          transaction** and supplies the **patient** and

          **reasonCode** Medicare uses to validate the delete.


          Medicare ties the delete to the original claim using
          **`dhs-correlationId`** (transaction correlation) and

          **`dhs-auditId`** (location / audit context), together with the values
          in this JSON.
        content:
          application/json:
            schema:
              type: object
              properties:
                correlationId:
                  type: string
                  description: >
                    Correlation / transaction id for the **original**
                    interactive claim to delete. It must refer to a claim
                    Medicare

                    can match **for the same calendar day** and **same
                    location** as this delete request. If nothing matches,

                    Medicare often returns **`9775`** (see the **`400`**
                    response — `serviceMessage[].code`).
                sameDayDelete:
                  $ref: >-
                    #/components/schemas/MedicareSamedaydeleteV1PostRequestBodyContentApplicationJsonSchemaSameDayDelete
                  description: >
                    Patient identity and Medicare card details must match the
                    **original** claim. **reasonCode** is required.
              required:
                - correlationId
                - sameDayDelete
servers:
  - url: https://api.rebateright.com.au
  - url: https://test-api.rebateright.com.au
components:
  schemas:
    MedicareSamedaydeleteV1PostRequestBodyContentApplicationJsonSchemaSameDayDeletePatientIdentity:
      type: object
      properties:
        givenName:
          type: string
          description: >
            Patient first given name (1–40 characters). If the patient has
            **only one legal name**, put

            that name in **familyName** and set **givenName** to the literal
            **`Onlyname`** (this exact

            spelling is required by Medicare for single-name patients).


            Allowed characters: letters A–Z / a–z, digits 0–9, space, apostrophe
            `'`, hyphen `-`; at least

            one letter or digit; no leading/trailing spaces around apostrophes,
            hyphens, or other spaces.
        familyName:
          type: string
          description: >
            Patient family name (1–40 characters). Single-name rule: use
            **`Onlyname`** in **givenName**

            as above.


            Same character and spacing rules as **givenName**.
      required:
        - givenName
        - familyName
      description: Legal name fields — lengths and character rules below.
      title: >-
        MedicareSamedaydeleteV1PostRequestBodyContentApplicationJsonSchemaSameDayDeletePatientIdentity
    MedicareSamedaydeleteV1PostRequestBodyContentApplicationJsonSchemaSameDayDeletePatientMedicare:
      type: object
      properties:
        memberNumber:
          type: string
          description: >
            10-digit Medicare card number. The first nine digits must satisfy
            Medicare’s **check digit**

            rules for card numbers. The **10th** digit is the **card issue
            number** printed on the card and

            must be **1–9** — it must **not** be `0`.
        memberRefNumber:
          type: string
          description: >
            **Individual Reference Number (IRN)** on the card — exactly **one**
            digit, **1–9**, never **`0`**.
      required:
        - memberNumber
        - memberRefNumber
      description: Medicare card on the original claim (must match).
      title: >-
        MedicareSamedaydeleteV1PostRequestBodyContentApplicationJsonSchemaSameDayDeletePatientMedicare
    MedicareSamedaydeleteV1PostRequestBodyContentApplicationJsonSchemaSameDayDeletePatient:
      type: object
      properties:
        identity:
          $ref: >-
            #/components/schemas/MedicareSamedaydeleteV1PostRequestBodyContentApplicationJsonSchemaSameDayDeletePatientIdentity
          description: Legal name fields — lengths and character rules below.
        medicare:
          $ref: >-
            #/components/schemas/MedicareSamedaydeleteV1PostRequestBodyContentApplicationJsonSchemaSameDayDeletePatientMedicare
          description: Medicare card on the original claim (must match).
      required:
        - identity
        - medicare
      description: Patient on the original claim (must match what was transmitted).
      title: >-
        MedicareSamedaydeleteV1PostRequestBodyContentApplicationJsonSchemaSameDayDeletePatient
    MedicareSamedaydeleteV1PostRequestBodyContentApplicationJsonSchemaSameDayDeleteReasonCode:
      type: string
      enum:
        - '001'
        - '002'
        - '003'
        - '004'
        - '005'
        - '006'
        - '007'
      description: >
        Required three-digit reason code. Medicare only accepts the values
        below; anything else typically

        returns **`9202`** with a message that lists the allowed codes.


        | Code | Meaning |

        |---|---|

        | `001` | Incorrect patient selection |

        | `002` | Incorrect provider details |

        | `003` | Incorrect date of service |

        | `004` | Incorrect item number claimed |

        | `005` | Omitted text on original claim |

        | `006` | Incorrect payment type (paid / unpaid) |

        | `007` | Other |
      title: >-
        MedicareSamedaydeleteV1PostRequestBodyContentApplicationJsonSchemaSameDayDeleteReasonCode
    MedicareSamedaydeleteV1PostRequestBodyContentApplicationJsonSchemaSameDayDelete:
      type: object
      properties:
        patient:
          $ref: >-
            #/components/schemas/MedicareSamedaydeleteV1PostRequestBodyContentApplicationJsonSchemaSameDayDeletePatient
          description: Patient on the original claim (must match what was transmitted).
        reasonCode:
          $ref: >-
            #/components/schemas/MedicareSamedaydeleteV1PostRequestBodyContentApplicationJsonSchemaSameDayDeleteReasonCode
          description: >
            Required three-digit reason code. Medicare only accepts the values
            below; anything else typically

            returns **`9202`** with a message that lists the allowed codes.


            | Code | Meaning |

            |---|---|

            | `001` | Incorrect patient selection |

            | `002` | Incorrect provider details |

            | `003` | Incorrect date of service |

            | `004` | Incorrect item number claimed |

            | `005` | Omitted text on original claim |

            | `006` | Incorrect payment type (paid / unpaid) |

            | `007` | Other |
      required:
        - patient
        - reasonCode
      description: >
        Patient identity and Medicare card details must match the **original**
        claim. **reasonCode** is required.
      title: >-
        MedicareSamedaydeleteV1PostRequestBodyContentApplicationJsonSchemaSameDayDelete
    MedicareSamedaydeleteV1PostResponsesContentApplicationJsonSchemaStatus:
      type: string
      enum:
        - SUCCESS
      description: >
        Outcome when Medicare **accepts** the same-day delete.


        | Value | Meaning |

        |---|---|

        | `SUCCESS` | Same-day delete processed; the claim is removed at
        Medicare. |
      title: MedicareSamedaydeleteV1PostResponsesContentApplicationJsonSchemaStatus
    Medicare Claiming_Interactive patient claims_Same Day Delete_Response_200:
      type: object
      properties:
        status:
          $ref: >-
            #/components/schemas/MedicareSamedaydeleteV1PostResponsesContentApplicationJsonSchemaStatus
          description: >
            Outcome when Medicare **accepts** the same-day delete.


            | Value | Meaning |

            |---|---|

            | `SUCCESS` | Same-day delete processed; the claim is removed at
            Medicare. |
        correlationId:
          type: string
          description: >
            Optional echo of the request correlation id for support tracing —
            not always returned.
      required:
        - status
      description: >
        On success, Medicare returns at least **`status`**. **`correlationId`**
        may also be present for tracing,

        depending on the path the response took — treat it as **optional** when
        present.
      title: >-
        Medicare Claiming_Interactive patient claims_Same Day
        Delete_Response_200
    MedicareSamedaydeleteV1PostResponsesContentApplicationJsonSchemaServiceMessageItems:
      type: object
      properties:
        code:
          type: string
          description: >
            Medicare **code** (string in JSON). You will often see the values
            below for same-day delete; many

            other codes exist for validation, connectivity, and internal errors.


            | Code | Typical situation |

            |---|---|

            | `9202` | Field, format, or business-rule rejection (wrong reason
            code, name, Medicare number, IRN, etc.). **Many** different `reason`
            strings use this same code. |

            | `9775` | **Correlation id not found** — no claim matches the id
            you sent, or the claim is not eligible for same-day delete (wrong
            day, location, status, and similar). |

            | `9646` | Example: Medicare **could not locate** the claim for
            delete. |

            | `9647` | Example: claim **already deleted**. |


            **Other codes:** always persist **`code`**, **`reason`**, and
            **`severity`** together and handle unknown

            codes gracefully — Medicare does not publish a single fixed list in
            this API reference.
        reason:
          type: string
          description: >-
            Human-readable text from Medicare — show **unchanged** when
            displaying errors to end users.
        severity:
          type: string
          description: Severity for this message (e.g. `Error`).
      required:
        - code
        - reason
        - severity
      title: >-
        MedicareSamedaydeleteV1PostResponsesContentApplicationJsonSchemaServiceMessageItems
    PostMedicareSamedaydeleteV1RequestBadRequestError:
      type: object
      properties:
        highestSeverity:
          type: string
          description: Highest severity across all messages (typically `Error`).
        correlationId:
          type: string
          description: >-
            Echo of the request correlation id when supplied; may be generated
            for this call when omitted upstream.
        serviceMessage:
          type: array
          items:
            $ref: >-
              #/components/schemas/MedicareSamedaydeleteV1PostResponsesContentApplicationJsonSchemaServiceMessageItems
          description: One or more Medicare validation or business-rule messages.
      required:
        - highestSeverity
        - correlationId
        - serviceMessage
      description: >
        Standard Medicare **`serviceMessage`** envelope (same shape as
        interactive patient claim errors). **`code`** is Medicare’s
        machine-facing

        code; **`reason`** is the human-readable text — when you show errors to
        users, display **`reason`** **verbatim**

        (do not reword).
      title: PostMedicareSamedaydeleteV1RequestBadRequestError
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
    minorId:
      type: apiKey
      in: header
      name: x-minor-id

```

## SDK Code Examples

```python Success
import requests

url = "https://api.rebateright.com.au/Medicare/samedaydelete/v1"

payload = {
    "correlationId": "urn:uuid:MDE00000ba81c42faf654e8b",
    "sameDayDelete": {
        "patient": {
            "identity": {
                "givenName": "Clint",
                "familyName": "FLETCHER"
            },
            "medicare": {
                "memberNumber": "4951525561",
                "memberRefNumber": "3"
            }
        },
        "reasonCode": "001"
    }
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Success
const url = 'https://api.rebateright.com.au/Medicare/samedaydelete/v1';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"correlationId":"urn:uuid:MDE00000ba81c42faf654e8b","sameDayDelete":{"patient":{"identity":{"givenName":"Clint","familyName":"FLETCHER"},"medicare":{"memberNumber":"4951525561","memberRefNumber":"3"}},"reasonCode":"001"}}'
};

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

```go Success
package main

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

func main() {

	url := "https://api.rebateright.com.au/Medicare/samedaydelete/v1"

	payload := strings.NewReader("{\n  \"correlationId\": \"urn:uuid:MDE00000ba81c42faf654e8b\",\n  \"sameDayDelete\": {\n    \"patient\": {\n      \"identity\": {\n        \"givenName\": \"Clint\",\n        \"familyName\": \"FLETCHER\"\n      },\n      \"medicare\": {\n        \"memberNumber\": \"4951525561\",\n        \"memberRefNumber\": \"3\"\n      }\n    },\n    \"reasonCode\": \"001\"\n  }\n}")

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

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

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

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

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

}
```

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

url = URI("https://api.rebateright.com.au/Medicare/samedaydelete/v1")

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

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"correlationId\": \"urn:uuid:MDE00000ba81c42faf654e8b\",\n  \"sameDayDelete\": {\n    \"patient\": {\n      \"identity\": {\n        \"givenName\": \"Clint\",\n        \"familyName\": \"FLETCHER\"\n      },\n      \"medicare\": {\n        \"memberNumber\": \"4951525561\",\n        \"memberRefNumber\": \"3\"\n      }\n    },\n    \"reasonCode\": \"001\"\n  }\n}"

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

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

HttpResponse<String> response = Unirest.post("https://api.rebateright.com.au/Medicare/samedaydelete/v1")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"correlationId\": \"urn:uuid:MDE00000ba81c42faf654e8b\",\n  \"sameDayDelete\": {\n    \"patient\": {\n      \"identity\": {\n        \"givenName\": \"Clint\",\n        \"familyName\": \"FLETCHER\"\n      },\n      \"medicare\": {\n        \"memberNumber\": \"4951525561\",\n        \"memberRefNumber\": \"3\"\n      }\n    },\n    \"reasonCode\": \"001\"\n  }\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.rebateright.com.au/Medicare/samedaydelete/v1', [
  'body' => '{
  "correlationId": "urn:uuid:MDE00000ba81c42faf654e8b",
  "sameDayDelete": {
    "patient": {
      "identity": {
        "givenName": "Clint",
        "familyName": "FLETCHER"
      },
      "medicare": {
        "memberNumber": "4951525561",
        "memberRefNumber": "3"
      }
    },
    "reasonCode": "001"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Success
using RestSharp;

var client = new RestClient("https://api.rebateright.com.au/Medicare/samedaydelete/v1");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"correlationId\": \"urn:uuid:MDE00000ba81c42faf654e8b\",\n  \"sameDayDelete\": {\n    \"patient\": {\n      \"identity\": {\n        \"givenName\": \"Clint\",\n        \"familyName\": \"FLETCHER\"\n      },\n      \"medicare\": {\n        \"memberNumber\": \"4951525561\",\n        \"memberRefNumber\": \"3\"\n      }\n    },\n    \"reasonCode\": \"001\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Success
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "correlationId": "urn:uuid:MDE00000ba81c42faf654e8b",
  "sameDayDelete": [
    "patient": [
      "identity": [
        "givenName": "Clint",
        "familyName": "FLETCHER"
      ],
      "medicare": [
        "memberNumber": "4951525561",
        "memberRefNumber": "3"
      ]
    ],
    "reasonCode": "001"
  ]
] as [String : Any]

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

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