# Issue Regarding Update appointment (A034, FHIR STU3)

**URL:** <https://developer.community.nhs.uk/t/issue-regarding-update-appointment-a034-fhir-stu3/2848>\
**Category:** e-Referral Service (e-RS)\
**Tags:** fhir\
**Created:** [23 October 2024 11:26 UTC](https://developer.community.nhs.uk/t/issue-regarding-update-appointment-a034-fhir-stu3/2848 "2024-10-23T11:26:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkumar](https://avatars.discourse-cdn.com/v4/letter/m/e0b2c6/32.png) [@mkumar](https://developer.community.nhs.uk/u/mkumar)\
**Post date:** [23 October 2024 11:26 UTC](https://developer.community.nhs.uk/t/issue-regarding-update-appointment-a034-fhir-stu3/2848/1 "2024-10-23T11:26:07Z")

</div>

We are working on the Update appointment (A034, FHIR STU3) API. When we are updating the appointment we are using the below curl request -

curl --location --request PUT ‘[https://int.api.service.nhs.uk/referrals/FHIR/STU3/Appointment/948196153](https://int.api.service.nhs.uk/referrals/FHIR/STU3/Appointment/948196153)’   
–header ‘accept: application/fhir+json’   
–header ‘content-type: application/fhir+json’   
–header ‘if-match: W/“0”’   
–header ‘nhsd-end-user-organisation-ods: E82665’   
–header ‘nhsd-ers-business-function: REFERRING\_CLINICIAN’   
–header ‘Authorization: Bearer f1hOhFkK5O71DnoPCa4JBE9MH8El’   
–data ‘{  
“id”: “948196153”,  
“meta”: {  
“versionId”: “0”,  
“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”: “cancelled”,  
“reason”: [  
{  
“coding”: [  
{  
“system”: “[https://int.api.service.nhs.uk/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON](https://int.api.service.nhs.uk/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON)”,  
“code”: “PATIENT\_ILL”  
}  
]  
}  
],  
“description”: “e-Referral Appointment”,  
“incomingReferral”: [  
{  
“reference”: “ReferralRequest/000049792221/\_history/6”  
}  
],  
“participant”: [  
{  
“actor”: {  
“identifier”: {  
“system”: “[http://fhir.nhs.net/Id/ers-service](http://fhir.nhs.net/Id/ers-service)”,  
“value”: “6708762”  
}  
},  
“status”: “accepted”  
},  
{  
“actor”: {  
“identifier”: {  
“system”: “[http://fhir.nhs.net/Id/nhs-number](http://fhir.nhs.net/Id/nhs-number)”,  
“value”: “9651258829”  
}  
},  
“status”: “accepted”  
},  
{  
“type”: {  
“coding”: [  
{  
“system”: “[Valueset-encounter-participant-type - FHIR v5.0.0](http://hl7.org/fhir/ValueSet/encounter-participant-type)”,  
“code”: “CON”  
}  
]  
},  
“actor”: {  
“identifier”: {  
“system”: “[http://fhir.nhs.net/Id/sds-user-id](http://fhir.nhs.net/Id/sds-user-id)”,  
“value”: “100258351989”  
}  
},  
“status”: “accepted”  
}  
]  
}’

I’m encountering an issue while working with a FHIR Appointment resource that is resulting in an error regarding a missing mandatory field. The error returned is as follows:  
{  
“meta”: {  
“profile”: [  
“[FHIR Reference Server eRS-OperationOutcome-1](https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1)”  
]  
},  
“resourceType”: “OperationOutcome”,  
“issue”: [  
{  
“severity”: “error”,  
“code”: “required”,  
“details”: {  
“coding”: [  
{  
“code”: “MISSING\_VALUE”,  
“system”: “[FHIR Reference Server eRS API Error Code](https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1)”,  
“display”: “A mandatory input field is missing”  
}  
]  
},  
“diagnostics”: “‘reason’ is mandatory, but was not supplied”  
}  
]  
}

Please help regarding this issue.

---

<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:** [23 October 2024 15:33 UTC](https://developer.community.nhs.uk/t/issue-regarding-update-appointment-a034-fhir-stu3/2848/2 "2024-10-23T15:33:55Z")

</div>

Hi @mkumar,

It is unable to find the “reason” as the system provided isn’t as expected.

You provided:  
`https://int.api.service.nhs.uk/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON`

But we expect:  
`https://int.api.service.nhs.uk/referrals/FHIR/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON`

See [Environments and testing](https://digital.nhs.uk/developer/api-catalogue/e-referral-service-fhir#overview--environments-and-testing) for environment base paths.

Regards,

Adam.

---

<div class="post-metadata">

**Author:** ![mkumar](https://avatars.discourse-cdn.com/v4/letter/m/e0b2c6/32.png) [@mkumar](https://developer.community.nhs.uk/u/mkumar)\
**Post date:** [25 October 2024 06:52 UTC](https://developer.community.nhs.uk/t/issue-regarding-update-appointment-a034-fhir-stu3/2848/3 "2024-10-25T06:52:09Z")

</div>

Thanks @adam.oldfield, the error is resolved.
