Issue with Advice and Guidance Worklist API – 500 Error in Integration Environment

I’m currently encountering an issue when attempting to use the API to connect to the A024 Advice and Guidance worklists within the integration environment.

When making the request the API consistently returns a 500 Internal Server Error, without any additional information indicating what may be incorrect in the payload.

However, I’ve noticed some unexpected behaviour:

  • If I remove all Advice and Guidance requests via the portal (resulting in an empty list), the same API call returns a 200 OK response.

  • In this case, the response contains an empty list as expected.

This suggests that the issue may be related to how existing Advice and Guidance requests are being handled by the API, rather than the request structure itself.

Could you please confirm:

  • Whether this is a payload issue

  • If there are any known issues with the Advice and Guidance worklist API in the integration environment?

  • Whether this might be related to your ongoing updates or changes to Advice and Guidance functionality?

Please let me know if you need any further details from my side.

Hi Ryan,

Thanks for posting and welcome to the community - if you could post the following, someone will take a look for you as soon as they are able:

  • Application ID

  • X-Correlation-ID

  • X-Request-ID

  • Date and time the call was made

Hey Tony

Thank you for the response, here are the details

Application-ID - aa784280-b4b6-45f0-b196-625e201781b5
Date - 10 Apr 2026 08:04:36
X-Request-ID - ac4fbd27-4bd8-4cc3-b2a9-d06fd816d98c-1
X-Correlation-ID - dbd415ae-7d01-48a2-8d70-eb1a085ce96b

@George_Craft Please could you take a look at this one please? :slight_smile:

I am looking into this now.

Good afternoon, I am currently waiting to hear back from another team member regarding this problem, I will update as soon as I have heard back.

Thanks for the update George, Please do let me know once you’ve heard back, I’d appreciate any assistance on this.

Hi Ryan, just following up on this now, can you confirm whether this is still an issue? A few changes have been rollbacked since that may have solved this issue.

Hey George,

Unfortunately the same issue, i could supply additional logs if that would help? Or is this an environmental issue with the ongoing integration changes?

Thanks

Hi Ryan, any additional logs you have would be appreciated, I will continue looking into this now.

Hi Ryan, I believe I have found the issue. From the logs I can see, when the API was called, it attempted to return two A&G referrals (refId= 8235595 and 8235616), both related to service with ID=6711004. However, in this service, the field “referral_letter_required” has a null value, causing the search for these particular referrals to return a 500 error message, it is expected for this field to be either true or false. Please let me know if this is something you could configure yourself or would need help changing. :slight_smile:

Hey George

Thanks for the detail, I’ve checked the service configuration for service ID 6711004

This is an Advice and Guidance only service and there isn’t any Referral letters section or related field available in the UI, so I’m not able to set or update referral_letter_required myself

Could you advise how this field can be updated or arrange for it to be set to a valid value on your side?

Thanks

Hey Ryan,

There is the potential for a legitimate relationship error occuring here, where when the worklist has no content the call is working but when A&G is applied, the call is failing.

Are you able to see the worklist and A&G requests in the UI when you login to the e-RS web application. Could you post a screenshot of this?

When you make the API call is it from the exact same smartcard that you used to login to the web app?

Could you let us know the UUID you are using and the organisation you are attempting to retrieve the worklist from (NHS Trust)

Hi Tony,

We can see the A&G list from the portal but they have null values in there, could this be the issue?

When trying to use the endpoint with the same user I get the 500 internal error
UUID: 555372235104
Organisation: FI MEDICOS TD009461 TEST TRUST 012

Thanks Ryan. Just seeking some advice and will get back to you

Hi @Ryan_McCormick - Referral letters don’t apply to A&G only services which is why you’re not seeing the option to amend/update that field.

As a Service Definer, if you amend the service to include the ‘Triage’ Request Type, then that will automatically set the ‘referral_letter_required’ field (to ‘Yes’). Hopefully resolving the issue.

Thanks,
Z.