Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a list of content-types for the different APIs and documents #1

Open
stigbd opened this issue May 14, 2019 · 3 comments
Open
Assignees

Comments

@stigbd
Copy link
Contributor

stigbd commented May 14, 2019

We need to provide a list of content-types for the different APIs so that we are able to provide some validation on the request.

The content-types does not exist, but we can base it on document types. (Who is in possession of the document types overview?)

@ekoskent
Copy link
Collaborator

ekoskent commented May 16, 2019

In PEPPOL the document type is described with documentIdentifier, see "ICT-Transport-SMP_Service_Specification-110.pdf" in https://peppol.eu/downloads/the-peppol-edelivery-network-specifications/.
"This scheme is based on a concatenation of the document namespace, root element, and optional (and
document-dependent) subtype:
{rootNamespace}::{documentElementLocalName}[##{Subtype identifier}].
Where ‗[ ]‘ denotes an optional part of the identifier, and everything outside ‗{ }‘ are string literals.
For example, in the case of a NES-UBL order, this document can then be identified by
 Root namespace: urn:oasis:names:specification:ubl:schema:xsd:Order-2
 Document element local name: Order
 Subtype identifier: UBL-2.0 (since several versions of the Order schema may use the same
namespace + document element name)
The document type identifier will then be:
urn:oasis:names:specification:ubl:schema:xsd:Order-2::Order##UBL-2.0"

For the reference implementation the supported identifiers are (at the moment):

Invoices (only UBL as the finnish ones don't have a namespace so they are tricky to define):
urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##UBL-2.1

Bank statements:
urn:iso:std:iso:20022:tech:xsd:camt.053.001.02:BkToCstmrStmt##1.4

Other vouchers to be added later

PEPPOL list of document identifiers: https://peppol.eu/wp-content/uploads/2017/12/PEPPOL_Policy-for-use-of-identifiers-300-11_certificates.pdf chapter 5.2

@ekoskent
Copy link
Collaborator

The API and also our reference implementation should be able to handle pdf vouchers as well, should we define a general documentIdentifier for pdf vouchers?

@ekoskent
Copy link
Collaborator

The API needs to have a field for the company identifier to know who's data we are dealing with. i suggest we use identifiers according to the ISO-6523-1. In consists of a country identifier + numeric part of the VAT identifier.
Example of a Finnish VAT identifier: FI12345671, Finnish country identifier: 0037

ISO-6523-1 identifier is 003712345671. There is also 5 additional digits in the end to identify a specific division etc. within one company.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants