Schemaorg: taxID, vatID and similar identifiers should have a standardised format with country codes

Created on 6 Aug 2020  路  5Comments  路  Source: schemaorg/schemaorg

I think we should have a standard way to indicate the issuing country and what kind of id we are talking about.

A simple option would be "[COUNTRY CODE]:[ID KIND]:[ID]"

For example: BR:CPF:000.000.000-00, US:SSN:000-00-0000

Note that the ID part is always without punctuation. I changed my mind on this, it is better to incorporate the punctuation most of time as this makes microdata easier to use.

Also, it would be great if they were arrays because companies and people in places like Brazil have multiple ID numbers. For people it is CPF and RG (or RNE for foreigners). For companies it is CNPJ (national one), IE (state one), NIRE (regional one) and IM (municipal one).

no-issue-activity

All 5 comments

Firstly to your last point, all properties in Schema.org are repeatable so a Person/Organization can have multiple IDs.

As to defined formats. Are you referencing international standards for this that could be referenced in the property description? Alternatively, potentially a proposal could be made to include _PropertyValue_ as an expected type, as is currently available for the _identifier_ property. This would enable more detailed descriptions.

The only international standard I am referring to is the one about country codes (ISO 3166).

I am not aware of anyone who compiled a list of national ID systems. (For example, SSN, TIN and EIN in the USA and CPF, CNPJ, IM, IE, NIRE in Brazil)

I took a look at https://schema.org/PropertyValue but it seems to complicated for things as simple as id numbers.

When using microdata, the following is a good simple example:

<p>Company number
 <span itemprop="taxid"><span style="display:hidden">BR:CNPJ:</span>00.530.279/0001-15</span></p>

Using PropertyValue or something like it, I imagine it would become something like:

<p>Company number <span itemprop="taxid" itemscope itemtype="IDNumber">
  <meta itemprop="authority" content="BR:CNPJ"/>
  <span itemtype="value">00.530.279/0001-15</span>
</span></p>

However, I see that while the first example os shorter and simpler, the second one is "less hacky".

EDIT: I now think that the second example is better because it is less likely to lead to unexpected spaces in the id number.

Example:

<span itemprop="taxid"><span style="display:hidden">BR:CNPJ:</span>
00.530.279/0001-15</span>

Leads to BR:CNPJ: 00.530.279/0001-15 (notice the space in the middle)

It is not really the function of a generic vocabulary such as Schema.org to define new formats for international standard identifiers. More it is to possibly reference work and agreement elsewhere in the area.

As to my suggestion of potentially adding PropertyValue to the expected type range of taxID and vatID, the Microdata mark up I expect would look like this:

<div itemscope itemprop="taxID" itemtype="http://schema.org/PropertyValue">
        <meta itemprop="propertyID" content="https://www.wikidata.org/wiki/Q15816867"><span itemprop="value">00.530.279/0001-15</span>
</div>

The use of the Wikidata identifier for CNJP making explicit as to what type of identifier is being referenced.

The idea of using wikidata is cool but it seems a bit annoying to "parse", especially for humans.

I think it is better to use the "[country_id]:[id_name]" system, where only the country_id part is regulated while the id_name part is left for people to use as they see fit and let conventions appear over time.

<div itemscope itemprop="taxID" itemtype="http://schema.org/PropertyValue">
    <meta itemprop="propertyID" content="BR:CNPJ">
    <span itemprop="value">00.530.279/0001-15</span>
</div>

This issue is being tagged as Stale due to inactivity.

Was this page helpful?
0 / 5 - 0 ratings