The Directory can be automatically queried using a public REST API.
The basic URL to query is /search/1.0/format
where "format" can be
one of xml
or json
depending on the output format needed.
If no format is provided, xml
is used as the default.
The response Content-Type for "xml" is application/xml
and for
"json" it is application/json
.
Only HTTP GET
requests are accepted.
Other HTTP verbs are rejected with HTTP status code 405.
Query parameters must be appended to the URL as parameters.
The XML Schema for the XML responses can be downloaded from /files/directory-search-result-list-v1.xsd.
This section outlines the available request parameters and there meaning. If multiple search terms are used, only results matching all request parameters are returned (so it is handled like a boolean AND query). If the combination of query parameters resulted in an empty search result, an HTTP status code 200 with an empty result body is returned!
iso6523-actorid-upis::9915:test
) the search will return HTTP status code 400.
#
(%23) and :
(%3A) that can be contained in search values.
busdox-docid-qns::urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:www.cenbii.eu:transaction:biitrns010:ver2.0:extended:urn:www.peppol.eu:bis:peppol5a:ver2.0::2.1
)
the search will return HTTP status code 400.
#
(%23) and :
(%3A) that can be contained in search values.
/search/1.0/xml?doctype=busdox-docid-qns%3A%3Aurn%3Aoasis%3Anames%3Aspecification%3Aubl%3Aschema%3Axsd%3AInvoice-2%3A%3AInvoice%23%23urn%3Awww.cenbii.eu%3Atransaction%3Abiitrns010%3Aver2.0%3Aextended%3Aurn%3Awww.peppol.eu%3Abis%3Apeppol5a%3Aver2.0%3A%3A2.1
Try it
/search/1.0/json?doctype=busdox-docid-qns%3A%3Aurn%3Aoasis%3Anames%3Aspecification%3Aubl%3Aschema%3Axsd%3AInvoice-2%3A%3AInvoice%23%23urn%3Awww.cenbii.eu%3Atransaction%3Abiitrns010%3Aver2.0%3Aextended%3Aurn%3Awww.peppol.eu%3Abis%3Apeppol5a%3Aver2.0%3A%3A2.1
Try it
true
will disable output beautification.
This section defines the response document layout. Special header parameters are present in all result representations and have the following semantics:
total-result-count
the total number of matching documents
used-result-count
the number of results contained in the response.
This is always ≤ total-result-count
as it is based on the paging parameters used.
result-page-index
is the 0-based index of the result page.
result-page-count
is the number of entities to show on a single page.
first-result-index
is the effective 0-based index of the first result item
returned (inclusive). This is the result of result-page-index * result-page-count
.
last-result-index
is the effective 0-based index of the last result item
returned (inclusive). This is the result of min ((result-page-index + 1) * result-page-count - 1, total-result-count - 1)
.
query-terms
is the combined query string that was used to perform a search.
This is mainly for debugging purposes to cross-check which parameters took effect in searching.
creation-dt
the UTC date and time when this response was created.
It is formatted according to XML Schema (XSD) rules.
XML responses are always encoded in UTF-8.
The response MIME type is always application/xml
.
Responses should not be cached.
The XML Schema for the XML responses can be downloaded from /files/directory-search-result-list-v1.xsd.
<?xml version="1.0" encoding="UTF-8"?> <resultlist version="1.0" total-result-count="4" used-result-count="4" result-page-index="0" result-page-count="20" first-result-index="0" last-result-index="3" query-terms="q=9915:test" creation-dt="2017-09-20T18:13:07.468Z"> <match> <participantID scheme="iso6523-actorid-upis">9915:test</participantID> <docTypeID scheme="busdox-docid-qns">urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:www.cenbii.eu:transaction:biitrns010:ver2.0:extended:urn:www.peppol.eu:bis:peppol4a:ver2.0:extended:urn:www.erechnung.gv.at:ver1.0::2.1</docTypeID> <docTypeID scheme="busdox-docid-qns">urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2::CreditNote##urn:www.cenbii.eu:transaction:biitrns014:ver2.0:extended:urn:www.peppol.eu:bis:peppol5a:ver2.0::2.1</docTypeID> <docTypeID scheme="busdox-docid-qns">urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:www.cenbii.eu:transaction:biitrns010:ver2.0:extended:urn:www.peppol.eu:bis:peppol5a:ver2.0::2.1</docTypeID> <docTypeID scheme="busdox-docid-qns">urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2::CreditNote##urn:www.cenbii.eu:transaction:biitrns014:ver2.0:extended:urn:www.peppol.eu:bis:peppol5a:ver2.0:extended:urn:www.erechnung.gv.at:ver1.0::2.1</docTypeID> <docTypeID scheme="busdox-docid-qns">urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:www.cenbii.eu:transaction:biitrns010:ver2.0:extended:urn:www.peppol.eu:bis:peppol4a:ver2.0::2.1</docTypeID> <docTypeID scheme="busdox-docid-qns">urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:www.cenbii.eu:transaction:biitrns010:ver2.0:extended:urn:www.peppol.eu:bis:peppol5a:ver2.0:extended:urn:www.erechnung.gv.at:ver1.0::2.1</docTypeID> <entity> <name>Austrian Government</name> <countryCode>AT</countryCode> <website>https://test.e-rechnung.gv.at</website> <additionalInfo>This is the test endpoint for the whole Austrian Government</additionalInfo> <regDate>2012-01-01</regDate> </entity> </match> <match> <participantID scheme="iso6523-actorid-upis">9915:digit_test</participantID> <entity> <name>DG DIGIT</name> <countryCode>BE</countryCode> <geoInfo>Brussels Rue Belliard 28</geoInfo> </entity> <entity> <name>Second entity name</name> <countryCode>AU</countryCode> <identifier scheme="GLN">123454321</identifier> <additionalInfo>Whatever it takes - Peppol Directory will index this</additionalInfo> </entity> <entity> <name>Third entity - to the rescue</name> <countryCode>DE</countryCode> <geoInfo>Germany, Baden-Württemberg</geoInfo> <identifier scheme="PLZ">79110</identifier> <additionalInfo>We need more German Peppol endpoints</additionalInfo> </entity> </match> </resultlist>
JSON responses are always encoded in UTF-8.
The response MIME type is always application/json
.
Responses should not be cached.
{ "version":"1.0", "total-result-count":4, "used-result-count":4, "result-page-index":0, "result-page-count":20, "first-result-index":0, "last-result-index":3, "query-terms":"q=9915:test", "creation-dt":"2017-09-20T18:15:00.438Z", "matches":[ { "participantID":{ "scheme":"iso6523-actorid-upis", "value":"9915:test" }, "docTypes":[ { "scheme":"busdox-docid-qns", "value":"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:www.cenbii.eu:transaction:biitrns010:ver2.0:extended:urn:www.peppol.eu:bis:peppol4a:ver2.0:extended:urn:www.erechnung.gv.at:ver1.0::2.1" }, { "scheme":"busdox-docid-qns", "value":"urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2::CreditNote##urn:www.cenbii.eu:transaction:biitrns014:ver2.0:extended:urn:www.peppol.eu:bis:peppol5a:ver2.0::2.1" }, { "scheme":"busdox-docid-qns", "value":"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:www.cenbii.eu:transaction:biitrns010:ver2.0:extended:urn:www.peppol.eu:bis:peppol5a:ver2.0::2.1" }, { "scheme":"busdox-docid-qns", "value":"urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2::CreditNote##urn:www.cenbii.eu:transaction:biitrns014:ver2.0:extended:urn:www.peppol.eu:bis:peppol5a:ver2.0:extended:urn:www.erechnung.gv.at:ver1.0::2.1" }, { "scheme":"busdox-docid-qns", "value":"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:www.cenbii.eu:transaction:biitrns010:ver2.0:extended:urn:www.peppol.eu:bis:peppol4a:ver2.0::2.1" }, { "scheme":"busdox-docid-qns", "value":"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:www.cenbii.eu:transaction:biitrns010:ver2.0:extended:urn:www.peppol.eu:bis:peppol5a:ver2.0:extended:urn:www.erechnung.gv.at:ver1.0::2.1" } ], "entities":[ { "name":"Austrian Government", "countryCode":"AT", "websites":[ "https://test.e-rechnung.gv.at" ], "additionalInfo":"This is the test endpoint for the whole Austrian Government", "regDate":"2012-01-01" } ] }, { "participantID":{ "scheme":"iso6523-actorid-upis", "value":"9915:digit_test" }, "entities":[ { "name":"DG DIGIT", "countryCode":"BE", "geoInfo":"Brussels Rue Belliard 28" }, { "name":"Second entity name", "countryCode":"AU", "identifiers":[ { "scheme":"GLN", "value":"123454321" } ], "additionalInfo":"Whatever it takes - Peppol Directory will index this" }, { "name":"Third entity - to the rescue", "countryCode":"DE", "geoInfo":"Germany, Baden-Württemberg", "identifiers":[ { "scheme":"PLZ", "value":"79110" } ], "additionalInfo":"We need more German Peppol endpoints" } ] } ] }