`REC_BAD_REQUEST` When Fetching Slots

I’ve been trying to fetch slots in the sandbox environment using the Booking and Referral - FHIR API v1.3.0 and this reference. However, even though I provide a valid bearer, I receive an error.

https://digital.nhs.uk/developer/api-catalogue/booking-and-referral-fhir/v1.3.0#get-/Slot

I tried with the sample data:

curl -X GET "https://sandbox.api.service.nhs.uk/booking-and-referral/FHIR/R4/Slot?status=free&start=2025-03-01T12%3A00%3A00%2B00%3A00&Schedule.actor%3AHealthcareService=2000099999&_include=Slot%3Aschedule" \
 -H "accept: application/fhir+json;version=1.0.0, application/fhir+json; version=1.3.0"\
 -H "authorization: Bearer [redacted]"\
 -H "nhsd-end-user-organisation: eyJyZXNvdXJjZVR5cGUiOiJPcmdhbml6YXRpb24iLCJpZGVudGlmaWVyIjpbeyJ2YWx1ZSI6IkExMDAxIiwic3lzdGVtIjoiaHR0cHM6Ly9maGlyLm5ocy51ay9JZC9vZHMtb3JnYW5pemF0aW9uLWNvZGUifV0sIm5hbWUiOiJNeSBzZXJ2aWNlIHByb3ZpZGVyIG5hbWUifQo="\
 -H "nhsd-requesting-practitioner: eyJyZXNvdXJjZVR5cGUiOiJzdHJpbmciLCJpZGVudGlmaWVyIjpbeyJ2YWx1ZSI6InN0cmluZyIsInN5c3RlbSI6InN0cmluZyJ9XSwiY29kZSI6W3siY29kaW5nIjpbeyJzeXN0ZW0iOiJzdHJpbmciLCJjb2RlIjoic3RyaW5nIiwiZGlzcGxheSI6InN0cmluZyJ9XX1dfQo="\
 -H "nhsd-requesting-software: eyJyZXNvdXJjZVR5cGUiOiJEZXZpY2UiLCJpZGVudGlmaWVyIjpbeyJzeXN0ZW0iOiJodHRwczovL2NvbnN1bWVyc3VwcGxpZXIuY29tL0lkL2RldmljZS1pZGVudGlmaWVyIiwidmFsdWUiOiJTVVBQLUFQUC0xIn1dLCJkZXZpY2VOYW1lIjp7Im5hbWUiOiJTdXBwbGllciBwcm9kdWN0IG5hbWUiLCJ0eXBlIjoibWFudWZhY3R1cmVyLW5hbWUifSwidmVyc2lvbiI6eyJ2YWx1ZSI6IjEuMC4wIn19Cg=="\
 -H "nhsd-target-identifier: eyJzeXN0ZW0iOiJodHRwczovL2ZoaXIubmhzLnVrL0lkL2Rvcy1zZXJ2aWNlLWlkIiwidmFsdWUiOiIyMDAwMDExMTQ3In0="\
 -H "x-correlation-id: 9562466f-c982-4bd5-bb0e-255e9f5e6689"\
 -H "x-request-id: c1ab3fba-6bae-4ba4-b257-5a87c44d4a91" \

Here’s the response I am getting:

{
  "resourceType": "OperationOutcome",
  "id": "531e073a-3295-4e67-ae90-e00bd96a9cdd",
  "meta": {
    "profile": [
      "https://simplifier.net/guide/UKCoreDevelopment2/ProfileUKCore-OperationOutcome"
    ]
  },
  "issue": [
    {
      "severity": "error",
      "code": "invalid",
      "details": {
        "coding": [
          {
            "system": "https://fhir.nhs.uk/Codesystem/http-error-codes",
            "code": "REC_BAD_REQUEST"
          }
        ]
      },
      "diagnostics": "Any further internal debug details i.e. stack trace details etc."
    }
  ]
}

What am I missing to manage to get a valid slot response?

Thanks :waving_hand:t2:

Hi @jpmonette

Thank you for your post. It appears that this topic relates to the BaRS service, but seems to have been categorised for e-RS service. With that in mind I have shared this post with the appropriate team to request their attention in reviewing your query.

Thanks,

Andy S

Good afternoon, could we ask that any BaRS queries please be emailed to england.bookingandreferralstandard@nhs.net so that we can assist. Many Thanks.