# Having error in A016 - Book or defer appointment API

**URL:** <https://developer.community.nhs.uk/t/having-error-in-a016-book-or-defer-appointment-api/2274>\
**Category:** e-Referral Service (e-RS)\
**Tags:** fhir\
**Created:** [19 September 2024 12:37 UTC](https://developer.community.nhs.uk/t/having-error-in-a016-book-or-defer-appointment-api/2274 "2024-09-19T12:37:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![supplier](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@supplier](https://developer.community.nhs.uk/u/supplier)\
**Post date:** [19 September 2024 12:37 UTC](https://developer.community.nhs.uk/t/having-error-in-a016-book-or-defer-appointment-api/2274/1 "2024-09-19T12:37:46Z")

</div>

Hello e-RS Team,

We have created a referral with the triage service and are now trying to use the A016 - Book or Defer Appointment API for a “triage deferral.” We are sending the following request body:  
{  
“id”: “appointment”,  
“meta”: {  
“profile”: [  
“[FHIR Reference Server eRS-Appointment-1](https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1)”,  
“[HL7 UK FHIR Reference Server](https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1)”  
]  
},  
“language”: “en”,  
“resourceType”: “Appointment”,  
“status”: “proposed”,  
“reason”: [  
{  
“coding”: [  
{  
“system”: “[FHIR Reference Server eRS Review Reason](https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1)”,  
“code”: “TRIAGE”  
}  
]  
}  
],  
“description”: “e-Referral Appointment”,  
“incomingReferral”: [  
{  
“reference”: “ReferralRequest/000049788548/\_history/6”  
}  
],  
“participant”: [  
{  
“actor”: {  
“identifier”: {  
“system”: “[http://fhir.nhs.net/Id/ers-service”](http://fhir.nhs.net/Id/ers-service%E2%80%9D),  
“value”: “6709626”  
}  
},  
“status”: “accepted”  
},  
{  
“actor”: {  
“identifier”: {  
“system”: “[http://fhir.nhs.net/Id/nhs-number”](http://fhir.nhs.net/Id/nhs-number%E2%80%9D),  
“value”: “9728338449”  
}  
},  
“status”: “accepted”  
}  
]  
}

However, we are receiving the following error:  
{  
“statusCode”: 422,  
“error”: “INAPPROPRIATE\_VALUE”,  
“message”: “‘service’ (6709626) does not relate to a Service on the Shortlist”  
}  
{  
“statusCode”: 422,  
“error”: “INAPPROPRIATE\_VALUE”,  
“message”: “‘clinician’ (6709699) does not match the slot”  
}  
Sometimes we receive this error and sometimes not  
Could you please help us understand why we are encountering this error?

---

<div class="post-metadata">

**Author:** ![adam.oldfield](https://dub1.discourse-cdn.com/nhsdigitaldeveloper/user_avatar/developer.community.nhs.uk/adam.oldfield/32/327_2.png) [@adam.oldfield](https://developer.community.nhs.uk/u/adam.oldfield)\
**Post date:** [20 September 2024 07:59 UTC](https://developer.community.nhs.uk/t/having-error-in-a016-book-or-defer-appointment-api/2274/2 "2024-09-20T07:59:19Z")

</div>

Hi @supplier,

> {  
> “statusCode”: 422,  
> “error”: “INAPPROPRIATE\_VALUE”,  
> “message”: “‘service’ (6709626) does not relate to a Service on the Shortlist”  
> }

This error indicates that you are attempting to book/defer Service 6709626 (using A016) but Service 6709626 was not shortlisted when the referral was created (using A011).

> {  
> “statusCode”: 422,  
> “error”: “INAPPROPRIATE\_VALUE”,  
> “message”: “‘clinician’ (6709699) does not match the slot”  
> }

This error occurs only when booking a slot, not when deferring to triage.

This error indicates that that you are attempting to book a slot with a named clinician, however the Slot selected does not have a named clinician.

Slots with a named clinician will have an [http://fhir.nhs.net/Id/sds-user-id](http://fhir.nhs.net/Id/sds-user-id) identifier in the Slots related Schedule in the A015 response.

Regards,

Adam.
