# PDF document sending via MESH

**URL:** <https://developer.community.nhs.uk/t/pdf-document-sending-via-mesh/5545>\
**Category:** Message Exchange for Social Care and Health (MESH)\
**Created:** [22 April 2025 13:01 UTC](https://developer.community.nhs.uk/t/pdf-document-sending-via-mesh/5545 "2025-04-22T13:01:02Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matthew\_Brown](https://avatars.discourse-cdn.com/v4/letter/m/c5a1d2/32.png) [@Matthew\_Brown](https://developer.community.nhs.uk/u/Matthew_Brown)\
**Post date:** [22 April 2025 13:01 UTC](https://developer.community.nhs.uk/t/pdf-document-sending-via-mesh/5545/1 "2025-04-22T13:01:02Z")

</div>

Hi all  
Got my test interface working for sending messages via MESH, checking inbox, ack responses, etc. The only thing I havent been able to do as of yet is to send a message with PDF attachment or to send a PDF to a mailbox. I have checked the API reference material and can’t seem to find an example or guide. Can anyone point me in the right direction please?

Is there an example showing headers, data type/encoding, etc?

Thanks

---

<div class="post-metadata">

**Author:** ![matt.mercer](https://avatars.discourse-cdn.com/v4/letter/m/f14d63/32.png) [@matt.mercer](https://developer.community.nhs.uk/u/matt.mercer)\
**Post date:** [22 April 2025 13:20 UTC](https://developer.community.nhs.uk/t/pdf-document-sending-via-mesh/5545/2 "2025-04-22T13:20:03Z")

</div>

Hi Matthew

the standard headers are shown here .. ..  
[https://digital.nhs.uk/developer/api-catalogue/message-exchange-for-social-care-and-health-api#post-/messageexchange/-mailbox\_id-/outbox](https://digital.nhs.uk/developer/api-catalogue/message-exchange-for-social-care-and-health-api#post-/messageexchange/-mailbox_id-/outbox)

but, providing you’re using the v2 api using:

```auto
--header 'accept: application/vnd.mesh.v2+json'

```

then you can safely set the `content-type: application/pdf` ..  
the `content-encoding` header can also be set if you’re compressing data before sending to the api

---

<div class="post-metadata">

**Author:** ![Matthew\_Brown](https://avatars.discourse-cdn.com/v4/letter/m/c5a1d2/32.png) [@Matthew\_Brown](https://developer.community.nhs.uk/u/Matthew_Brown)\
**Post date:** [22 April 2025 13:44 UTC](https://developer.community.nhs.uk/t/pdf-document-sending-via-mesh/5545/3 "2025-04-22T13:44:48Z")

</div>

Hi, I’ll not be using chunking or compressing the data. I’ll be looking to use the interface I am writing to potentially send docs to GPs. Would I need to use the Transfer of Care Specification for this? If so, I have seen an XML format is required.

[Use of Attachments | ITK-FHIR-eDischarge](https://developer.nhs.uk/apis/itk3tocedischarge-2-9-0/build_attachments.html)

To accomplish this would I need to including content of the message as XML with a base64 PDF, are there any examples of this to look at?

Thanks

---

<div class="post-metadata">

**Author:** ![Kevin\_Mayfield](https://dub1.discourse-cdn.com/nhsdigitaldeveloper/user_avatar/developer.community.nhs.uk/kevin_mayfield/32/473_2.png) [@Kevin\_Mayfield](https://developer.community.nhs.uk/u/Kevin_Mayfield)\
**Post date:** [24 April 2025 04:32 UTC](https://developer.community.nhs.uk/t/pdf-document-sending-via-mesh/5545/4 "2025-04-24T04:32:48Z")

</div>

This is not that simple 🙂

First question is what kind of provider are you working for?

If your a pharmacy or online consultation provider, then NHS England is likely to say use this API [GP Connect Send Document](https://simplifier.net/guide/gp-connect-send-document/Home?version=1.3.2-public-beta) ← This is the best developer documentation I could find.

If not then you should look at using Kettering XML, this isn’t supported by NHS England but it does have a low onboarding cost. This link has all the documents I could find on it [Kettering XML - Virtually Healthcare - IHE Patient Care Coordination (PCC) v0.1.1-current](https://virtually-healthcare.github.io/HL7-FHIR-Implementation-Guide/kettering.html)

If you have IM1 Transaction API’s or Partner Facing APIs, then this is an option for getting documents into a GP system. (You also have the option of sending structured data via this route)

We use all three ☹

p.s. the ITK-FHIR-Discharge is for secondary care trusts, if your not this type of provider you can’t use it. Most secondary care trusts went down the Kettering XML route instead.

---

<div class="post-metadata">

**Author:** ![Matthew\_Brown](https://avatars.discourse-cdn.com/v4/letter/m/c5a1d2/32.png) [@Matthew\_Brown](https://developer.community.nhs.uk/u/Matthew_Brown)\
**Post date:** [24 April 2025 14:06 UTC](https://developer.community.nhs.uk/t/pdf-document-sending-via-mesh/5545/5 "2025-04-24T14:06:55Z")

</div>

GP Connect looks like the ticket. I have seen some documentation on Kettering XML but its quite sparse. GP Connect ‘Send Document’ does look like it supports a variety of file types so I shall explore that - thank you!

---

<div class="post-metadata">

**Author:** ![Kevin\_Mayfield](https://dub1.discourse-cdn.com/nhsdigitaldeveloper/user_avatar/developer.community.nhs.uk/kevin_mayfield/32/473_2.png) [@Kevin\_Mayfield](https://developer.community.nhs.uk/u/Kevin_Mayfield)\
**Post date:** [24 April 2025 14:42 UTC](https://developer.community.nhs.uk/t/pdf-document-sending-via-mesh/5545/6 "2025-04-24T14:42:32Z")

</div>

Just a word of warning. I’ve developed our code a month or two back and we are still waiting on permission to test.

We’re stuck at early stages of onboarding.

---

<div class="post-metadata">

**Author:** ![Matthew\_Brown](https://avatars.discourse-cdn.com/v4/letter/m/c5a1d2/32.png) [@Matthew\_Brown](https://developer.community.nhs.uk/u/Matthew_Brown)\
**Post date:** [25 April 2025 13:33 UTC](https://developer.community.nhs.uk/t/pdf-document-sending-via-mesh/5545/7 "2025-04-25T13:33:03Z")

</div>

Any ideas why we cant just use the regular MESH api for sending to GPs. It looks like you can attach documents and it makes reference to large files being added in the documentation but no clear way to seemingly attach any file despite it looking like you can…

---

<div class="post-metadata">

**Author:** ![david.hallam4](https://avatars.discourse-cdn.com/v4/letter/d/e9bcb4/32.png) [@david.hallam4](https://developer.community.nhs.uk/u/david.hallam4)\
**Post date:** [25 April 2025 14:22 UTC](https://developer.community.nhs.uk/t/pdf-document-sending-via-mesh/5545/8 "2025-04-25T14:22:47Z")

</div>

From a MESH API perspective, you can send whatever arbitrary blob of data you choose (large files being chunked into sub-100MB chunks). But whether or not a receiving mailbox will know how to process the data when it lands in their mailbox is down to them.

---

<div class="post-metadata">

**Author:** ![Matthew\_Brown](https://avatars.discourse-cdn.com/v4/letter/m/c5a1d2/32.png) [@Matthew\_Brown](https://developer.community.nhs.uk/u/Matthew_Brown)\
**Post date:** [25 April 2025 15:27 UTC](https://developer.community.nhs.uk/t/pdf-document-sending-via-mesh/5545/9 "2025-04-25T15:27:33Z")

</div>

IS there an actual example on the docs area though? I have checked and cant see that being done. It references it is possible but nothing else…

---

<div class="post-metadata">

**Author:** ![david.hallam4](https://avatars.discourse-cdn.com/v4/letter/d/e9bcb4/32.png) [@david.hallam4](https://developer.community.nhs.uk/u/david.hallam4)\
**Post date:** [25 April 2025 16:32 UTC](https://developer.community.nhs.uk/t/pdf-document-sending-via-mesh/5545/10 "2025-04-25T16:32:39Z")

</div>

Hi Matthew. The link that Matt posted near the top of this thread should contain the information you need to send the message. [https://digital.nhs.uk/developer/api-catalogue/message-exchange-for-social-care-and-health-api#post-/messageexchange/-mailbox\_id-/outbox](https://digital.nhs.uk/developer/api-catalogue/message-exchange-for-social-care-and-health-api#post-/messageexchange/-mailbox_id-/outbox). If that doesn’t answer your question, please let us know what you are trying to do so we can give your further guidance.

---

<div class="post-metadata">

**Author:** ![Kevin\_Mayfield](https://dub1.discourse-cdn.com/nhsdigitaldeveloper/user_avatar/developer.community.nhs.uk/kevin_mayfield/32/473_2.png) [@Kevin\_Mayfield](https://developer.community.nhs.uk/u/Kevin_Mayfield)\
**Post date:** [27 April 2025 08:01 UTC](https://developer.community.nhs.uk/t/pdf-document-sending-via-mesh/5545/11 "2025-04-27T08:01:44Z")

</div>

MESH is a transport service (like http, tcp, etc). You can use just this but you will need to arrange this with your intended recipient, agree on what is being sent (e.g. PDFs, XML, JSON, etc) and I believe get a workflow Id agreed with NHS England.

The services I mentioned work are a layer on top of that, so they have specific workflow Id’s and the format of the ‘document’ payload has been agreed between sender and recipient.
