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

# Apix

## Overview

The APIX integration sends Finnish (and Nordic) electronic invoices through APIX’s channel by packaging Peppol UBL XML in a ZIP archive and uploading it via APIX REST/SOAP clients. Younium supports post with attachments, batch queue, post-as-mail (print routing), electronic address lookup, and customer provisioning checks. Peppol XML generation is shared with the Peppol integration.

## Authentication

Younium reaches APIX with service credentials held for Younium as a whole, so there is nothing to enter and no connection to authorise.

What identifies you to APIX is your APIX customer id, which is recorded for the legal entity. Younium can confirm a customer exists in APIX for that id and read back the configuration APIX holds for it, so you can check the legal entity is set up before sending anything.

When something is wrong, the message says which part failed: reaching APIX at all, Younium's own access to it, or your customer id not being accepted — the last of these is the one you can act on, and it means electronic invoicing has not been set up for that legal entity at APIX.

## Activation and setup

There is no activation step. Once the legal entity has an APIX customer id that APIX accepts, invoices can be sent.

Younium's own check on an account confirms only that APIX is reachable and Younium's access is valid. APIX applies its own rules to the recipient when the invoice arrives, so an account that passes the check in Younium can still be rejected by APIX afterwards.

## Post invoice workflow

1. `ValidateClient`.
2. Resolve attachments: default from DB on post, or explicit attachment IDs, or none for mail-only.
3. Unless `sendAsMail`, load account and run `ValidateForElectronicInvoice`.
4. Younium generates the Peppol UBL XML for the invoice.
5. If `sendAsMail`, inject print routing into XML (see below).
6. ZIP contains single entry `{LegalEntity.Name} - {InvoiceNumber}.xml` (no compression).
7. `ApixClient.SendInvoiceZIP(byte[])`.

## Post as mail (print) mapping

For supported invoice address countries `SE`, `NO`, `DK`, `FI`, Younium sets the Peppol customer endpoint to a print directive:

| Younium Field                                 | UBL change                                                                    |
| --------------------------------------------- | ----------------------------------------------------------------------------- |
| `Invoice.InvoiceAddress.Country.TwoAlphaCode` | `AccountingCustomerParty/Party/EndpointID` inner text → `PRINT_{countryCode}` |

Other countries throw: external print not available for that country.

## Peppol XML in ZIP

| Younium source      | APIX package                                         |
| ------------------- | ---------------------------------------------------- |
| Peppol XML document | `{LegalEntityName} - {InvoiceNumber}.xml` inside ZIP |
| ZIP bytes           | APIX send invoice payload                            |

Field-level Peppol mapping is documented in the **Peppol** article.

## Electronic address query

| Younium query field                         | APIX API             |
| ------------------------------------------- | -------------------- |
| `ElectronicAddressQuery.ReceiverName`       | Address lookup input |
| `ElectronicAddressQuery.ReceiverBusinessId` | Address lookup input |

Returns opaque object from `ApixClient.QueryForElectronicAddress`.

## Batch posting

Batching validates the connection and collects invoice ids for a single send. Nothing is transmitted until the batch is sent.

## Eligibility

The legal entity must have electronic invoicing enabled. Peppol pre-validation runs inside `CreateEInvoice`. Attachments follow Peppol MIME allow list when included.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.younium.com/e-invoicing-integrations/apix.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
