---
updatedAt: 2026-07-20T11:47:41.000Z
agentTools:
  projectIndex: https://docs.falco-app.be/llms.txt
---

# Upload an existing UBL file (XML) and send it via Peppol

Required scopes: `invoices:ingest:ubl` Optional scopes: `invoices:send`


# OpenAPI definition

````json
{
  "openapi": "3.1.0",
  "info": {
    "title": "PDF & UBL Imports",
    "version": "1.0.0",
    "description": "`X-Falco-App-Secret` + `X-Falco-Api-Key`.\n"
  },
  "servers": [
    {
      "url": "https://api.falco-app.be/v1",
      "description": "Production"
    },
    {
      "url": "https://api.sandbox.falco-app.be/v1",
      "description": "Sandbox"
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Falco-App-Secret",
        "description": "`X-Falco-App-Secret`: Falco Application Secret associated to your application. Use together with the `X-Falco-Api-Key` header.",
        "x-scopes": [
          "articles:read",
          "articles:write",
          "customers:read",
          "customers:write",
          "invoices:read",
          "invoices:write",
          "invoices:attachments:read",
          "invoices:attachments:write",
          "invoices:send",
          "invoices:ingest:ubl",
          "invoices:ingest:pdf",
          "peppol:inbound:read",
          "peppol:participants:read"
        ]
      }
    },
    "schemas": {
      "Problem": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "format": "uri"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "code": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          },
          "instance": {
            "type": "string"
          },
          "trace_id": {
            "type": "string"
          }
        }
      },
      "ImportedDocument": {
        "type": "object",
        "properties": {
          "document_id": {
            "type": "string"
          },
          "peppol_status": {
            "type": "object",
            "properties": {
              "peppol_identifier": {
                "type": "string"
              },
              "error_message": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "submitted",
                  "failed"
                ]
              }
            }
          },
          "accounting_status": {
            "type": "object",
            "properties": {
              "peppol_identifier": {
                "type": "string"
              },
              "error_message": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "submitted",
                  "failed"
                ]
              }
            }
          }
        }
      }
    }
  },
  "paths": {
    "/invoices/imports/ubl": {
      "post": {
        "summary": "Upload an existing UBL file (XML) and send it via Peppol",
        "tags": [
          "Imports"
        ],
        "description": "Required scopes: `invoices:ingest:ubl` Optional scopes: `invoices:send`\n",
        "parameters": [
          {
            "name": "X-Falco-Api-Key",
            "in": "header",
            "required": true,
            "description": "Falco Api Key (provided by the client - required in addition to X-Falco-App-Secret).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "XML (UBL) file bytes"
                  },
                  "metadata": {
                    "type": "string",
                    "description": "JSON string containing the document metadata to be imported.   This field must contain an object following the schema.\n### Main fields\n- **send_peppol** *(boolean)*\n  If `true`, the document will be sent through the Peppol network.  \n\n- **send_accounting** *(boolean)*\n  If `true`, the document will be forwarded to the accounting software (Horus Office).  \n\n- **accounting_info** *(object, optional)*\n  Additional accounting details (only when linked to Horus Office).  \n  - **number** \n    Internal accounting document number.  \n  - **journal**\n    Journal search key.\n\n### Example\n```json\n{\n  \"send_peppol\": false,\n  \"send_accounting\": true\n}\n",
                    "example": "{\n  \"send_peppol\": false,\n  \"send_accounting\": true\n  ...\n}\n"
                  }
                }
              },
              "encoding": {
                "metadata": {
                  "contentType": "application/json"
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Accepted import",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportedDocument"
                }
              }
            }
          },
          "default": {
            "description": "Error (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    }
  }
}
````