# Regarding Appointment Update API (A034)

**URL:** <https://developer.community.nhs.uk/t/regarding-appointment-update-api-a034/723>\
**Category:** e-Referral Service (e-RS)\
**Tags:** fhir\
**Created:** [12 February 2024 10:11 UTC](https://developer.community.nhs.uk/t/regarding-appointment-update-api-a034/723 "2024-02-12T10:11:27Z")\
**Posts on this page:** 11\
**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:** [12 February 2024 10:11 UTC](https://developer.community.nhs.uk/t/regarding-appointment-update-api-a034/723/1 "2024-02-12T10:11:27Z")

</div>

Hello e-RS Team,  
When we are updating the appointment we are passing below JSON{  
“id”: “948185773”,  
“meta”: {  
“versionId”: “1”,  
“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/000049765227/\_history/6”  
}  
],  
“participant”: [  
{  
“actor”: {  
“identifier”: {  
“system”: “[http://fhir.nhs.net/Id/ers-service](http://fhir.nhs.net/Id/ers-service)”,  
“value”: “6709596”  
},  
“display”: “CardioVascular”  
},  
“status”: “accepted”  
},  
{  
“actor”: {  
“identifier”: {  
“system”: “[http://fhir.nhs.net/Id/nhs-number](http://fhir.nhs.net/Id/nhs-number)”,  
“value”: “9728338449”  
}  
},  
“status”: “accepted”  
}  
]  
}  
and facing the error below  
{“meta”:{“profile”:[“[https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1"]},“resourceType”:“OperationOutcome”,“issue”:[{“severity”:“error”,“code”:“required”,“details”:{“coding”:[{“code”:“MISSING\_VALUE”,“system”:“https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1”,“display”:"A](https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1%22%5D%7D,%22resourceType%22:%22OperationOutcome%22,%22issue%22:%5B%7B%22severity%22:%22error%22,%22code%22:%22required%22,%22details%22:%7B%22coding%22:%5B%7B%22code%22:%22MISSING_VALUE%22,%22system%22:%22https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1%22,%22display%22:%22A) mandatory input field is missing”}]},“diagnostics”:“‘participant[2]’ is mandatory, but was not supplied for ‘cancel’”}]}  
Please guide us to resolve the 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:** [14 February 2024 07:05 UTC](https://developer.community.nhs.uk/t/regarding-appointment-update-api-a034/723/2 "2024-02-14T07:05:37Z")

</div>

When updating an appointment the Appointment resource must match the Appointment resource being updated. The only fields that can differ are the reason, comment, status, slot, start and end - these are the fields that need to be changed to perform a cancellation.

Please check if the Appointment is booked to a slot with a named clinician? If so the Appointment must have the clinician as a participant and this participant must be included when updating the appointment.

See “Booking with Named clinician” request example on [## A016 - Book or defer appointment](https://digital.nhs.uk/developer/api-catalogue/e-referral-service-fhir#post-/STU3/Appointment) for an example of an Appointment with a named clinician.

---

<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:** [21 February 2024 06:22 UTC](https://developer.community.nhs.uk/t/regarding-appointment-update-api-a034/723/3 "2024-02-21T06:22:28Z")

</div>

Hello @adam.oldfield,  
Could you please share the sample JSON for the Update Appointment (A034) API.

---

<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:** [21 February 2024 08:02 UTC](https://developer.community.nhs.uk/t/regarding-appointment-update-api-a034/723/4 "2024-02-21T08:02:56Z")

</div>

Hi @supplier,

If the booking was to a slot with a named clinician then this clinician must be included in the Appointment participant list when cancelling. As mentioned above the A016 example details how to create an appointment with a named clinician.

Something like the following (replacing the sds-user-id as appropriate):

```auto
{
  "type": {
    "coding": [
      {
        "system": "http://hl7.org/fhir/ValueSet/encounter-participant-type",
        "code": "CON"
      }
    ]
  },
  "actor": {
    "identifier": {
      "system": "http://fhir.nhs.net/Id/sds-user-id",
      "value": "021600556514"
    }
  },
  "status": "accepted"
}

```

---

<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:** [21 February 2024 13:05 UTC](https://developer.community.nhs.uk/t/regarding-appointment-update-api-a034/723/5 "2024-02-21T13:05:59Z")

</div>

> [@adam.oldfield](#):
>
> ```auto
> {
> "type": {
> "coding": [
> {
> "system": "http://hl7.org/fhir/ValueSet/encounter-participant-type",
> "code": "CON"
> }
> ]
> },
> "actor": {
> "identifier": {
> "system": "http://fhir.nhs.net/Id/sds-user-id",
> "value": "021600556514"
> }
> },
> "status": "accepted"
> }
> 
> ```

hi @adam.oldfield , We have tried earlier but facing  
receiving below error :-  
{  
“meta”: {  
“profile”: [  
“[FHIR Reference Server eRS-OperationOutcome-1](https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1)”  
]  
},  
“resourceType”: “OperationOutcome”,  
“issue”: [  
{  
“severity”: “error”,  
“code”: “business-rule”,  
“details”: {  
“coding”: [  
{  
“code”: “INAPPROPRIATE\_VALUE”,  
“system”: “[FHIR Reference Server eRS API Error Code](https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1)”,  
“display”: “Inappropriate value”  
}  
]  
},  
“diagnostics”: “‘participant[2].actor.identifier.value’ value cannot be updated”  
}  
]  
}

 ![image](https://europe1.discourse-cdn.com/nhsdigitaldeveloper/original/1X/5639b29670c048d199bfa88ca93b26e624e297e7.png)

---

<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:** [21 February 2024 16:36 UTC](https://developer.community.nhs.uk/t/regarding-appointment-update-api-a034/723/6 "2024-02-21T16:36:46Z")

</div>

Can you please post request and response details for each step in the flow? Including URL, request headers/payload, response headers/payload.

Including:

- A015 - Retrieve appointment slots
- A016 - Book or defer appointment
- A034 - Update appointment

Thanks.

---

<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:** [4 March 2024 07:06 UTC](https://developer.community.nhs.uk/t/regarding-appointment-update-api-a034/723/8 "2024-03-04T07:06:53Z")

</div>

Hello @adam.oldfield I have pasted the endpoints request body and response body

RetrieveAppointmentSlot (A015)

`Integration URL:- [https://int.api.service.nhs.uk/referrals/FHIR/STU3/Slot?schedule.actor%3AHealthcareService=6709699&appointmentType=ROUTINE&status=free&\_count=5&page=1](https://int.api.service.nhs.uk/referrals/FHIR/STU3/Slot?schedule.actor%3AHealthcareService=6709699&appointmentType=ROUTINE&status=free&_count=5&page=1)

Retrieve Appointment Slot API Headers:- [{“key”:“X-Request-ID”,“response”:“fdc0d36d-408c-4b36-ab63-7b6372252fa5”},{“key”:“Event-Date-and-Time”,“response”:“2024-03-04 06:09:38.SSS”},{“key”:“Unique-User-Identifier”,“response”:“555290241101”},{“key”:“NHS-Number”,“response”:“9728338449”},{“key”:“Unique-Booking-Reference-Number”,“response”:“000049775698”},{“key”:“NHSD-End-User-Organisation-ODS”,“response”:“D82626”},{“key”:“NHSD-eRS-Business-Function”,“response”:“REFERRING\_CLINICIAN”},{“key”:“NHSD-eRS-Comm-Rule-Org”,“response”:“R68”}]

Response Body:- {“Request”:{“AllowedDecompressionMethods”:[0,2,1],“AlwaysMultipartFormData”:false,“JsonSerializer”:null,“XmlSerializer”:null,“Body”:null,“ResponseWriter”:null,“AdvancedResponseWriter”:null,“UseDefaultCredentials”:false,“Parameters”:[{“Name”:“Authorization”,“Value”:“Bearer awMS65ulGRvqw2xy6GKJoyeQhvOo”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Accept”,“Value”:“application/fhir+json”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“X-Correlation-ID”,“Value”:“7bb01629-8058-4feb-b935-b2736362e49c”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“X-Request-ID”,“Value”:“fdc0d36d-408c-4b36-ab63-7b6372252fa5”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Event-Date-and-Time”,“Value”:“2024-03-04 06:09:38.SSS”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Unique-User-Identifier”,“Value”:“555290241101”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“NHS-Number”,“Value”:“9728338449”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Unique-Booking-Reference-Number”,“Value”:“000049775698”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“NHSD-End-User-Organisation-ODS”,“Value”:“D82626”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“NHSD-eRS-Business-Function”,“Value”:“REFERRING\_CLINICIAN”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“NHSD-eRS-Comm-Rule-Org”,“Value”:“R68”,“Type”:3,“DataFormat”:2,“ContentType”:null}],“Files”:,“Method”:0,“Resource”:null,“RequestFormat”:1,“RootElement”:null,“OnBeforeDeserialization”:{“Method”:{“Name”:“\<.ctor\>b\_\_4\_0”,“AssemblyName”:“RestSharp, Version=106.11.7.0, Culture=neutral, PublicKeyToken=598062e77f915f75”,“ClassName”:“RestSharp.RestRequest+\<\>c”,“Signature”:“Void \<.ctor\>b\_\_4\_0(RestSharp.IRestResponse)”,“Signature2”:“System.Void \<.ctor\>b\_\_4\_0(RestSharp.IRestResponse)”,“MemberType”:8,“GenericArguments”:null},“Target”:{}},“OnBeforeRequest”:{“Method”:{“Name”:“\<.ctor\>b\_\_4\_1”,“AssemblyName”:“RestSharp, Version=106.11.7.0, Culture=neutral, PublicKeyToken=598062e77f915f75”,“ClassName”:“RestSharp.RestRequest+\<\>c”,“Signature”:“Void \<.ctor\>b\_\_4\_1(RestSharp.IHttp)”,“Signature2”:“System.Void \<.ctor\>b\_\_4\_1(RestSharp.IHttp)”,“MemberType”:8,“GenericArguments”:null},“Target”:{}},“DateFormat”:null,“XmlNamespace”:null,“Credentials”:null,“Timeout”:0,“ReadWriteTimeout”:0,“Attempts”:1},“ContentType”:“application/fhir+json”,“ContentLength”:-1,“ContentEncoding”:“”,“Content”:“{"id":"97de7a70-b22a-425b-8582-45bce2e6ba3b","meta":{"lastUpdated":"2024-03-04T06:09:39.267Z","profile":["[http://hl7.org/fhir/STU3/StructureDefinition/Bundle\“]},\“resourceType\”:\“Bundle\”,\“type\”:\“searchset\”,\“total\”:97,\“link\”:[{\“relation\”:\“self\”,\“url\”:\“https://int.api.service.nhs.uk/referrals/FHIR/STU3/Slot?schedule.actor%3AHealthcareService=6709699&appointmentType=ROUTINE&\_count=5&status=free&\_include=Slot%3Aschedule&page=1\”},{\“relation\”:\“next\”,\“url\”:\“https://int.api.service.nhs.uk/referrals/FHIR/STU3/Slot?schedule.actor%3AHealthcareService=6709699&appointmentType=ROUTINE&\_count=5&status=free&\_include=Slot%3Aschedule&page=2\”}],\“entry\”:[{\“fullUrl\”:\“https://int.api.service.nhs.uk/referrals/FHIR/STU3/Slot/25316342\”,\“resource\”:{\“id\”:\“25316342\”,\“meta\”:{\“profile\”:[\“https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Slot-1\”]},\“resourceType\”:\“Slot\”,\“identifier\”:[{\“system\”:\“https://fhir.nhs.uk/Id/alternative-slot\”,\“value\”:\“2403160003450820010120\”}],\“schedule\”:{\“reference\”:\“Schedule/6709699-100258351989\”},\“status\”:\“free\”,\“start\”:\“2024-03-16T08:20:00.000Z\”,\“end\”:\“2024-03-16T08:39:00.000Z\”},\“search\”:{\“mode\”:\“match\”}},{\“fullUrl\”:\“https://int.api.service.nhs.uk/referrals/FHIR/STU3/Slot/25316435\”,\“resource\”:{\“id\”:\“25316435\”,\“meta\”:{\“profile\”:[\“https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Slot-1\”]},\“resourceType\”:\“Slot\”,\“identifier\”:[{\“system\”:\“https://fhir.nhs.uk/Id/alternative-slot\”,\“value\”:\“2403170003450820010120\”}],\“schedule\”:{\“reference\”:\“Schedule/6709699-100258351989\”},\“status\”:\“free\”,\“start\”:\“2024-03-17T08:20:00.000Z\”,\“end\”:\“2024-03-17T08:39:00.000Z\”},\“search\”:{\“mode\”:\“match\”}},{\“fullUrl\”:\“https://int.api.service.nhs.uk/referrals/FHIR/STU3/Slot/25316407\”,\“resource\”:{\“id\”:\“25316407\”,\“meta\”:{\“profile\”:[\“https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Slot-1\”]},\“resourceType\”:\“Slot\”,\“identifier\”:[{\“system\”:\“https://fhir.nhs.uk/Id/alternative-slot\”,\“value\”:\“2403180003450820010120\”}],\“schedule\”:{\“reference\”:\“Schedule/6709699-100258351989\”},\“status\”:\“free\”,\“start\”:\“2024-03-18T08:20:00.000Z\”,\“end\”:\“2024-03-18T08:39:00.000Z\”},\“search\”:{\“mode\”:\“match\”}},{\“fullUrl\”:\“https://int.api.service.nhs.uk/referrals/FHIR/STU3/Slot/25316347\”,\“resource\”:{\“id\”:\“25316347\”,\“meta\”:{\“profile\”:[\“https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Slot-1\”]},\“resourceType\”:\“Slot\”,\“identifier\”:[{\“system\”:\“https://fhir.nhs.uk/Id/alternative-slot\”,\“value\”:\“2403190003450820010120\”}],\“schedule\”:{\“reference\”:\“Schedule/6709699-100258351989\”},\“status\”:\“free\”,\“start\”:\“2024-03-19T08:20:00.000Z\”,\“end\”:\“2024-03-19T08:39:00.000Z\”},\“search\”:{\“mode\”:\“match\”}},{\“fullUrl\”:\“https://int.api.service.nhs.uk/referrals/FHIR/STU3/Slot/25316460\”,\“resource\”:{\“id\”:\“25316460\”,\“meta\”:{\“profile\”:[\“https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Slot-1\”]},\“resourceType\”:\“Slot\”,\“identifier\”:[{\“system\”:\“https://fhir.nhs.uk/Id/alternative-slot\”,\“value\”:\“2403200003450820010120\”}],\“schedule\”:{\“reference\”:\“Schedule/6709699-100258351989\”},\“status\”:\“free\”,\“start\”:\“2024-03-20T08:20:00.000Z\”,\“end\”:\“2024-03-20T08:39:00.000Z\”},\“search\”:{\“mode\”:\“match\”}},{\“fullUrl\”:\“https://int.api.service.nhs.uk/referrals/FHIR/STU3/Schedule/6709699-100258351989\”,\“resource\”:{\“id\”:\“6709699-100258351989\”,\“meta\”:{\“profile\”:[\“https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Schedule-1\”]},\“resourceType\”:\“Schedule\”,\“identifier\”:[{\“system\”:\“https://fhir.nhs.uk/Id/ers-schedule\”,\“value\”:\“6709699-100258351989\”}],\“actor\”:[{\“identifier\”:{\“system\”:\“http://fhir.nhs.net/Id/ers-service\”,\“value\”:\“6709699\”}},{\“identifier\”:{\“system\”:\“http://fhir.nhs.net/Id/sds-user-id\”,\“value\”:\“100258351989\”}}]},\“search\”:{\“mode\”:\“include\”}}]}”,“StatusCode”:200,“IsSuccessful”:true,“StatusDescription”:](http://hl7.org/fhir/STU3/StructureDefinition/Bundle%5C%22%5D%7D,%5C%22resourceType%5C%22:%5C%22Bundle%5C%22,%5C%22type%5C%22:%5C%22searchset%5C%22,%5C%22total%5C%22:97,%5C%22link%5C%22:%5B%7B%5C%22relation%5C%22:%5C%22self%5C%22,%5C%22url%5C%22:%5C%22https://int.api.service.nhs.uk/referrals/FHIR/STU3/Slot?schedule.actor%3AHealthcareService=6709699&appointmentType=ROUTINE&_count=5&status=free&_include=Slot%3Aschedule&page=1%5C%22%7D,%7B%5C%22relation%5C%22:%5C%22next%5C%22,%5C%22url%5C%22:%5C%22https://int.api.service.nhs.uk/referrals/FHIR/STU3/Slot?schedule.actor%3AHealthcareService=6709699&appointmentType=ROUTINE&_count=5&status=free&_include=Slot%3Aschedule&page=2%5C%22%7D%5D,%5C%22entry%5C%22:%5B%7B%5C%22fullUrl%5C%22:%5C%22https://int.api.service.nhs.uk/referrals/FHIR/STU3/Slot/25316342%5C%22,%5C%22resource%5C%22:%7B%5C%22id%5C%22:%5C%2225316342%5C%22,%5C%22meta%5C%22:%7B%5C%22profile%5C%22:%5B%5C%22https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Slot-1%5C%22%5D%7D,%5C%22resourceType%5C%22:%5C%22Slot%5C%22,%5C%22identifier%5C%22:%5B%7B%5C%22system%5C%22:%5C%22https://fhir.nhs.uk/Id/alternative-slot%5C%22,%5C%22value%5C%22:%5C%222403160003450820010120%5C%22%7D%5D,%5C%22schedule%5C%22:%7B%5C%22reference%5C%22:%5C%22Schedule/6709699-100258351989%5C%22%7D,%5C%22status%5C%22:%5C%22free%5C%22,%5C%22start%5C%22:%5C%222024-03-16T08:20:00.000Z%5C%22,%5C%22end%5C%22:%5C%222024-03-16T08:39:00.000Z%5C%22%7D,%5C%22search%5C%22:%7B%5C%22mode%5C%22:%5C%22match%5C%22%7D%7D,%7B%5C%22fullUrl%5C%22:%5C%22https://int.api.service.nhs.uk/referrals/FHIR/STU3/Slot/25316435%5C%22,%5C%22resource%5C%22:%7B%5C%22id%5C%22:%5C%2225316435%5C%22,%5C%22meta%5C%22:%7B%5C%22profile%5C%22:%5B%5C%22https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Slot-1%5C%22%5D%7D,%5C%22resourceType%5C%22:%5C%22Slot%5C%22,%5C%22identifier%5C%22:%5B%7B%5C%22system%5C%22:%5C%22https://fhir.nhs.uk/Id/alternative-slot%5C%22,%5C%22value%5C%22:%5C%222403170003450820010120%5C%22%7D%5D,%5C%22schedule%5C%22:%7B%5C%22reference%5C%22:%5C%22Schedule/6709699-100258351989%5C%22%7D,%5C%22status%5C%22:%5C%22free%5C%22,%5C%22start%5C%22:%5C%222024-03-17T08:20:00.000Z%5C%22,%5C%22end%5C%22:%5C%222024-03-17T08:39:00.000Z%5C%22%7D,%5C%22search%5C%22:%7B%5C%22mode%5C%22:%5C%22match%5C%22%7D%7D,%7B%5C%22fullUrl%5C%22:%5C%22https://int.api.service.nhs.uk/referrals/FHIR/STU3/Slot/25316407%5C%22,%5C%22resource%5C%22:%7B%5C%22id%5C%22:%5C%2225316407%5C%22,%5C%22meta%5C%22:%7B%5C%22profile%5C%22:%5B%5C%22https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Slot-1%5C%22%5D%7D,%5C%22resourceType%5C%22:%5C%22Slot%5C%22,%5C%22identifier%5C%22:%5B%7B%5C%22system%5C%22:%5C%22https://fhir.nhs.uk/Id/alternative-slot%5C%22,%5C%22value%5C%22:%5C%222403180003450820010120%5C%22%7D%5D,%5C%22schedule%5C%22:%7B%5C%22reference%5C%22:%5C%22Schedule/6709699-100258351989%5C%22%7D,%5C%22status%5C%22:%5C%22free%5C%22,%5C%22start%5C%22:%5C%222024-03-18T08:20:00.000Z%5C%22,%5C%22end%5C%22:%5C%222024-03-18T08:39:00.000Z%5C%22%7D,%5C%22search%5C%22:%7B%5C%22mode%5C%22:%5C%22match%5C%22%7D%7D,%7B%5C%22fullUrl%5C%22:%5C%22https://int.api.service.nhs.uk/referrals/FHIR/STU3/Slot/25316347%5C%22,%5C%22resource%5C%22:%7B%5C%22id%5C%22:%5C%2225316347%5C%22,%5C%22meta%5C%22:%7B%5C%22profile%5C%22:%5B%5C%22https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Slot-1%5C%22%5D%7D,%5C%22resourceType%5C%22:%5C%22Slot%5C%22,%5C%22identifier%5C%22:%5B%7B%5C%22system%5C%22:%5C%22https://fhir.nhs.uk/Id/alternative-slot%5C%22,%5C%22value%5C%22:%5C%222403190003450820010120%5C%22%7D%5D,%5C%22schedule%5C%22:%7B%5C%22reference%5C%22:%5C%22Schedule/6709699-100258351989%5C%22%7D,%5C%22status%5C%22:%5C%22free%5C%22,%5C%22start%5C%22:%5C%222024-03-19T08:20:00.000Z%5C%22,%5C%22end%5C%22:%5C%222024-03-19T08:39:00.000Z%5C%22%7D,%5C%22search%5C%22:%7B%5C%22mode%5C%22:%5C%22match%5C%22%7D%7D,%7B%5C%22fullUrl%5C%22:%5C%22https://int.api.service.nhs.uk/referrals/FHIR/STU3/Slot/25316460%5C%22,%5C%22resource%5C%22:%7B%5C%22id%5C%22:%5C%2225316460%5C%22,%5C%22meta%5C%22:%7B%5C%22profile%5C%22:%5B%5C%22https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Slot-1%5C%22%5D%7D,%5C%22resourceType%5C%22:%5C%22Slot%5C%22,%5C%22identifier%5C%22:%5B%7B%5C%22system%5C%22:%5C%22https://fhir.nhs.uk/Id/alternative-slot%5C%22,%5C%22value%5C%22:%5C%222403200003450820010120%5C%22%7D%5D,%5C%22schedule%5C%22:%7B%5C%22reference%5C%22:%5C%22Schedule/6709699-100258351989%5C%22%7D,%5C%22status%5C%22:%5C%22free%5C%22,%5C%22start%5C%22:%5C%222024-03-20T08:20:00.000Z%5C%22,%5C%22end%5C%22:%5C%222024-03-20T08:39:00.000Z%5C%22%7D,%5C%22search%5C%22:%7B%5C%22mode%5C%22:%5C%22match%5C%22%7D%7D,%7B%5C%22fullUrl%5C%22:%5C%22https://int.api.service.nhs.uk/referrals/FHIR/STU3/Schedule/6709699-100258351989%5C%22,%5C%22resource%5C%22:%7B%5C%22id%5C%22:%5C%226709699-100258351989%5C%22,%5C%22meta%5C%22:%7B%5C%22profile%5C%22:%5B%5C%22https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Schedule-1%5C%22%5D%7D,%5C%22resourceType%5C%22:%5C%22Schedule%5C%22,%5C%22identifier%5C%22:%5B%7B%5C%22system%5C%22:%5C%22https://fhir.nhs.uk/Id/ers-schedule%5C%22,%5C%22value%5C%22:%5C%226709699-100258351989%5C%22%7D%5D,%5C%22actor%5C%22:%5B%7B%5C%22identifier%5C%22:%7B%5C%22system%5C%22:%5C%22http://fhir.nhs.net/Id/ers-service%5C%22,%5C%22value%5C%22:%5C%226709699%5C%22%7D%7D,%7B%5C%22identifier%5C%22:%7B%5C%22system%5C%22:%5C%22http://fhir.nhs.net/Id/sds-user-id%5C%22,%5C%22value%5C%22:%5C%22100258351989%5C%22%7D%7D%5D%7D,%5C%22search%5C%22:%7B%5C%22mode%5C%22:%5C%22include%5C%22%7D%7D%5D%7D%22,%22StatusCode%22:200,%22IsSuccessful%22:true,%22StatusDescription%22:)”",“ResponseUri”:“[https://int.api.service.nhs.uk/referrals/FHIR/STU3/Slot?schedule.actor%3AHealthcareService=6709699&appointmentType=ROUTINE&status=free&\_count=5&page=1",“Server”:“”,“Cookies”:[],“Headers”:[{“Name”:“Transfer-Encoding”,“Value”:“chunked”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Connection”,“Value”:“keep-alive”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“X-Content-Type-Options”,“Value”:“nosniff”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“X-XSS-Protection”,“Value”:"1](https://int.api.service.nhs.uk/referrals/FHIR/STU3/Slot?schedule.actor%3AHealthcareService=6709699&appointmentType=ROUTINE&status=free&_count=5&page=1%22,%22Server%22:%22%22,%22Cookies%22:%5B%5D,%22Headers%22:%5B%7B%22Name%22:%22Transfer-Encoding%22,%22Value%22:%22chunked%22,%22Type%22:3,%22DataFormat%22:2,%22ContentType%22:null%7D,%7B%22Name%22:%22Connection%22,%22Value%22:%22keep-alive%22,%22Type%22:3,%22DataFormat%22:2,%22ContentType%22:null%7D,%7B%22Name%22:%22X-Content-Type-Options%22,%22Value%22:%22nosniff%22,%22Type%22:3,%22DataFormat%22:2,%22ContentType%22:null%7D,%7B%22Name%22:%22X-XSS-Protection%22,%22Value%22:%221); mode=block”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Pragma”,“Value”:“no-cache”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“X-Frame-Options”,“Value”:“DENY”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Strict-Transport-Security”,“Value”:“max-age=31536000; includeSubDomains”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“X-Kong-Upstream-Latency”,“Value”:“83”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“X-Kong-Proxy-Latency”,“Value”:“0”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“X-Kong-Request-Id”,“Value”:“e40bf554a722981e109db02336307238”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“X-Request-ID”,“Value”:“11916a9a-0a03-441e-962e-1f70f59efdc2-1”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“X-Correlation-ID”,“Value”:“7bb01629-8058-4feb-b935-b2736362e49c”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Cache-Control”,“Value”:“no-cache, no-store, max-age=0, must-revalidate”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Content-Type”,“Value”:“application/fhir+json”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Date”,“Value”:“Mon, 04 Mar 2024 06:09:39 GMT”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Expires”,“Value”:“0”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Via”,“Value”:“kong/3.5.0”,“Type”:3,“DataFormat”:2,“ContentType”:null}],“ResponseStatus”:1,“ErrorMessage”:null,“ErrorException”:null,“ProtocolVersion”:{“Major”:1,“Minor”:1,“Build”:-1,“Revision”:-1,“MajorRevision”:-1,“MinorRevision”:-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:** [4 March 2024 07:08 UTC](https://developer.community.nhs.uk/t/regarding-appointment-update-api-a034/723/9 "2024-03-04T07:08:13Z")

</div>

BookOrDeferAppointment (A016)

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”: “booked”,  
“description”: “e-Referral Appointment”,  
“start”: “2024-03-16T08:20:00Z”,  
“end”: “2024-03-16T08:39:00Z”,  
“slot”: [  
{  
“reference”: “Slot/25316342”  
}  
],  
“incomingReferral”: [  
{  
“reference”:“ReferralRequest/000049775698/\_history/4”  
}  
],  
“participant”: [  
{“actor”: {  
“identifier”: {  
“system”: “[http://fhir.nhs.net/Id/ers-service](http://fhir.nhs.net/Id/ers-service)”,  
“value”: “6709699”  
}  
},  
“status”: “accepted”  
},  
{  
“actor”: {  
“identifier”: {  
“system”: “[http://fhir.nhs.net/Id/nhs-number](http://fhir.nhs.net/Id/nhs-number)”,  
“value”: “9728338449”  
}  
},  
“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”  
}  
]  
}

Integration URL:- [https://int.api.service.nhs.uk/referrals/FHIR/STU3/Appointment](https://int.api.service.nhs.uk/referrals/FHIR/STU3/Appointment)

Book or Defer Appointment API Headers:- [{“key”:“X-Request-ID”,“response”:“fdc0d36d-408c-4b36-ab63-7b6372252fa5”},{“key”:“Event-Date-and-Time”,“response”:“2024-03-04 06:09:51.SSS”},{“key”:“Unique-User-Identifier”,“response”:“555290241101”},{“key”:“NHS-Number”,“response”:“9728338449”},{“key”:“Unique-Booking-Reference-Number”,“response”:“000049775698”},{“key”:“NHSD-End-User-Organisation-ODS”,“response”:“D82626”},{“key”:“NHSD-eRS-Business-Function”,“response”:“REFERRING\_CLINICIAN”}]

Reponse Body :-  
{“Request”:{“AllowedDecompressionMethods”:[0,2,1],“AlwaysMultipartFormData”:false,“JsonSerializer”:null,“XmlSerializer”:null,“Body”:{“ContentType”:null,“Name”:“application/fhir+json”,“Value”:“{\r\n "id": "appointment",\r\n "meta": {\r\n "profile": [\r\n "[https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1\](https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1%5C)”,\r\n "[https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1\](https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1%5C)“\r\n ]\r\n }, \r\n "language": "en",\r\n "resourceType": "Appointment",\r\n "status": "booked",\r\n "description": "e-Referral Appointment",\r\n "start": "2024-03-16T08:20:00Z",\r\n "end": "2024-03-16T08:39:00Z",\r\n "slot": [\r\n {\r\n "reference": "Slot/25316342"\r\n }\r\n],\r\n "incomingReferral": [\r\n {\r\n "reference":"ReferralRequest/000049775698/\_history/4"\r\n }\r\n],\r\n "participant": [\r\n {"actor": {\r\n "identifier": {\r\n "system": "[http://fhir.nhs.net/Id/ers-service\](http://fhir.nhs.net/Id/ers-service%5C)”,\r\n "value": "6709699"\r\n } \r\n },\r\n "status": "accepted"\r\n },\r\n {\r\n "actor": {\r\n "identifier": {\r\n "system": "[http://fhir.nhs.net/Id/nhs-number\](http://fhir.nhs.net/Id/nhs-number%5C)“,\r\n "value": "9728338449"\r\n }\r\n },\r\n "status": "accepted"\r\n },\r\n {\r\n "type": {\r\n "coding": [\r\n {\r\n "system": "[Valueset-encounter-participant-type - FHIR v5.0.0](http://hl7.org/fhir/ValueSet/encounter-participant-type%5C)”,\r\n "code": "CON"\r\n }\r\n ]\r\n },\r\n "actor": {\r\n "identifier": {\r\n "system": "[http://fhir.nhs.net/Id/sds-user-id\](http://fhir.nhs.net/Id/sds-user-id%5C)“,\r\n "value": "100258351989"\r\n }\r\n },\r\n "status": "accepted"\r\n }\r\n ]\r\n }”},“ResponseWriter”:null,“AdvancedResponseWriter”:null,“UseDefaultCredentials”:false,“Parameters”:[{“Name”:“application/fhir+json”,“Value”:“{\r\n "id": "appointment",\r\n "meta": {\r\n "profile": [\r\n "[https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1\](https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1%5C)”,\r\n "[https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1\](https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1%5C)“\r\n ]\r\n }, \r\n "language": "en",\r\n "resourceType": "Appointment",\r\n "status": "booked",\r\n "description": "e-Referral Appointment",\r\n "start": "2024-03-16T08:20:00Z",\r\n "end": "2024-03-16T08:39:00Z",\r\n "slot": [\r\n {\r\n "reference": "Slot/25316342"\r\n }\r\n],\r\n "incomingReferral": [\r\n {\r\n "reference":"ReferralRequest/000049775698/\_history/4"\r\n }\r\n],\r\n "participant": [\r\n {"actor": {\r\n "identifier": {\r\n "system": "[http://fhir.nhs.net/Id/ers-service\](http://fhir.nhs.net/Id/ers-service%5C)”,\r\n "value": "6709699"\r\n } \r\n },\r\n "status": "accepted"\r\n },\r\n {\r\n "actor": {\r\n "identifier": {\r\n "system": "[http://fhir.nhs.net/Id/nhs-number\](http://fhir.nhs.net/Id/nhs-number%5C)“,\r\n "value": "9728338449"\r\n }\r\n },\r\n "status": "accepted"\r\n },\r\n {\r\n "type": {\r\n "coding": [\r\n {\r\n "system": "[Valueset-encounter-participant-type - FHIR v5.0.0](http://hl7.org/fhir/ValueSet/encounter-participant-type%5C)”,\r\n "code": "CON"\r\n }\r\n ]\r\n },\r\n "actor": {\r\n "identifier": {\r\n "system": "[http://fhir.nhs.net/Id/sds-user-id\](http://fhir.nhs.net/Id/sds-user-id%5C)“,\r\n "value": "100258351989"\r\n }\r\n },\r\n "status": "accepted"\r\n }\r\n ]\r\n }”,“Type”:4,“DataFormat”:2,“ContentType”:null},{“Name”:“Authorization”,“Value”:“Bearer cwSHRlE22wBRT1tVNuCCtErnJbuu”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Accept”,“Value”:“application/fhir+json”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“X-Correlation-ID”,“Value”:“2e112975-0a7f-4855-b44f-84ef537c4c4e”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“X-Request-ID”,“Value”:“fdc0d36d-408c-4b36-ab63-7b6372252fa5”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Event-Date-and-Time”,“Value”:“2024-03-04 06:09:51.SSS”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Unique-User-Identifier”,“Value”:“555290241101”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“NHS-Number”,“Value”:“9728338449”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Unique-Booking-Reference-Number”,“Value”:“000049775698”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“NHSD-End-User-Organisation-ODS”,“Value”:“D82626”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“NHSD-eRS-Business-Function”,“Value”:“REFERRING\_CLINICIAN”,“Type”:3,“DataFormat”:2,“ContentType”:null}],“Files”:,“Method”:1,“Resource”:null,“RequestFormat”:1,“RootElement”:null,“OnBeforeDeserialization”:{“Method”:{“Name”:“\<.ctor\>b\_\_4\_0”,“AssemblyName”:“RestSharp, Version=106.11.7.0, Culture=neutral, PublicKeyToken=598062e77f915f75”,“ClassName”:“RestSharp.RestRequest+\<\>c”,“Signature”:“Void \<.ctor\>b\_\_4\_0(RestSharp.IRestResponse)”,“Signature2”:“System.Void \<.ctor\>b\_\_4\_0(RestSharp.IRestResponse)”,“MemberType”:8,“GenericArguments”:null},“Target”:{}},“OnBeforeRequest”:{“Method”:{“Name”:“\<.ctor\>b\_\_4\_1”,“AssemblyName”:“RestSharp, Version=106.11.7.0, Culture=neutral, PublicKeyToken=598062e77f915f75”,“ClassName”:“RestSharp.RestRequest+\<\>c”,“Signature”:“Void \<.ctor\>b\_\_4\_1(RestSharp.IHttp)”,“Signature2”:“System.Void \<.ctor\>b\_\_4\_1(RestSharp.IHttp)”,“MemberType”:8,“GenericArguments”:null},“Target”:{}},“DateFormat”:null,“XmlNamespace”:null,“Credentials”:null,“Timeout”:0,“ReadWriteTimeout”:0,“Attempts”:1},“ContentType”:“application/fhir+json”,“ContentLength”:-1,“ContentEncoding”:“”,“Content”:“{"id":"948188457","meta":{"versionId":"0","profile":["[https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1\",\“https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1\”]},\“language\”:\“en\”,\“resourceType\”:\“Appointment\”,\“status\”:\“booked\”,\“description\”:\"e-Referral](https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1%5C%22,%5C%22https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1%5C%22%5D%7D,%5C%22language%5C%22:%5C%22en%5C%22,%5C%22resourceType%5C%22:%5C%22Appointment%5C%22,%5C%22status%5C%22:%5C%22booked%5C%22,%5C%22description%5C%22:%5C%22e-Referral) Appointment","start":"2024-03-16T08:20:00.000Z","end":"2024-03-16T08:39:00.000Z","slot":[{"reference":"Slot/25316342"}],"created":"2024-03-04T06:09:57.772Z","incomingReferral":[{"reference":"ReferralRequest/000049775698/\_history/6"}],"participant":[{"actor":{"identifier":{"system":"[http://fhir.nhs.net/Id/ers-service\“,\“value\”:\“6709699\”},\“display\”:\“cardioVascular1\”},\“status\”:\“accepted\”},{\“actor\”:{\“identifier\”:{\“system\”:\“http://fhir.nhs.net/Id/nhs-number\”,\“value\”:\“9728338449\”}},\“status\”:\“accepted\”},{\“type\”:{\“coding\”:[{\“code\”:\“CON\”,\“system\”:\“http://hl7.org/fhir/ValueSet/encounter-participant-type\”}]},\“actor\”:{\“identifier\”:{\“system\”:\“http://fhir.nhs.net/Id/sds-user-id\”,\“value\”:\“100258351989\”}},\“status\”:\“accepted\”}]}”,“StatusCode”:201,“IsSuccessful”:true,“StatusDescription”:](http://fhir.nhs.net/Id/ers-service%5C%22,%5C%22value%5C%22:%5C%226709699%5C%22%7D,%5C%22display%5C%22:%5C%22cardioVascular1%5C%22%7D,%5C%22status%5C%22:%5C%22accepted%5C%22%7D,%7B%5C%22actor%5C%22:%7B%5C%22identifier%5C%22:%7B%5C%22system%5C%22:%5C%22http://fhir.nhs.net/Id/nhs-number%5C%22,%5C%22value%5C%22:%5C%229728338449%5C%22%7D%7D,%5C%22status%5C%22:%5C%22accepted%5C%22%7D,%7B%5C%22type%5C%22:%7B%5C%22coding%5C%22:%5B%7B%5C%22code%5C%22:%5C%22CON%5C%22,%5C%22system%5C%22:%5C%22http://hl7.org/fhir/ValueSet/encounter-participant-type%5C%22%7D%5D%7D,%5C%22actor%5C%22:%7B%5C%22identifier%5C%22:%7B%5C%22system%5C%22:%5C%22http://fhir.nhs.net/Id/sds-user-id%5C%22,%5C%22value%5C%22:%5C%22100258351989%5C%22%7D%7D,%5C%22status%5C%22:%5C%22accepted%5C%22%7D%5D%7D%22,%22StatusCode%22:201,%22IsSuccessful%22:true,%22StatusDescription%22:)”",“RawBytes”:“eyJpZCI6Ijk0ODE4ODQ1NyIsIm1ldGEiOnsidmVyc2lvbklkIjoiMCIsInByb2ZpbGUiOlsiaHR0cHM6Ly9maGlyLm5ocy51ay9TVFUzL1N0cnVjdHVyZURlZmluaXRpb24vZVJTLUFwcG9pbnRtZW50LTEiLCJodHRwczovL2ZoaXIuaGw3Lm9yZy51ay9TVFUzL1N0cnVjdHVyZURlZmluaXRpb24vQ2FyZUNvbm5lY3QtQXBwb2ludG1lbnQtMSJdfSwibGFuZ3VhZ2UiOiJlbiIsInJlc291cmNlVHlwZSI6IkFwcG9pbnRtZW50Iiwic3RhdHVzIjoiYm9va2VkIiwiZGVzY3JpcHRpb24iOiJlLVJlZmVycmFsIEFwcG9pbnRtZW50Iiwic3RhcnQiOiIyMDI0LTAzLTE2VDA4OjIwOjAwLjAwMFoiLCJlbmQiOiIyMDI0LTAzLTE2VDA4OjM5OjAwLjAwMFoiLCJzbG90IjpbeyJyZWZlcmVuY2UiOiJTbG90LzI1MzE2MzQyIn1dLCJjcmVhdGVkIjoiMjAyNC0wMy0wNFQwNjowOTo1Ny43NzJaIiwiaW5jb21pbmdSZWZlcnJhbCI6W3sicmVmZXJlbmNlIjoiUmVmZXJyYWxSZXF1ZXN0LzAwMDA0OTc3NTY5OC9faGlzdG9yeS82In1dLCJwYXJ0aWNpcGFudCI6W3siYWN0b3IiOnsiaWRlbnRpZmllciI6eyJzeXN0ZW0iOiJodHRwOi8vZmhpci5uaHMubmV0L0lkL2Vycy1zZXJ2aWNlIiwidmFsdWUiOiI2NzA5Njk5In0sImRpc3BsYXkiOiJjYXJkaW9WYXNjdWxhcjEifSwic3RhdHVzIjoiYWNjZXB0ZWQifSx7ImFjdG9yIjp7ImlkZW50aWZpZXIiOnsic3lzdGVtIjoiaHR0cDovL2ZoaXIubmhzLm5ldC9JZC9uaHMtbnVtYmVyIiwidmFsdWUiOiI5NzI4MzM4NDQ5In19LCJzdGF0dXMiOiJhY2NlcHRlZCJ9LHsidHlwZSI6eyJjb2RpbmciOlt7ImNvZGUiOiJDT04iLCJzeXN0ZW0iOiJodHRwOi8vaGw3Lm9yZy9maGlyL1ZhbHVlU2V0L2VuY291bnRlci1wYXJ0aWNpcGFudC10eXBlIn1dfSwiYWN0b3IiOnsiaWRlbnRpZmllciI6eyJzeXN0ZW0iOiJodHRwOi8vZmhpci5uaHMubmV0L0lkL3Nkcy11c2VyLWlkIiwidmFsdWUiOiIxMDAyNTgzNTE5ODkifX0sInN0YXR1cyI6ImFjY2VwdGVkIn1dfQ==”,“ResponseUri”:“[https://int.api.service.nhs.uk/referrals/FHIR/STU3/Appointment",“Server”:“”,“Cookies”:[],“Headers”:[{“Name”:“Transfer-Encoding”,“Value”:“chunked”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Connection”,“Value”:“keep-alive”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“X-Content-Type-Options”,“Value”:“nosniff”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“X-XSS-Protection”,“Value”:"1](https://int.api.service.nhs.uk/referrals/FHIR/STU3/Appointment%22,%22Server%22:%22%22,%22Cookies%22:%5B%5D,%22Headers%22:%5B%7B%22Name%22:%22Transfer-Encoding%22,%22Value%22:%22chunked%22,%22Type%22:3,%22DataFormat%22:2,%22ContentType%22:null%7D,%7B%22Name%22:%22Connection%22,%22Value%22:%22keep-alive%22,%22Type%22:3,%22DataFormat%22:2,%22ContentType%22:null%7D,%7B%22Name%22:%22X-Content-Type-Options%22,%22Value%22:%22nosniff%22,%22Type%22:3,%22DataFormat%22:2,%22ContentType%22:null%7D,%7B%22Name%22:%22X-XSS-Protection%22,%22Value%22:%221); mode=block”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Pragma”,“Value”:“no-cache”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“X-Frame-Options”,“Value”:“DENY”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Strict-Transport-Security”,“Value”:“max-age=31536000; includeSubDomains”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“X-Kong-Upstream-Latency”,“Value”:“5725”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“X-Kong-Proxy-Latency”,“Value”:“1”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“X-Kong-Request-Id”,“Value”:“469a4321b91a352049403f7b096e911b”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“X-Request-ID”,“Value”:“8b188cc5-3dd0-404b-8d4e-a6a0d3341c54-1”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“X-Correlation-ID”,“Value”:“2e112975-0a7f-4855-b44f-84ef537c4c4e”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Cache-Control”,“Value”:“no-cache, no-store, max-age=0, must-revalidate”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Content-Type”,“Value”:“application/fhir+json”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Date”,“Value”:“Mon, 04 Mar 2024 06:09:58 GMT”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Expires”,“Value”:“0”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“ETag”,“Value”:“W/"0"”,“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Location”,“Value”:“[https://int.api.service.nhs.uk/referrals/FHIR/STU3/Appointment/948188457/\_history/0",“Type”:3,“DataFormat”:2,“ContentType”:null},{“Name”:“Via”,“Value”:“kong/3.5.0”,“Type”:3,“DataFormat”:2,“ContentType”:null}],“ResponseStatus”:1,“ErrorMessage”:null,“ErrorException”:null,“ProtocolVersion”:{“Major”:1,“Minor”:1,“Build”:-1,“Revision”:-1,“MajorRevision”:-1,"MinorRevision](https://int.api.service.nhs.uk/referrals/FHIR/STU3/Appointment/948188457/_history/0%22,%22Type%22:3,%22DataFormat%22:2,%22ContentType%22:null%7D,%7B%22Name%22:%22Via%22,%22Value%22:%22kong/3.5.0%22,%22Type%22:3,%22DataFormat%22:2,%22ContentType%22:null%7D%5D,%22ResponseStatus%22:1,%22ErrorMessage%22:null,%22ErrorException%22:null,%22ProtocolVersion%22:%7B%22Major%22:1,%22Minor%22:1,%22Build%22:-1,%22Revision%22:-1,%22MajorRevision%22:-1,%22MinorRevision)”:-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:** [4 March 2024 07:08 UTC](https://developer.community.nhs.uk/t/regarding-appointment-update-api-a034/723/10 "2024-03-04T07:08:30Z")

</div>

Update Appointment (A034)

Request Body:- {  
“id”: “948188457”,  
“meta”: {  
“versionId”: “1”,  
“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”,  
“start”: “2024-03-16T08:20:00+00:00”,  
“end”: “2024-03-16T08:39:00+00:00”,  
“slot”: [  
{  
“reference”: “Slot/25316342”  
}  
],  
“incomingReferral”: [  
{  
“reference”: “ReferralRequest/000049775698/\_history/6”  
}  
],  
“participant”: [  
{  
“actor”: {  
“identifier”: {  
“system”: “[http://fhir.nhs.net/Id/ers-service](http://fhir.nhs.net/Id/ers-service)”,  
“value”: “6709699”  
},  
“display”: “CardioVascular1”  
},  
“status”: “accepted”  
},  
{  
“actor”: {  
“identifier”: {  
“system”: “[http://fhir.nhs.net/Id/nhs-number](http://fhir.nhs.net/Id/nhs-number)”,  
“value”: “9728338449”  
}  
},  
“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”  
}

```
]

```

}

IntegrationURL :- [https://int.api.service.nhs.uk/referrals/FHIR/STU3/Appointment/948188457](https://int.api.service.nhs.uk/referrals/FHIR/STU3/Appointment/948188457)

Headers:- Authorization :  
Authorization= Bearer vUAExOxuWhSBFxgnA7D95i459PjV  
NHSD-End-User-Organisation-ODS= D82626  
NHSD-eRS-Business-Function = REFERRING\_CLINICIAN  
If-Match = W/“6”  
id = 948188456  
accept = application/fhir+json  
X-Request-ID = ceb556c1-0291-47c1-a1f6-533af63cb0e2

Response Body:-

{  
“meta”: {  
“profile”: [  
“[FHIR Reference Server eRS-OperationOutcome-1](https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1)”  
]  
},  
“resourceType”: “OperationOutcome”,  
“issue”: [  
{  
“severity”: “error”,  
“code”: “business-rule”,  
“details”: {  
“coding”: [  
{  
“code”: “INAPPROPRIATE\_VALUE”,  
“system”: “[FHIR Reference Server eRS API Error Code](https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1)”,  
“display”: “Inappropriate value”  
}  
]  
},  
“diagnostics”: “‘meta.versionId’ value cannot be updated”  
}  
]  
}

---

<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:** [4 March 2024 09:19 UTC](https://developer.community.nhs.uk/t/regarding-appointment-update-api-a034/723/11 "2024-03-04T09:19:22Z")

</div>

And if we provide meta version Id same as Retrieve Appointment (A038) then we receive Status 409 Conflict error.

 ![image](https://europe1.discourse-cdn.com/nhsdigitaldeveloper/original/1X/80525a63e496718f862e657a915acad44f3f8c03.png)  
 ![image](https://europe1.discourse-cdn.com/nhsdigitaldeveloper/original/1X/64e1100a5b05ea292cf0474e85416c47fe443ee1.png)

---

<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:** [4 March 2024 13:23 UTC](https://developer.community.nhs.uk/t/regarding-appointment-update-api-a034/723/12 "2024-03-04T13:23:33Z")

</div>

Hi @supplier,

Unfortunately I am finding it difficult to follow the examples you have provided due to the lack of formatting.

However, It seems the only thing failing is the call to update the appointment (i.e. cancel the appointment).

> [@](#):
>
> “diagnostics”: “‘meta.versionId’ value cannot be updated”

Regarding this please ensure the versionId provided on the update is the same as the current versionId of the appointment.

> [@](#):
>
> And if we provide meta version Id same as Retrieve Appointment (A038) then we receive Status 409 Conflict error.

Please also ensure the “If-Match” header version (e.g. ‘W/“0”’) matches that of the meta.versionId (e.g. 0) in the request payload.

> [@](#):
>
> “diagnostics”: “‘participant[2].actor.identifier.value’ value cannot be updated”

It is unclear if you still see this error. Please confirm.

Regards,

Adam.
