> For the complete documentation index, see [llms.txt](https://docs.frends.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.frends.com/tasks/tasks/as4.md).

# AS4

AS4 is a secure protocol for exchanging structured business data over HTTP/S using SOAP-based messaging and digital certificates.

Frends offers seamless integration with AS4, enabling you to securely exchange structured business data such as EDI or XML using SOAP-based messaging over HTTP. AS4 is an OASIS ebMS 3.0 profile designed for secure and reliable B2B communication, providing message-level security, digital signatures, encryption, and built-in message receipts.

By leveraging Frends' task-based approach, you can configure and customize AS4 integrations according to your specific requirements. Frends provides tasks for sending AS4 messages and for validating, parsing, and acknowledging incoming AS4 messages.

## Use cases

Below you will find examples of typical use cases for AS4 and how they could be implemented in Frends.

### Validating and parsing AS4 messages

By using the HTTP trigger in conjunction with the [`AS4 ValidateAndParsePayload`](/tasks/tasks/as4/validateandparsepayload.md) task, we can build an integration that receives incoming AS4 messages. The message is validated, the payload is extracted for further processing, and an MDN receipt is generated and returned to the sender.

<figure><img src="https://2096450325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FevBo49UTUjEN84O2WPl6%2Fuploads%2Fgit-blob-d2ecbc9e34451964ba9f3d1b7e827b460d3f9023%2Fvalidate_and_parse.svg?alt=media" alt=""><figcaption><p>ValidateAndParse</p></figcaption></figure>

### Sending AS4 messages

We can create an integration that picks up EDI, XML, or other business documents from a specified path, packages them as an AS4 message, applies the configured security, and securely transmits the message to the partner system over HTTP using SOAP-based messaging with the [`AS4 SendMessage`](/tasks/tasks/as4/sendmessage.md) task.

<figure><img src="https://2096450325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FevBo49UTUjEN84O2WPl6%2Fuploads%2Fgit-blob-87a82c7b764bc7ee1fc8dc8b0e73000d8e28a2d2%2Fsend_message.svg?alt=media" alt=""><figcaption><p>SendMessage</p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.frends.com/tasks/tasks/as4.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
