Peppol API Documentation

This document provides information about the endpoints available in the API.

Environments

Ehub Peppol API is available in 2 environments:

  • Production: https://ehub.empirys.com
  • Staging: https://staging-ehub.empirys.com

Authentication

API Key

  • X-Api-Tenant: tenant:entity
  • X-Api-Key: secretapikey

Contact us for API access : support@empirys.com

Json Response

Success calls return HTTP Code 200 with Json Response that looks like :

{
    "message": {
        "description": "Humain description",
        "level": "success"
    },
    "values": {
        "value1": { ... json object ...}
        "value2": { ... json object ...}
    }
}
  • message
    • description : Global message description
    • levels : Enum : success or error
  • values : optional
    • Contains one or more json object for each key (see bellow for examples)

Test your API credentials

Endpoint

  • GET /endpoints/api/v1/connectivity

Example Response

  • Success HTTP Code 200
{
    "message": {
        "description": "Credentials are valid",
        "level": "success"
    }
}

Failed Authentication

HTTP Code 400

{
    "message": {
        "description": "Unauthorized",
        "level": "error"
    }
}

Endpoints

Send XML

This endpoint allows you to send a document to Peppol.

Endpoint

  • POST /endpoints/api/v1/send

Request

Files must be sent as parts of a multipart/form-data request. The key for the main document (XML file) must be content. Attachments can be included in the request with the key attachment. Multiple attachments are supported. The supported extensions for attachments are .csv, .pdf, .png, .jpg, .jpeg, and .xml.

Example Body

POST /endpoints/api/v1/send HTTP/1.1
Host: xxxxxxxx
Content-Length: 8913
Accept: */*
Accept-Encoding: gzip, deflate, br
Content-Type: multipart/form-data; boundary=--------------------------285054754575492829556472
X-Api-Key: vZVLaNwgw3RF9Ney66ZgdvovXbBwweD8pqX2TUxhaGBTQdsDJcsTf9LB6mkajPcL
X-Api-Tenant: pZx4Em7CTJ3voiDp4j8HFEtkMmtnpKTC9Tifx6s7aacMeTcMHwqbC2Mjo8Hp7pUg:pZx4Em7CTJ3voiDp4j8HFEtkMmtnpKTC9Tifx6s7aacMeTcMHwqbC2Mjo8Hp7pUg

----------------------------285054754575492829556472
Content-Disposition: form-data; name="content"; filename="myfile.xml"
Content-Type: application/xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Invoice xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:cec="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2">
    <cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0</cbc:CustomizationID>
    <cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>
    ...
</Invoice>

----------------------------285054754575492829556472--

Example Reponse

  • Success HTTP Code 200
{
    "message": {
        "description": "Document was successfully sent to Peppol",
        "level": "success"
    },
    "values": {
        "report": {
            "transmissionId": "bb3d23ba-b84b-479a-acab-92d1bae42de7.peppol@ehub.empirys.com",
            "invoiceNumber": "22-04-1-TEST",
            "documentType": "INVOICE",
            "sender": "9938:LU12345678",
            "receiver": "9938:LU31841057"
        }
    }
}
  • Duplicate document HTTP Code 400
{
    "message": {
        "description": "Error sending XML to Peppol Network. See report.",
        "level": "error"
    },
    "values": {
        "report": {
            "message": {
                "code": "DUPLICATE_DOCUMENT",
                "message": "Invoice/Credit Note with ID [22-04-1-TEST] already exists for combination: document id [22-04-1-TEST], document type [INVOICE], sender [9938:LU12345678], receiver [9938:LU31841057] with status [DOCUMENT_SENT]"
            },
            "validationReport": null
        }
    }
}
  • Invalid Peppol XML HTTP Code 400
{
    "message": {
        "description": "Error sending XML to Peppol Network. See report.",
        "level": "error"
    },
    "values": {
        "report": {
            "message": {
                "code": "XSD_VALIDATION_ERROR",
                "message": "The XSD validation failed has failed for document [invoice.xml]"
            },
            "validationReport": {
                "globalStatus": "ERROR",
                "validatedXmlName": "invoice.xml",
                "xmlValidationReport": {
                    "validatedWith": "invoice.xml",
                    "reportStatus": "SUCCESS",
                    "warningsCount": 0,
                    "errorsCount": 0,
                    "xmlValidationMessages": [],
                    "validationType": "XML_SYNTAX"
                },
                "xsdValidationReport": {
                    "validatedWith": "UBL-Invoice-2.1.xsd",
                    "reportStatus": "ERROR",
                    "warningsCount": 0,
                    "errorsCount": 1,
                    "xsdValidationMessages": [
                        {
                            "errorLevel": "ERROR",
                            "description": "cvc-complex-type.2.4.a: Invalid content was found starting with element '{\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\":DueDate}'. One of '{\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\":CopyIndicator, \"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\":UUID, \"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\":IssueDate}' is expected.",
                            "lineNumber": 6,
                            "columnNumber": 18
                        }
                    ],
                    "validationType": "XSD_SCHEMA"
                },
                "schematronValidationReport": [],
                "warningsCount": 0,
                "errorsCount": 1,
                "xmlContent": "\n<Invoice xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\" xmlns:cec=\"urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2\" xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\" xmlns=\"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2\">\n    <cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0</cbc:CustomizationID>\n    ... </Invoice>\n"
            }
        }
    }
}
  • Schematron validation error HTTP Code 400
{
  "message": {
    "description": "Error sending XML to Peppol Network. See report.",
    "level": "error"
  },
  "values": {
    "report": {
      "message": {
        "code": "SCHEMATRON_VALIDATION_ERROR",
        "message": "The Schematron validation failed has failed for document [invoice.xml]"
      },
      "validationReport": {
        "globalStatus": "ERROR",
        "validatedXmlName": "invoice.xml",
        "xmlValidationReport": {
          "validatedWith": "invoice.xml",
          "reportStatus": "SUCCESS",
          "warningsCount": 0,
          "errorsCount": 0,
          "xmlValidationMessages": [],
          "validationType": "XML_SYNTAX"
        },
        "xsdValidationReport": {
          "validatedWith": "UBL-Invoice-2.1.xsd",
          "reportStatus": "SUCCESS",
          "warningsCount": 0,
          "errorsCount": 0,
          "xsdValidationMessages": [],
          "validationType": "XSD_SCHEMA"
        },
        "schematronValidationReport": [
          {
            "validatedWith": "PEPPOL-EN16931-UBL",
            "reportStatus": "ERROR",
            "warningsCount": 0,
            "errorsCount": 3,
            "schematronValidationMessages": [
              {
                "errorLevel": "ERROR",
                "description": "Document MUST not contain empty elements.",
                "lineNumber": 118,
                "columnNumber": 29,
                "schematronTest": "false()",
                "errorId": "PEPPOL-EN16931-R008",
                "xpath": "/*:Invoice[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:Invoice-2'][1]/*:TaxTotal[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2'][1]/*:TaxSubtotal[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2'][3]/*:TaxCategory[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2'][1]/*:TaxScheme[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2'][1]/*:ID[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2'][1]"
              },
              {
                "errorLevel": "ERROR",
                "description": "All currencyID attributes must have the same value as the invoice currency code (BT-5), except for the invoice total VAT amount in accounting currency (BT-111).",
                "lineNumber": 145,
                "columnNumber": 44,
                "schematronTest": "@currencyID = $documentCurrencyCode",
                "errorId": "PEPPOL-EN16931-R051",
                "xpath": "/*:Invoice[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:Invoice-2'][1]/*:InvoiceLine[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2'][1]/*:Price[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2'][1]/*:PriceAmount[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2'][1]"
              },
              {
                "errorLevel": "ERROR",
                "description": "Currency code must be according to ISO 4217:2005",
                "lineNumber": 145,
                "columnNumber": 44,
                "schematronTest": "some $code in $ISO4217 satisfies @currencyID = $code",
                "errorId": "PEPPOL-EN16931-CL007",
                "xpath": "/*:Invoice[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:Invoice-2'][1]/*:InvoiceLine[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2'][1]/*:Price[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2'][1]/*:PriceAmount[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2'][1]"
              }
            ],
            "validationType": "SCHEMATRON"
          },
          {
            "validatedWith": "EN16931-UBL-validation",
            "reportStatus": "ERROR",
            "warningsCount": 0,
            "errorsCount": 8,
            "schematronValidationMessages": [
              {
                "errorLevel": "ERROR",
                "description": "[BR-CO-15]-Invoice total amount with VAT (BT-112) = Invoice total amount without VAT (BT-109) + Invoice total VAT amount (BT-110).",
                "lineNumber": 2,
                "columnNumber": 324,
                "schematronTest": "every $Currency in cbc:DocumentCurrencyCode satisfies (count(cac:TaxTotal/xs:decimal(cbc:TaxAmount[@currencyID=$Currency])) eq 1) and (cac:LegalMonetaryTotal/xs:decimal(cbc:TaxInclusiveAmount) = round( (cac:LegalMonetaryTotal/xs:decimal(cbc:TaxExclusiveAmount) + cac:TaxTotal/xs:decimal(cbc:TaxAmount[@currencyID=$Currency])) * 10 * 10) div 100)",
                "errorId": "BR-CO-15",
                "xpath": "/*:Invoice[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:Invoice-2'][1]"
              },
              {
                "errorLevel": "ERROR",
                "description": "[BR-47]-Each VAT breakdown (BG-23) shall be defined through a VAT category code (BT-118).",
                "lineNumber": 111,
                "columnNumber": 26,
                "schematronTest": "exists(cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID)",
                "errorId": "BR-47",
                "xpath": "/*:Invoice[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:Invoice-2'][1]/*:TaxTotal[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2'][1]/*:TaxSubtotal[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2'][3]"
              },
              {
                "errorLevel": "ERROR",
                "description": "[BR-48]-Each VAT breakdown (BG-23) shall have a VAT category rate (BT-119), except if the Invoice is not subject to VAT.",
                "lineNumber": 111,
                "columnNumber": 26,
                "schematronTest": "exists(cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:Percent) or (cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/normalize-space(cbc:ID)='O')",
                "errorId": "BR-48",
                "xpath": "/*:Invoice[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:Invoice-2'][1]/*:TaxTotal[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2'][1]/*:TaxSubtotal[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2'][3]"
              },
              {
                "errorLevel": "ERROR",
                "description": "[BR-CO-17]-VAT category tax amount (BT-117) = VAT category taxable amount (BT-116) x (VAT category rate (BT-119) / 100), rounded to two decimals.",
                "lineNumber": 111,
                "columnNumber": 26,
                "schematronTest": "(round(cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/xs:decimal(cbc:Percent)) = 0 and (round(xs:decimal(cbc:TaxAmount)) = 0)) or (round(cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/xs:decimal(cbc:Percent)) != 0 and ((abs(xs:decimal(cbc:TaxAmount)) - 1 < round(abs(xs:decimal(cbc:TaxableAmount)) * (cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/xs:decimal(cbc:Percent) div 100) * 10 * 10) div 100 ) and (abs(xs:decimal(cbc:TaxAmount)) + 1 > round(abs(xs:decimal(cbc:TaxableAmount)) * (cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/xs:decimal(cbc:Percent) div 100) * 10 * 10) div 100 ))) or (not(exists(cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/xs:decimal(cbc:Percent))) and (round(xs:decimal(cbc:TaxAmount)) = 0))",
                "errorId": "BR-CO-17",
                "xpath": "/*:Invoice[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:Invoice-2'][1]/*:TaxTotal[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2'][1]/*:TaxSubtotal[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2'][3]"
              },
              {
                "errorLevel": "ERROR",
                "description": "[BR-CO-10]-Sum of Invoice line net amount (BT-106) = Σ Invoice line net amount (BT-131).",
                "lineNumber": 123,
                "columnNumber": 29,
                "schematronTest": "(xs:decimal(cbc:LineExtensionAmount) = xs:decimal(round(sum(//(cac:InvoiceLine|cac:CreditNoteLine)/xs:decimal(cbc:LineExtensionAmount)) * 10 * 10) div 100))",
                "errorId": "BR-CO-10",
                "xpath": "/*:Invoice[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:Invoice-2'][1]/*:LegalMonetaryTotal[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2'][1]"
              },
              {
                "errorLevel": "ERROR",
                "description": "[BR-CO-13]-Invoice total amount without VAT (BT-109) = Σ Invoice line net amount (BT-131) - Sum of allowances on document level (BT-107) + Sum of charges on document level (BT-108).",
                "lineNumber": 123,
                "columnNumber": 29,
                "schematronTest": "((cbc:ChargeTotalAmount) and (cbc:AllowanceTotalAmount) and (xs:decimal(cbc:TaxExclusiveAmount) = round((xs:decimal(cbc:LineExtensionAmount) + xs:decimal(cbc:ChargeTotalAmount) - xs:decimal(cbc:AllowanceTotalAmount)) * 10 * 10) div 100 )) or (not(cbc:ChargeTotalAmount) and (cbc:AllowanceTotalAmount) and (xs:decimal(cbc:TaxExclusiveAmount) = round((xs:decimal(cbc:LineExtensionAmount) - xs:decimal(cbc:AllowanceTotalAmount)) * 10 * 10 ) div 100)) or ((cbc:ChargeTotalAmount) and not(cbc:AllowanceTotalAmount) and (xs:decimal(cbc:TaxExclusiveAmount) = round((xs:decimal(cbc:LineExtensionAmount) + xs:decimal(cbc:ChargeTotalAmount)) * 10 * 10 ) div 100)) or (not(cbc:ChargeTotalAmount) and not(cbc:AllowanceTotalAmount) and (xs:decimal(cbc:TaxExclusiveAmount) = xs:decimal(cbc:LineExtensionAmount)))",
                "errorId": "BR-CO-13",
                "xpath": "/*:Invoice[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:Invoice-2'][1]/*:LegalMonetaryTotal[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2'][1]"
              },
              {
                "errorLevel": "ERROR",
                "description": "[BR-CO-16]-Amount due for payment (BT-115) = Invoice total amount with VAT (BT-112) -Paid amount (BT-113) +Rounding amount (BT-114).",
                "lineNumber": 123,
                "columnNumber": 29,
                "schematronTest": "(exists(cbc:PrepaidAmount) and not(exists(cbc:PayableRoundingAmount)) and (xs:decimal(cbc:PayableAmount) = (round((xs:decimal(cbc:TaxInclusiveAmount) - xs:decimal(cbc:PrepaidAmount)) * 10 * 10) div 100))) or (not(exists(cbc:PrepaidAmount)) and not(exists(cbc:PayableRoundingAmount)) and xs:decimal(cbc:PayableAmount) = xs:decimal(cbc:TaxInclusiveAmount)) or (exists(cbc:PrepaidAmount) and exists(cbc:PayableRoundingAmount) and ((round((xs:decimal(cbc:PayableAmount) - xs:decimal(cbc:PayableRoundingAmount)) * 10 * 10) div 100) = (round((xs:decimal(cbc:TaxInclusiveAmount) - xs:decimal(cbc:PrepaidAmount)) * 10 * 10) div 100))) or (not(exists(cbc:PrepaidAmount)) and exists(cbc:PayableRoundingAmount) and ((round((xs:decimal(cbc:PayableAmount) - xs:decimal(cbc:PayableRoundingAmount)) * 10 * 10) div 100) = xs:decimal(cbc:TaxInclusiveAmount)))",
                "errorId": "BR-CO-16",
                "xpath": "/*:Invoice[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:Invoice-2'][1]/*:LegalMonetaryTotal[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2'][1]"
              },
              {
                "errorLevel": "ERROR",
                "description": "[BR-CL-03]-currencyID MUST be coded using ISO code list 4217 alpha-3",
                "lineNumber": 145,
                "columnNumber": 44,
                "schematronTest": "((not(contains(normalize-space(@currencyID), ' ')) and contains(' AED AFN ALL AMD ANG AOA ARS AUD AWG AZN BAM BBD BDT BGN BHD BIF BMD BND BOB BOV BRL BSD BTN BWP BYN BZD CAD CDF CHE CHF CHW CLF CLP CNY COP COU CRC CUC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB EUR FJD FKP GBP GEL GHS GIP GMD GNF GTQ GYD HKD HNL HRK HTG HUF IDR ILS INR IQD IRR ISK JMD JOD JPY KES KGS KHR KMF KPW KRW KWD KYD KZT LAK LBP LKR LRD LSL LYD MAD MDL MGA MKD MMK MNT MOP MRO MUR MVR MWK MXN MXV MYR MZN NAD NGN NIO NOK NPR NZD OMR PAB PEN PGK PHP PKR PLN PYG QAR RON RSD RUB RWF SAR SBD SCR SDG SEK SGD SHP SLE SLL SOS SRD SSP STD SVC SYP SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD USN UYI UYU UZS VEF VND VUV WST XAF XAG XAU XBA XBB XBC XBD XCD XDR XOF XPD XPF XPT XSU XTS XUA XXX YER ZAR ZMW ZWL ', concat(' ', normalize-space(@currencyID), ' '))))",
                "errorId": "BR-CL-03",
                "xpath": "/*:Invoice[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:Invoice-2'][1]/*:InvoiceLine[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2'][1]/*:Price[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2'][1]/*:PriceAmount[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2'][1]"
              }
            ],
            "validationType": "SCHEMATRON"
          }
        ],
        "warningsCount": 0,
        "errorsCount": 11,
        "xmlContent": "\n<Invoice xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\" xmlns:cec=\"urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2\" xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\" xmlns=\"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2\">\n    <cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0</cbc:CustomizationID>\n    ... </Invoice>\n"
      }
    }
  }
} 

Send JSON

If you need custom JSON format contact us : support@empirys.com

Get XML

Endpoint

  • GET /endpoints/api/v1/getXML

Description

This endpoint retrieves the XML of a document that has been sent to Peppol.

Required Parameters

  • transmissionId (string) : The transmission id of the document.

Example

GET /endpoints/api/v1/getXML?transmissionId=01cd39d1-f666-470f-a51a-d0633fba7fc5.peppol@ehub.empirys.com HTTP/1.1

Get JSON

Endpoint

  • GET /endpoints/api/v1/getJSON

Description

Retrieves a JSON summary of the basic information contained in the document specified by the provided parameters.

Query Parameters

ParameterRequiredDescription
transmissionId (string)YesThe transmission id of the document.

Example

GET /endpoints/api/v1/getJSON?transmissionId=01cd39d1-f666-470f-a51a-d0633fba7fc5.peppol@ehub.empirys.com HTTP/1.1

Response

This route returns a JSON object with a message indicating the success or failure of the operation, and the values object containing the summary of the document in JSON format.

Response Example

{
    "message": {
        "description": "JSON was successfully retrieved",
        "level": "success"
    },
    "values": {
        "json": {
            "invoiceNumber": "22-04-1-TEST-3d2fe6a5-4ce6-43dd-b277-98a582ecb33e",
            "issueDate": "2022-04-20T00:00:00.000+00:00",
            "dueDate": "2022-05-20T00:00:00.000+00:00",
            "amountTotal": 1208.45,
            "amountTotalBase": 1065,
            "amountTotalTax": 143.45,
            "type": "TAX_INVOICE"
        }
    }
}

Response fields

FieldType
invoiceNumberString
issueDateString (ISO 8601 format)
dueDateString (ISO 8601 format)
amountTotalNumber
amountTotalBaseNumber
amountTotalTaxNumber
typeEnum : TAX_INVOICE or CREDIT_NOTE

Get documents

Get documents sent to Peppol ordered by upload date (descending).

Endpoint

  • GET /endpoints/api/v1/getDocuments

Description

This endpoint retrieves all the documents that have been sent to Peppol.

Optional Parameters (query strings)

  • transmissionId (string): The transmission ID of the document.
  • invoiceNumber (string): Used to filter the documents based on their invoice number.
  • documentType (Enum : INVOICE, CREDIT_NOTE): Used to filter the documents based on their type.
  • sender (string): Used to filter the documents based on their sender.
  • receiver (string): Used to filter the documents based on their receiver.
  • page (number): Used to specify the page of the results (default 1).
  • size (number): Used to specify the number of results per page (default 10 / max 100).

Request

GET /endpoints/api/v1/getDocuments HTTP/1.1
GET /endpoints/api/v1/getDocuments?transmissionId=01cd39d1-f666-470f-a51a-d0633fba7fc5.peppol@ehub.empirys.com HTTP/1.1
GET /endpoints/api/v1/getDocuments?invoiceNumber=FA-2023-04-03 HTTP/1.1
GET /endpoints/api/v1/getDocuments?page=1&size=10 HTTP/1.1

Example Reponse

  • uploadDate (ISO 8601 format) : The date when the document was uploaded to Peppol.
{
  "message": {
    "description": "Successfully retrieved documents",
    "level": "success"
  },
  "values": {
    "documents": [
      {
        "transmissionId": "01cd39d1-f666-470f-a51a-d0633fba7fc5.peppol@ehub.empirys.com",
        "invoiceNumber": "22-04-1-TEST",
        "documentType": "INVOICE",
        "sender": "9938:LU12345678",
        "receiver": "9938:LU31841057",
        "uploadDate": "2023-06-12T14:06:38.347+00:00"
      },
      ...
    ]
  }
}
Last Updated: