Namespaces for Farm Data Identifiers

Purpose and Scope

The purpose of the urn:nzl:pri: namespace is to support a list of unique identifier namespaces for use within the primary sector. A variety of official biosecurity and genetic recording schemes define identifiers for farms, herds, organisations and animals. A master list of these schemes allows software and device vendors to understand and interpret identifiers in a useful manner.

The NZ Farm Data Standards project is the interim administrator of the urn:nzl:pri: namespace, delegated by the Department of Internal Affairs of the New Zealand Government, consistent with RFC-4350. It is charged with uniquely assigning the namespace at this level.


The identifier has a hierarchical structure as follows:

      urn:nzl:pri: nz-specifier>[:<nz-specifier defined string>]+

+ denotes one or more occurrences of nz-specifier defined strings all delimited by a colon.

For example:     

  • urn:nzl:pri:herd:tbfree:                 (e.g. 4071234)
  • urn:nzl:pri::herd:nait:                    (e.g. 50812345) 
  • urn:nzl:pri:animal:nait_traka:     (e.g. 982-000356154301-9999999)
  • urn:nzl:pri:animal:nait_visual:    (e.g. 655123-13-258974)

The <nz-specifier> and <nz-specifier defined string> can comprise any UTF-8 characters compliant with URI syntax and must not contain the ":" character (see STD 66, RFC 3986).  The exclusion of the colon from the list of other characters means that the colon can only occur as a delimiter between string values.

Rules for Lexical Equivalence

The lexical equivalence of the NZL namespace-specific strings (NSSs) is defined as an exact, but not case-sensitive, string match.  Best Practice guidelines specify:

  1. NZL in either uppercase or lowercase (Names will be assigned as case-insensitive, to ensure that there will not be two NZL URNs differing only by case.)
  2. The first letter of the second word <nz-specifier> and <nz specifier defined string> in uppercase (camel case) or the whole value in lowercase.
  3. Any identifier in NZL namespaces can be compared using the normal mechanisms for percent-encoded UTF-8 strings.
  4. The use of diacritic marks such as Maori macrons in identifiers is supported as described in RFC-4350.

Registering your Namespace Identifier

Please contact the Declared Registrant of the urn:nzl:pri: namespace below to register additional identifier namespaces:

NZ Farm Data Standards
New Zealand

Use our Contact page to email us.

You will be required to supply your organisation contact details (address and email), proposed namespace, scope of identifiers (entities covered), and optionally a POSIX regular expression that provides initial parsing for the identifiers.

Existing Namespace Objects

Below are listed the existing Namespaces used primarily for the Animal Data Standards and DataLinker. Note that the processor URN is also included. 

Further classes can be proposed to the Declared Registrant of the urn:nzl:pri:namespace (contact details above). It is expected, for example, that plant specific classes may be added.

AnimalTB Free Visualurn:nzl:pri:animal:id:tbfree_VisualTBfree visual tags identify an animal suspected of having Tb, commonly referred to as the AHB rector tag. This is always in addition to the management or NAIT tag. This also includes an optional year code. Limited to Cattle and Deer herds.[AHB herd number]-[yy=year (optional)]-[sequence number], e.g. 5236512-12-123456 (hyphen to separate ID components)

Note that NAIT Visual Tag ID components should be separated by a hyphen (-)
TBfree_Visual (with year): aaaaaaa-yy-nnnnnn

Where a= AHB herd number (7 digits)
y= year (2 digits)
n= sequence number (1-6 digits)
OSPRI New Zealand Limited
AnimalNAIT Trakaurn:nzl:pri:animal:id:nait_TrakaThe NAIT Traka is a visual representation of RFID tag is used for Cattle and Deer born before 1/7/2012, though Traka tags were also used after NAIT was established. Scope also includes the TBfree or AHB Traka with the 7 digit TBFree number in place of the NAIT number. Note that the Manufacturer-code is aligned to ISO11785. Limited to Cattle and Deer herds.The NAIT_Traka postfix can be up to 8 digits, but excluding 7 digits: [Manufacturer-Code ]-[number part of RFID]-[NAIT number {7}, e.g. 942-000012345123-258974

TBfree Traka:
[Manufacturer-Code]-[number part of RFID]-[TBfree herd number{7}, e.g. 982-523651-258974-1234567

Tbfree Traka: : mmm-NNNNNNNNNNNN-aaaaaaa

Where m=ICAR manufacturer code
N= number part of RFID (12 digits)
A= NAIT number (2-6 or 8 digits)
a= AHB herd number (7 digits)
OSPRI New Zealand Limited
AnimalNAIT Visualurn:nzl:pri:animal:id:nait_VisualVisual RFID tag used as the official animal identifier for cattle and deer. NAIT Visual Tag IDs for birth ID formats should be unique, unless the tag is intended to replace a matching NAIT Visual Tag ID where the original tag has been damaged or lost. The NAIT Visual can also include the year born as optional. [NAIT number]-[yy(optional)]-[sequence number], e.g. 655123-13-258974, or 655123-258974

Note that NAIT Visual Tag ID components should be separated by a hyphen (-)
NAIT_Visual (with year): AAAAAA-yy-nnnnnn

Where A= NAIT number (2-6 or 8 digits)
y= year (2 digits)
n= sequence number (1-6 digits)
OSPRI New Zealand Limited
AnimalSIL Official IDurn:nzl:pri:animal:id:silAn official SIL identifier includes the
flock code and tag (the latter a text string), and may
optionally include the year born (by convention the year is
often included in the tag number).

f = birthFlockCode
y = yearBorn
n = animalTag
Beef + Lamb Genetics Limited
AnimalISO 11784 (RFID)urn:iso:std:iso:11784An RFID tag is an ICAR coded radio frequency identification tag consisting of a 3 digit ICAR code and a unique 12 digit sequence number[ICAR Manufacturer code] [unique sequence number]RFID: mmm nnnnnnnnnnnn (space may be omitted)

where m = ICAR code
n = twelve digit unique sequence number

ICAR codes (NZ):
982 – Allflex
951 – Leader
942 – Zee Tags
International Standards Organisation
AnimalGS1 SGTIN (UHF RFID)urn:epc:id:sgtinSome trials with UHF RFID in deer have used an SGTIN (Serialised Global Trade Item Number) issued by global standards organisation GS1 , which functions much like a barcode identifies a category of products, but with the addition of a unique item number as well.GS1
HerdTB Free Numberurn:nzl:pri:herd:TBfreeTBfree Herd number, sometimes referred to as the AHBHerd. Defines the animals that live together as a group (for disease management purposes).
Currently this is limited to Cattle and Deer herds.
7 digits required, e.g. 4061234 nnnnnnn where n= {0-9}OSPRI New Zealand Limited
HerdNAIT Numberurn:nzl:pri:herd:NAITReferred to as the NAIT number. The number corresponds to a person in charge of animals (PICA) at a location where Cattle or Deer is produced. Up to 8 digits (can be 2, 3, 4, 5, 6 or 8 digits, but not 7 digits), e.g. 50812345nnnnnnnn where n={0-9}OSPRI New Zealand Limited
HerdFlock Codeurn:nzl:pri:herd:silSheep Improvement Database Flock Code. Flock Code is used to define Birth Flock and to define Current FlockFormat: Four – five digit code where n={0-9}Beef + Lamb Genetics Limited
LocationProcessorurn:nzl:pri:processorProcessing plants. These are identifier codes used to describe a processing plant.NZ Farm Data Standards
LocationAgriBase IDurn:nzl:pri:loc:agribaseAgriBase farm id. AgriBase is a spatial farms database. Each distinct farm has a unique farm identifier[districtCode][serialNumber] [aa][nnnnn] where a = TLA District code, n = serial number digit. Serial number is left padded with zeroes so it is always 5 digits longAsureQuality Ltd.
Private Bag 3080

Updated 09.01.2017


The Farm Data Standards is one of three data integration initiatives driven by the pastoral sector on behalf of farmers. The Farm Data Code of Practice, and the Data Linker are complementary tools aimed at getting data moving across the primary sector - securely, efficiently and within a transparent framework. The initiatives are funded by DairyNZ (through the Transforming the Dairy Value Chain programme), the Red Meat Profit Partnership and the Ministry of Primary Industries through the Primary Growth Partnership.

© New Zealand Farm Data Standards. All rights reserved.