> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fatorly.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Integration API Overview

> What the Fatorly Integration API is, its base URL and versioning, and a map of the developer guides and API reference.

The **Fatorly Integration API** lets your own systems — an ERP, a billing
platform, or a custom back office — create and submit e-invoices on the Peppol
network programmatically. It **complements the web app**: anything you do in the
invoice editor, you can also do over the API, so you can automate high-volume or
back-office workflows while still using the platform's UI for ad-hoc work.

## Base URL

Fatorly runs two independent environments, each with its own base URL. Build and
test against **sandbox** with test credentials, then switch the host to
**production** when you go live — nothing else about your integration changes.

| Environment | Base URL                                     |
| ----------- | -------------------------------------------- |
| Production  | `https://integration.fatorly.com/v1`         |
| Sandbox     | `https://integration.sandbox.fatorly.com/v1` |

API keys are environment-specific: a sandbox key works only against the sandbox
host, and a production key only against production.

## Versioning

The current version is **v1**, carried in the URL path (`/v1`). Pinning to a
version keeps your integration stable as the platform evolves.

<Note>
  Documents you **issue** (tax invoices and credit notes) are created and
  submitted through the API. Documents you **receive** over Peppol (purchase
  invoices and credit notes) are available read-only: pull them from the Access
  Point inbox with `POST /purchase-invoices/pull` and read them with the
  `/purchase-invoices` and `/purchase-credit-notes` endpoints — they cannot be
  created or edited through the API.
</Note>

## What you can do

* Create tax invoices and credit notes as **drafts** with `POST /invoices` and
  `POST /credit-notes`, and edit a draft (or a failed document) with
  `PUT /invoices/{id}`.
* **Validate before you submit** with `POST /invoices/{id}/validate` — the same
  PINT-AE checks the Peppol network runs, returned as actionable issues, with
  nothing persisted.
* Submit for Peppol delivery with `POST /invoices/{id}/submit`, and track
  documents whose delivery failed with `GET /invoices/failed` — each item
  includes the failure reason in `submissionError`.
* **Receive purchase documents**: `POST /purchase-invoices/pull` fetches
  everything waiting in your Peppol Access Point inbox, then read the results
  with `GET /purchase-invoices` and `GET /purchase-credit-notes` — full detail
  including lines and totals, so your ERP can book a purchase without parsing
  UBL. This surface is **read-only**: received documents can never be created
  or edited through the API.
* Manage the master data you invoice against — customers and items.
* Look up Peppol network participants.

Every write is protected by an **`Idempotency-Key`** header so retries never
create duplicates — see [Idempotency](/en/developers/idempotency).

## Guide map

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/en/developers/authentication">
    Create an API key and send it in the `X-Api-Key` header.
  </Card>

  <Card title="Quickstart" icon="rocket" href="/en/developers/quickstart">
    Go from a key to your first submitted invoice end to end.
  </Card>

  <Card title="Idempotency" icon="arrows-rotate" href="/en/developers/idempotency">
    Make every write safe to retry with `Idempotency-Key`.
  </Card>

  <Card title="Errors" icon="triangle-exclamation" href="/en/developers/errors">
    The error model and the common status codes you'll see.
  </Card>
</CardGroup>

For the full, interactive endpoint catalogue with live "Try it" calls, open the
[API Reference](/en/developers/api-reference).

## Start here

1. [Authentication](/en/developers/authentication) — get a key.
2. [Quickstart](/en/developers/quickstart) — create and submit an invoice.
