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

Obě strany předchozí revizePředchozí verze
peppol:publicrestapi [07.04.2026 06:56] turychpeppol:publicrestapi [13.04.2026 06:29] (aktuální) turych
Řádek 3: Řádek 3:
 ===== 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:// {URL}/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:// {URL}/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:// {URL}/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 recipient’s 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 96: Řádek 96:
 --header 'X-PEPPOL-DOC-TYPE: Generic.Invoice' \ --header 'X-PEPPOL-DOC-TYPE: Generic.Invoice' \
 --header 'Content-Type: application/xml' \ --header 'Content-Type: application/xml' \
---header 'Authorization: Bearer â€˘â€˘â€˘â€˘â€˘â€˘' \+--header 'Authorization: Bearer ••••••' \
 --data-raw '<ns4:Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" .... ' --data-raw '<ns4:Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" .... '
 </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:// {URL}/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 134: Řádek 164:
 curl --location '{URL}/peppol/receive' \ curl --location '{URL}/peppol/receive' \
 --header 'X-PEPPOL-DOCUMENT-ID: 9999' \ --header 'X-PEPPOL-DOCUMENT-ID: 9999' \
---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:// {URL}/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 188: Řádek 249:
 <code bash> <code bash>
 curl --location 'https://peppol.eso9.cz/accesspoint/api/peppol/documents?from=2026-01-01T15%3A00%3A00&to=2026-02-15T00%3A00%3A00' \ curl --location 'https://peppol.eso9.cz/accesspoint/api/peppol/documents?from=2026-01-01T15%3A00%3A00&to=2026-02-15T00%3A00%3A00' \
---header 'Authorization: Bearer â€˘â€˘â€˘â€˘â€˘â€˘'+--header 'Authorization: Bearer ••••••'
 </code> </code>
  
 ===== Retrieval of previously undownloaded documents ===== ===== Retrieval of previously undownloaded documents =====
  
-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:// {URL}/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 230: Řádek 291:
 <code bash> <code bash>
 curl --location 'https://peppol.eso9.cz/accesspoint/api/peppol/undownloaded' \ curl --location 'https://peppol.eso9.cz/accesspoint/api/peppol/undownloaded' \
---header 'Authorization: Bearer â€˘â€˘â€˘â€˘â€˘â€˘'+--header 'Authorization: Bearer ••••••'
 </code> </code>
- 
peppol/publicrestapi.txt · Poslední úprava: 13.04.2026 06:29 autor: turych

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