Uživatelské nástroje

Nástroje pro tento web


peppol:publicrestapi

Rozdíly

Zde můžete vidět rozdíly mezi vybranou verzí a aktuální verzí dané stránky.

Odkaz na výstup diff

Následující verze
Předchozí verze
peppol:publicrestapi [24.03.2026 08:31] – vytvořeno turychpeppol:publicrestapi [13.04.2026 06:29] (aktuální) turych
Řádek 1: Řádek 1:
-====== Public REST API ======+====== REST API ======
  
 ===== Test Access Point URL ===== ===== Test Access Point URL =====
  
-https://peppol.eso9.cz/accesspoint+[[https://peppol.eso9.cz/accesspoint|https://peppol.eso9.cz/accesspoint]]
  
 ===== Production Access Point URL ===== ===== Production Access Point URL =====
  
-https://eso9peppol.eu/accesspoint+[[https://eso9peppol.eu/accesspoint|https://eso9peppol.eu/accesspoint]]
  
 ===== Basic communication verification ===== ===== Basic communication verification =====
  
-  * //URL:// %7B%7BURL%7D%7D/api/auth/whoami+  * //URL:// [[{{URL}}/api/auth/whoami|{{URL}}/api/auth/whoami]]
   * //HTTP method:// GET   * //HTTP method:// GET
   * //Authentication:// no   * //Authentication:// no
   * //Headers://   * //Headers://
-    * Accept: ''%%*/*%%''+    * Accept: ''*/*''
   * //Body:// empty   * //Body:// empty
   * //Returns:// caller IP address   * //Returns:// caller IP address
Řádek 21: Řádek 21:
 ===== Authentication ===== ===== Authentication =====
  
-  * //URL:// %7B%7BURL%7D%7D/api/auth+  * //URL:// [[{{URL}}/api/auth|{{URL}}/api/auth]]
   * //HTTP method:// POST   * //HTTP method:// POST
   * //Authentication:// no   * //Authentication:// no
   * //Headers://   * //Headers://
-    * Accept: ''%%*/*%%''+    * Accept: ''*/*''
     * Content-Type: application/json     * Content-Type: application/json
   * //Body:// JSON with user name (VAT NO) and password in structure:   * //Body:// JSON with user name (VAT NO) and password in structure:
Řádek 46: Řádek 46:
 </code> </code>
  
-  * //statusCode:// HTTP status, e.g. 200 (OK).+  * //statusCode:// HTTP status, e.g. 200 (OK).
   * //message:// Bearer token used for authentication of SEND / RECEIVE methods. Token is valid for 24 hours. Error description if authentication fails.   * //message:// Bearer token used for authentication of SEND / RECEIVE methods. Token is valid for 24 hours. Error description if authentication fails.
   * //errorCode:// Error Code if authentication fails.   * //errorCode:// Error Code if authentication fails.
Řádek 61: Řádek 61:
 </code> </code>
  
-===== Sending documents =====+===== Sending document in BIS3.0 format =====
  
 Validates and sends one document. Validates and sends one document.
  
-  * //URL:// %7B%7BURL%7D%7D/api/peppol/send+  * //URL:// [[{{URL}}/api/peppol/send|{{URL}}/api/peppol/send]]
   * //HTTP method:// POST   * //HTTP method:// POST
-  * //Authentication:// Bearer token obtained by calling the ''%%AUTH%%'' method+  * //Authentication:// Bearer token obtained by calling the ''AUTH'' method
   * //Headers://   * //Headers://
-    * Accept: ''%%*/*%%''+    * Accept: ''*/*''
     * Content-Type: application/xml     * Content-Type: application/xml
-    * Authorization: Bearer 89puKGci +    * Authorization: Bearer 89puKGci... 
-    * X-PEPPOL-RECEIVER: PEPPOL recipients ID (aka ParticipantID), e.g.''%%9929:CZ27624609%%'' +    * X-PEPPOL-RECEIVER: PEPPOL recipient's ID (aka ParticipantID), e.g.''9929:CZ27624609'' 
-    * X-PEPPOL-DOC-TYPE: type of document being sent, e.g.''%%Generic.Invoice%%'' or ''%%Generic.CreditNote%%''+    * X-PEPPOL-DOC-TYPE: type of document being sent, e.g.''Generic.Invoice'' or ''Generic.CreditNote''
   * //Body:// document in PEPPOL BIS 3.0 format   * //Body:// document in PEPPOL BIS 3.0 format
   * //Returns:// JSON in structure:   * //Returns:// JSON in structure:
Řádek 85: Řádek 85:
 </code> </code>
  
-  * //statusCode:// HTTP status, e.g. 200 (OK)+  * //statusCode:// HTTP status, e.g. 200 (OK)
   * //message:// created document ID on Access Point. Error description if sending fails.   * //message:// created document ID on Access Point. Error description if sending fails.
   * //errorCode:// Error Code if sending fails.   * //errorCode:// Error Code if sending fails.
Řádek 100: Řádek 100:
 </code> </code>
  
-===== Receiving documents =====+===== Sending document in flat structure =====
  
-Receipt of a single document.+Validates and sends one document in flat structure. The flat structure XML is described in detail [[Vstupní-FlatXML|here]].
  
-  * //URL:// %7B%7BURL%7D%7D/api/peppol/receive+  * //URL:// [[{{URL}}/api/peppol/sendFlat|{{URL}}/api/peppol/sendFlat]] 
 +  * //HTTP method:// POST 
 +  * //Authentication:// Bearer token obtained by calling the ''AUTH'' method 
 +  * //Headers:// 
 +    * Accept: ''*/*'' 
 +    * Content-Type: application/xml 
 +    * Authorization: Bearer 89puKGci... 
 +    * X-PEPPOL-RECEIVER: PEPPOL recipient's ID (aka ParticipantID), e.g.''9929:CZ27624609'' 
 +    * X-PEPPOL-DOC-TYPE: type of document being sent, e.g.''Generic.Invoice'' or ''Generic.CreditNote'' 
 +  * //Body:// document in [[Vstupní-FlatXML|flat format]] 
 +  * //Returns:// JSON in structure: 
 + 
 +<code json> 
 +
 +    "statusCode": 200, 
 +    "message": 71, 
 +    "timestamp": "2026-04-08 12:59:28" 
 +
 +</code> 
 + 
 +  * //statusCode:// HTTP status, e.g. 200 (OK) 
 +  * //message:// created document ID on Access Point. Error description if sending fails. 
 +  * //errorCode:// Error Code if sending fails. 
 + 
 +==== Example ==== 
 + 
 +===== Receiving document in BIS3.0 format ===== 
 + 
 +Receipt of a single document in PEPPOL BIS3.0 format. 
 + 
 +  * //URL:// [[{{URL}}/api/peppol/receive|{{URL}}/api/peppol/receive]]
   * //HTTP method:// GET   * //HTTP method:// GET
-  * //Authentication:// Bearer token obtained by calling the ''%%AUTH%%'' method+  * //Authentication:// Bearer token obtained by calling the ''AUTH'' method
   * //Headers://   * //Headers://
-    * Accept: ''%%*/*%%''+    * Accept: ''*/*''
     * Content-Type: application/xml     * Content-Type: application/xml
-    * Authorization: Bearer 89puKGci +    * Authorization: Bearer 89puKGci... 
-    * X-PEPPOL-DOCUMENT-ID: document ID retrieved from webhook (''%%IDPEPPOLDOC%%'' in ESO9 table ''%%PEPPOL_DOC_QUEUE%%'')+    * X-PEPPOL-DOCUMENT-ID: document ID retrieved from webhook (''IDPEPPOLDOC'' in ESO9 table ''PEPPOL_DOC_QUEUE'')
   * //Body:// none   * //Body:// none
   * //Returns:// JSON in structure:   * //Returns:// JSON in structure:
Řádek 125: Řádek 155:
 </code> </code>
  
-  * //statusCode:// HTTP status, e.g. 200 (OK)+  * //statusCode:// HTTP status, e.g. 200 (OK)
   * //document:// document in PEPPOL BIS 3.0 format   * //document:// document in PEPPOL BIS 3.0 format
   * //errorCode:// Error Code if sending fails.   * //errorCode:// Error Code if sending fails.
Řádek 136: Řádek 166:
 --header 'Authorization: Bearer ••••••' --header 'Authorization: Bearer ••••••'
 </code> </code>
 +
 +===== Receiving document in flat structure =====
 +
 +Receipt of a single document in flat structure. The flat structure XML is described in detail [[Vstupní-FlatXML|here]].
 +
 +  * //URL:// [[{{URL}}/api/peppol/receiveFlat|{{URL}}/api/peppol/receiveFlat]]
 +  * //HTTP method:// GET
 +  * //Authentication:// Bearer token obtained by calling the ''AUTH'' method
 +  * //Headers://
 +    * Accept: ''*/*''
 +    * Content-Type: application/xml
 +    * Authorization: Bearer 89puKGci...
 +    * X-PEPPOL-DOCUMENT-ID: document ID retrieved from webhook (''IDPEPPOLDOC'' in ESO9 table ''PEPPOL_DOC_QUEUE'')
 +  * //Body:// none
 +  * //Returns:// JSON in structure:
 +
 +<code json>
 +{
 +    "statusCode": 200,
 +    "message": "",
 +    "timestamp": "2025-11-28 13:00:45",
 +    "document": "<?xml version="1.0" encoding="utf-8"?><Invoice> ... </Invoice>\n",
 +    "documentType": "Generic.InvoiceFlat"
 +}
 +</code>
 +
 +  * //statusCode:// HTTP status, e.g. 200 (OK)
 +  * //document:// document in [[Vstupní-FlatXML|flat format]]
 +  * //errorCode:// Error Code if sending fails.
 +
 +==== Example ====
  
 ===== Retrieval of all documents ===== ===== Retrieval of all documents =====
Řádek 141: Řádek 202:
 Retrieves a list of all documents (sent and received) without including their payload. Retrieves a list of all documents (sent and received) without including their payload.
  
-  * //URL:// %7B%7BURL%7D%7D/api/peppol/documents?from=2026-01-01T15:00:00&to=2026-02-15T00:00:00+  * //URL:// [[{{URL}}/api/peppol/documents?from=2026-01-01T15:00:00&to=2026-02-15T00:00:00|{{URL}}/api/peppol/documents?from=2026-01-01T15:00:00&to=2026-02-15T00:00:00]]
   * //HTTP method:// GET   * //HTTP method:// GET
   * //Parameters:// from / to - document creation date and time (from / to)   * //Parameters:// from / to - document creation date and time (from / to)
-  * //Authentication:// Bearer token obtained by calling the ''%%AUTH%%'' method+  * //Authentication:// Bearer token obtained by calling the ''AUTH'' method
   * //Headers://   * //Headers://
-    * Accept: ''%%*/*%%''+    * Accept: ''*/*''
     * Content-Type: application/xml     * Content-Type: application/xml
-    * Authorization: Bearer 89puKGci+    * Authorization: Bearer 89puKGci...
   * //Body:// none   * //Body:// none
   * //Returns:// JSON in structure:   * //Returns:// JSON in structure:
Řádek 180: Řádek 241:
 </code> </code>
  
-  * //statusCode:// HTTP status, e.g. 200 (OK)+  * //statusCode:// HTTP status, e.g. 200 (OK)
   * //message:// list of all documents associated with the specified entity   * //message:// list of all documents associated with the specified entity
   * //errorCode:// Error Code if sending fails.   * //errorCode:// Error Code if sending fails.
Řádek 195: Řádek 256:
 Retrieves a list of documents with the status “not yet downloaded” in the Access Point. Retrieves a list of documents with the status “not yet downloaded” in the Access Point.
  
-  * //URL:// %7B%7BURL%7D%7D/api/peppol/undownloaded+  * //URL:// [[{{URL}}/api/peppol/undownloaded|{{URL}}/api/peppol/undownloaded]]
   * //HTTP method:// GET   * //HTTP method:// GET
-  * //Authentication:// Bearer token obtained by calling the ''%%AUTH%%'' method+  * //Authentication:// Bearer token obtained by calling the ''AUTH'' method
   * //Headers://   * //Headers://
-    * Accept: ''%%*/*%%''+    * Accept: ''*/*''
     * Content-Type: application/xml     * Content-Type: application/xml
-    * Authorization: Bearer 89puKGci+    * Authorization: Bearer 89puKGci...
   * //Body:// none   * //Body:// none
   * //Returns:// JSON in structure:   * //Returns:// JSON in structure:
Řádek 222: Řádek 283:
 </code> </code>
  
-  * //statusCode:// HTTP status, e.g. 200 (OK)+  * //statusCode:// HTTP status, e.g. 200 (OK)
   * //message:// list of undownloaded documents associated with the specified entity   * //message:// list of undownloaded documents associated with the specified entity
   * //errorCode:// Error Code if sending fails.   * //errorCode:// Error Code if sending fails.
Řádek 232: Řádek 293:
 --header 'Authorization: Bearer ••••••' --header 'Authorization: Bearer ••••••'
 </code> </code>
- 
peppol/publicrestapi.1774341115.txt.gz · Poslední úprava: 24.03.2026 08:31 autor: turych

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki
DokuWiki Appliance - Powered by TurnKey Linux