Clarification on retrieving Service ID from Retrieve Referral Request (A005)

Hi all,

I’m trying to find a reliable way to retrieve the Service ID from the Retrieve Referral Request (A005) response.

From my testing so far, I’ve noticed the following behaviour:

  1. When the referral is active, the Service ID appears within the Appointment node.
  2. When the referral is cancelled, the Appointment node is no longer present.
  3. However, the Service ID appears within the Shortlist node, even in cases where the service was never explicitly shortlisted.

I wanted to check whether this behaviour is consistent across all referral states, or if there are scenarios where the Service ID might not be returned at all.

The reason this is important for us is that we still need to determine the Service ID for a referral even after it has been cancelled, in order to complete the corresponding workflow on our side.

Any clarification or guidance would be much appreciated.

Thanks in advance.