Skip to navigation

Errors and retries

What each error means, and when to send a request again
View as Markdown

What you see, and what to do

You seeWhat to do
401 “Unauthorized access.”Send the API Key for the host you sent the request to, in the x-api-key header.
400 “Missing required header: x-minor-id”Send the clinic’s Minor ID in the x-minor-id header.
400 “The Minor ID is not valid.”Send the clinic’s Minor ID exactly as RebateRight issued it: 3 capital letters, then 5 digits.
No response to a claim, such as a client timeout or a 503Resend the claim unchanged with its original correlationId. For a patient claim, ask the user to confirm first, because the resend pends a pendable claim.
A client timeout or a 503 on any other requestSend the request again.
9777Medicare already holds a claim with this correlationId. After a resend of a claim that got no response, 9777 means the claim is lodged. Otherwise, send the claim again with a new correlationId.
3004Medicare did not process the claim. Send it again with a new correlationId. When the message is “Maximum number of … claims reached.”, send it the next day.

Error details

Errors come from RebateRight or from Services Australia. RebateRight’s own errors are plain text, including every 401 and 503 and the 400 messages it raises itself. Errors from Services Australia are JSON, with Medicare’s code and message for each problem. A 400 can be either, so read the body as text before you parse it as JSON.

RebateRight did not accept the API Key. The x-api-key header is missing, or the key is not valid on the host you sent the request to.

Resolution

Send the API Key that matches the host in the x-api-key header of every request. See Keys, Minor ID and environments.

The endpoint needs the x-minor-id header, and the request did not include it. RebateRight stopped the request before it reached Services Australia.

Resolution

Send the clinic’s Minor ID in the x-minor-id header. See Keys, Minor ID and environments.

The x-minor-id header is not in the Minor ID format: 3 capital letters, then 5 digits. RebateRight stopped the request before it reached Services Australia.

Resolution

Send the clinic’s Minor ID exactly as RebateRight issued it.

The request had no body. RebateRight stopped the request before it reached Services Australia.

Resolution

Send the JSON request body that the endpoint’s reference page describes.

RebateRight could not complete the request, for example because the connection to Services Australia failed or timed out. The plain-text body ends with a Request Id.

Resolution

Your client stopped waiting before a response arrived.

Resolution

  • A claim. Follow When a claim gets no response. That section also gives the client timeout to set.
  • An eligibility check, a verification or a lookup. Send the request again.

Medicare already holds a claim with this correlationId, so it did not process this one.

Resolution

  • A resend of a claim that got no response. Medicare received the first attempt, so the claim is lodged. For a bulk bill or DVA claim, the processing report has the outcome. A patient claim has no report. Sending a patient claim again with a new correlationId would lodge a second claim. See When a claim gets no response.
  • A new or corrected claim that reused a correlationId. Send the claim again with a new correlationId. See Correlation ID.
  • “Claim cannot be pended.” More than 1 hour has passed since the original patient claim, so Medicare will not pend it. Send the claim again with a new correlationId. See Pendable Claims.

Medicare returns 3004 for 2 different causes. The message text tells them apart. In both cases, Medicare did not process the claim.

Resolution

  • “Maximum number of … claims reached.” The payee provider and Minor ID have reached Medicare’s daily limit for bulk bill or DVA claims. Send the claim the next day with a new correlationId.
  • “An unexpected error has occurred.” Medicare had a system error. Send the claim again with a new correlationId. If the error continues, call the Medicare eBusiness Service Centre on 1800 700 199. If you see this error in the test environment outside Sydney business hours, retry during business hours, as Integration test data explains.

A field the Medicare eligibility check needs is missing from your request. The Reason field in the response names the missing field, in single quotes.

Example: "Reason": "The 'PrincipalProviderNumber' field is not provided."

Resolution

Add the missing field to your request and send it again.

The request included both referral details, such as the referring provider number, and a referral override code, such as N for not required. Medicare accepts only one of the two.

Resolution

Include either referral details or a referral override code, not both.

Medicare does not accept this combination of ReferralTypeCode and ServiceTypeCode.

Resolution

ReferralTypeCodeRequired ServiceTypeCode
S or DS (Specialist)
PP (Pathology)

Send one of the combinations in the table.

The referral issue date is in the future, after the service date or before the patient’s date of birth.

Resolution

Ensure the referral issue date:

  • Is not in the future
  • Is on or before the service date
  • Is after the patient’s date of birth

The provider number does not follow the required Medicare format.

Resolution

Provider numbers must be 8 characters in the format: 6-digit stem + 1 location character + 1 check digit

Example: 2447791K

The referring provider number has the same 6-digit stem as the servicing provider number. Medicare requires a different stem for each.

Resolution

Use a referring provider number with a different 6-digit stem from the servicing provider’s number.

The request sent the hospital referral override code H without the hospital fields that code requires.

Resolution

If ReferralOverrideCode is H:

  • Set HospitalIndicator to Y
  • Provide a valid FacilityID

The service date is in the future, or more than 2 years before the transmission date.

Resolution

Ensure the service date:

  • Is not in the future
  • Is within 2 years of the transmission date

The Medicare card number or the Individual Reference Number (IRN) is not valid.

Resolution

  • The Medicare card number must be 10 digits with a valid check digit
  • The 10th digit must not be 0
  • The IRN must be a single digit from 1 to 9

The request has a collection date and time or an accession date and time, but not both.

Resolution

If either CollectionDateTime or AccessionDateTime is provided, both must be included.

  • Both must use valid Australian time zones
  • Order must be: Collection ≤ Accession ≤ ServiceDate

An interactive patient claim contains more than 16 Medical Events. A bulk bill claim gets the same code when it contains more than 80.

Resolution

  • Limit each patient claim to 16 Medical Events
  • Split additional events into separate claims

A Medical Event in a bulk bill or interactive patient claim contains more than 14 services.

Resolution

  • Limit each Medical Event to 14 services
  • Split additional services into separate Medical Events

An interactive patient claim contains more than 16 services overall.

Resolution

  • Limit the claim to 16 services total
  • Split additional services into separate claims

One or more Medical Event IDs in the claim are duplicated or out of sequence.

Resolution

  • Ensure Medical Event IDs are unique
  • IDs must start at 01 and increment by one sequentially

A Service ID is repeated within the same claim.

Resolution

Ensure all Service IDs are unique within the claim.

The accountPaidInd value in an interactive patient claim is not Y or N.

Resolution

Send Y if the account was paid in full, or N if it was not paid in full.

The accountPaidInd value in an interactive patient claim conflicts with another field.

Resolution

  • If the claim carries eftDetails and the account was paid in full, set accountPaidInd to Y. If it was not paid in full, remove eftDetails.
  • If any service carries patientContribAmount and the account was not paid in full, set accountPaidInd to N. If it was paid in full, remove patientContribAmount.

The accountReferenceId value in an interactive patient claim contains a character Medicare does not accept, or is the wrong length.

Resolution

  • Must be 1–9 characters
  • Allowed characters: 0-9, A-Z, a-z, @ # $ % + = : ; , . -, and single spaces between other characters
  • No leading or trailing spaces

The referral PeriodCode, Period or TypeCode is missing or inconsistent.

Resolution

FieldValid values
TypeCodeS (Specialist), P (Pathology), D (Diagnostic)
Period/PeriodCodeOnly set if TypeCode = S
Non-standard referrals (N)Must supply Period 1–98 (not 0, 00 or 99)

For an error this page does not cover, email us at hello@rebateright.com.au. For a 503, include the Request Id from the response.