Go to home page - New Zealand Food Safety Authority.
Page content. Site access keysMain Menu
| Advanced Search
Te Pou Oranga Kai O Aotearoa

 
 
 

Animal Products E-cert Help Files

Batch Files

Eligibility Documents (EDs) and Export Certificates can be Raised, Amended (if the status is Raised, To be Amended, Amended or Resubmit) or Cancelled using XML batch files. A batch file is a series of tags and corresponding data telling E-cert to put information into the appropriate fields on the database. To get an idea of what batch files look like go to Batch File Examples. When viewed these certificates look the same as those raised using the interactive browser submission form.

A batch file may contain one or more certificate submissions. They are the quickest and cheapest way to generate multiple certificates in E-cert and are especially useful for Consignors who repeatedly send nearly identical certificates.

Batch files can be submitted on-line or transmitted to E-cert from another computer system via SOAP (Simple Object Application Protocol).

Basics

A batch file is a plain text format (.txt) file and can be generated:

automatically from a company computer inventory system

manually using a word processor (eg Notepad or Microsoft Word) or a spreadsheet (eg Microsoft Excel)

on-line from any existing ED or export certificate using the Data view button button.

If you are using the Data View button  button, right click and select ‘View Source’ than use the information that is displayed on screen and paste it into a text editor for amending. If using a word processor or spreadsheet to generate or amend a batch file, the file must be saved as plain text. This file can then be used as a template. For each new certificate submission, change the data as required (including the certificate number) and save as a separate file. This file can then be submitted to raise a new certificate. A step by step guide to setting up batch file templates is provided in Setting up Batch File Templates.

Although you can generate a batch file using the Data View button, you won't be able to submit that file until you have at least amended the certificate number and saved the amended file. E-cert will not accept two certificates with the same number within a calendar year unless the existing certificate is in a status of Resubmit. In that case, everything on the existing certificate is replaced by the new batch file with the same certificate number.

 

XML

The format used for batch files is XML (Extensible Markup Language). The XML codes or tags are always in pairs and enclose the relevant data. They can be in any order within a header section, product item section or process section, but it is preferable that they follow the order in the XML Data Type Definitions. For full details, see the appropriate Data Type Definitions. Because of the encoding on these pages, you may need to view the source of these pages (right-click in the page and click View Source in Internet Explorer) to see the contents.

XML batch files (can be saved as text files or XML files) can be submitted online using the XML Batch File or XML Submit submission form.

XML batch files can also be transferred between computer systems via SOAP. For full details and for variations for SOAP see the appropriate Data Type Definitions and the AP E-Cert Submission using SOAP - Technical User Guide.

Most of the tags required for the submission are present in the Data View but the following tags need to be added:

Start and end tags (on-line submission only), ie <batch_request> and </batch_request>

Submission type start and end tags, eg <raise_eligibility_document> and </raise_eligibility_document>

See the tables and examples below for where these need to be added. For further examples of XML batch files, see Batch File Examples.

Batch File Format

The following tables show all available tags that can be used in XML batch files. The tags shown on aqua background are mandatory. Others may not be mandatory as far as E-cert is concerned but are required by OMAR or other specification. Optional tags can be left out of the batch file if you don't need to put anything in those fields on the certificate. Some tags are not currently used.

The rules for exactly what should be entered in each field are specified in one of the following:
Raising an Eligibility Document - Interactive Browser Entry Form

Raising an Export Certificate - Interactive Browser Entry Form

Raising an ED or Export Certificate - Products and Processes
.

 

There are four main tables of tags:

Eligibility Document Header Tags

Export Certificate Header Tags

Product Tags

Process Tags.

Product and process tags are nearly all common to both EDs and export certificates (exceptions are noted).

An online XML batch file consists of:

Start tag

<batch_request>

This is the required start tag for all on-line batch submissions.

The SOAP requirements are slightly different, and are covered in the AP E-Cert Submission using SOAP - Technical User Guide.

Submission type start tag

A tag indicating the submission type:

<raise_eligibility_document> or <raise_export_certificate> or

<amend_eligibility_document> or <amend_export_certificate> or

<cancel_eligibility_document> or <cancel_export_certificate> or

<exhaust_eligibility_document> or

<exhaust_eligibility_document_products> or

Certificate type start tag

<EligibilityDocument> for an eligibility document or <Certificate> for an export certificate

Header tags

a set of tags defining Elements, Sub-elements and Attributes

Product tags

a set of tags at the Product level defining Elements, Sub-elements and Attributes

Process tags

a set of tags at the Process level for each product item defining Elements, Sub-elements and Attributes

Export Certificate Approval tags (export certificates only)
a set of tags at the Approval level, to define any optional decalaration clauses

Certificate type end tag

</EligibilityDocument> for an eligibility document or </Certificate> for an export certificate

Submission type end tag

An end tag to match the submission type start tag:

</raise_eligibility_document> or </raise_export_certificate> or

</amend_eligibility_document> or </amend_export_certificate> or

</cancel_eligibility_document> or </cancel_export_certificate> or

</exhaust_eligibility_document> or

</exhaust_eligibility_document_products> or

End tag

</batch_request>

This is the required end tag for all on-line batch submissions.

The order and format of Elements, Sub-elements, and Attributes are defined in the relevant Data Type Definitions nzfsa-edsub for Eligibility Documents and nzfsa-ecsub for Export Certificates.

Some tags include code= statements (the "" marks around the entry following = in the examples below are required) as well as a description. For some of these either the code or the description is optional, for others one or other or both are required.

XML element, sub-element and attribute names are case-sensitive eg the start of the Product level section must be identified by the <Product> tag. A file with a <product> tag (lower case p) will return an error. For details, see the appropriate Data Type Definitions.

A batch file submitted via SOAP can contain only one request, ie one Eligibility Document submission OR one ED exhaustion request, OR one ED product exhaustion request OR one Export Certificate submission.

A batch file submitted on-line, via the XML Batch submission form, may contain more than one ED request or more than one Export Certificate request but ED and Export Certificate submissions cannot be mixed in a single batch file.

Links in the description column are to a fuller explanation of the required entry for each database field. The rows in each table are in the same order as the fields on the interactive browser entry form but need not be in this order in the batch file.  The XML tag order is specified in the appropriate Data Type Definitions.

Because internet pages wrap information onto the next line if there is not enough space on the screen to display it, some of the examples shown in the following tables may appear to be on more than one line but in a batch file they must be on a single line. You might find the tables easier to read if you open the Print Friendly version then change the browser page layout to landscape and print this page.

 

Eligibility Document Header Tags

A = Alphabetic, N = Numeric, AN = Alpha-Numeric, Date = Date field, Y/N = Yes/no flag
Numbers in brackets denote field length, eg AN(8) is up to 8 characters long; unl = unlimited.

The order within Header sections is defined in the relevant Data Type Definition.

Description

Type

Contents

Notes

XML tags

Notes for tags

Start

 

 

 

<batch_request>

…………………

all other tags for the batch file

…………………

</batch_request>

There is a matching tag at the end of the batch file. Within this tag are all certificate data.

Submission and Certificate type

     

<raise_eligibility_document>

<EligibilityDocument>

…………………

all other tags for the certificate

…………………

</EligibilityDocument>

</raise_eligibility_document>

There are matching end tags at the end of the submission data.

The submission tags change depending on action required (raise, amend etc)

Auto-approval

Y/N

Y or N

Eligibility Declarations only.

<Form code = "AA"/>

Remove this completely for EDs or if the EDec is not to be Auto-Approved.

Certificate number

N (6)

 

Unique serial number within the calendar year used as last component in shoulder number.

<EligibilityDocument number = "123456">

OR <EligibilityDocument number = "NZL2009/ME600/123456T">.

Use full shoulder number when using the amend or resubmit methods.

Consignor

AN (10)

Identifier

Must be a valid premises or Exporter ID

<Consignor identifier = "ME600"/>

 

Consignee

AN (10)

Identifier

Must be a valid premises or Exporter ID

<Consignee identifier = "S600"/>

 

Transport mode

N (1)

1 = Maritime 
2 = Rail 
3 = Road 
4 = Air

Required on all EDs other than internal transfers where the consignor and consignee are the same ID. EDs to exporters must choose either 1 or 4.
Air may be used for road consignments sent directly to an airport coldstore intended for airfreight shipment.

<Transport>

<Mode code = "3"/>
<ConveyanceRef></ConveyanceRef>
<Carrier>
<Name>HRTL1</Name>  

</Carrier>
</Transport>

 

<Transport>

<Mode code = "4"/>
<ConveyanceRef>NZ02</ConveyanceRef>
<Carrier>
<Name>Air NZ</Name>
</Carrier>
</Transport>

The transport tags must all appear as a block.

The mode description (eg Road or Air) is optional.

Carrier name

AN (254)

The full name or listed ID of the transport company or "Operator Vehicle"

Required for edible meat and seafood products, optional for others.  
Transfers to exporters may additionally have the vessel or airline name.

Conveyance ref

AN (254)

Transport reference

Vessel voyage number or flight number for transfers to exporters.

Loading port

AN (254)

A (5)

Air or seaport name or code

Either a five letter code or the name of the port of loading (UNLOCODE)

<LoadingPort code = "NZLYT"/>

If a valid NZ port code (NZLYT) is entered, it will overwrite whatever is typed as a description (Lyttelton).

Final destination

AN (254)

A (5)

Country or code

May also include the city of destination. May enter a five letter code (UNLOCODE)

<FinalDestination>Japan</FinalDestination>

5 letter code will convert to city, country format on submission.

Departure date

Date

yyyy-mm-dd

Date of departure from the consigning or final premises.

<Departure>

<Date>2002-06-02</Date>
</Departure>

 

3rd party access

AN (254)

One or more valid IDs, separated by comma.

Read-only access to the certificate is granted to all users who can read certificates for the IDs specified.

<ThirdParty identifier = "ME600"/>
<ThirdParty identifier = "S600"/>

Multiple TP premises must be entered as separate ThirdParty elements.

Unofficial Commercial Information

AN (2000)

 

Any commercial data that the consignor or exporter needs to specify. NZFSA will not verify this data but will not approve EDs with information known to be untrue. 

<Comment language = "en">
Contract number L90332
</Comment>

Only one Comment element is permitted per ED.

Multiple lines can be displayed by including a carriage return or a \n for each line feed.

 

 

Export Certificate Header Tags

A = Alphabetic, N = Numeric, AN = Alpha-Numeric, Date = Date field, Y/N = Yes/no flag
Numbers in brackets denote field length, eg AN(8) is up to 8 characters long; unl = unlimited.

The use of optional data elements described below for Export Certificate Submission will depend on the Market Access requirement that is defined on the Certificate Template. When defining the Template NZFSA has the opportunity to define when data items are not required, remain optional, or become mandatory. Within E-cert itself it is possible to view the XML data requirements of a Template by selecting the data view from within the Available Templates page. The order within the Header section is defined in the relevant Data Type Definitions.

Description

Type

Contents

Notes

XML tags

Notes for tags

Start of header 

     

<batch_request>

…………………

all other tags for the batch file

…………………

</batch_request>

There is a matching tag at the end of the batch file.

Submission and certificate type

     

<raise_export_certificate>
<Certificate>
...................

all other tags for the certificate
...................
</Certificate>

</raise_export_certificate>

There are matching end tags at the end of the submission.

The submission tags change depending on action required (raise, amend etc)

Form code

AN (254)

Template number

Refers to the template used in the submission

<Form code=”AP120”/>

Requires valid template.

Certificate number

N (6)

 

Unique serial number within the calendar year used as last component in shoulder number.

<Certificate number = "123456">

Use full shoulder number when using the amend or resubmit methods.

Consignor

AN (10)

Exporter ID

Must be a valid registered exporter ID.

<Consignor identifier = "ELN6000"/>

 

Importer ID

AN (254)

ID of the overseas importer of the consignment

Enter only if specifically required by OMAR.

<Consignee identifier = "XYZ123"/>

 

Importer Name

AN (254)

Name of the overseas importer of the consignment

For most export certificates either the name OR address is required. Some OMARs may require both.

<Consignee identifier = "XYZ123">
<Name>Acme Importers</Name>
<Address>126 Queen St

Manchester

UK
</Address>

<Representative>Acme Importers Agents Ltd
</Representative>
</Consignee>

Multiple <Address> tags are not permitted.
Multiple lines can be displayed by including a carriage return in the file. \n does not work in this field.

Leave the <Representative> & </Representative> tags out if not required.

Importer Address

AN (254)

Overseas address of consignee.

For most export certificates either the name OR address is required. Some OMARs may require both.

Importer Representative

AN (254)

Name of agent of the Importer if relevant

May be required by OMAR.

Importing Country

A (2)

Two-letter Country code of export country.

This determines which declarations the system will expect to be in the batch file.

<ImportingCountry>
Country code = "JP"/>

Japan

EU commodity code

 AN

 

Commodity code declarations are mandatory on EU certificates

EU commodity codes are specified as declarations.

<Subtitle code="4.A-1"/>

The EU Commodity Code is specified as a Certificate. Subtitle Sub-element and not as a declaration.

Official Information

AN (2000)

 

Additional declarations authorised by NZFSA. 

<OfficialInformation
language = "en">
Replacement of certificate no nnnn dated xx-yy-zz which is lost.
</OfficialInformation>

The attribute language = "en" is required. Multiple lines can be displayed by including a carriage return or a \n for each line feed.

Transport mode

N (1)

1 = Maritime
4 = Air

Transport mode is a required entry on all export certificates. Road and rail are not permitted on export certificates.

<Transport>

<Mode code = "1"/>
<ConveyanceRef>
</ConveyanceRef>
<Carrier>
<Name>Palliser Bay</Name>
</Carrier>
</Transport>

The transport tags must all appear as a block. The description (eg Maritime) is optional.

Carrier name

AN (254)

The vessel name or airline

Name of the vessel, airline or courier.

Conveyance ref

AN (254)

Transport ref (eg voyage or flight no.)

Voyage or flight number.

Loading port

AN (5)

Valid five-letter port code

Any valid NZ port code.

2-letter country code followed by 3-letter port code.

<LoadingPort code = "NZLYT"/>

The description is optional. If a valid port code is entered, it will overwrite whatever is entered as a description.

Port of inspection

AN (5)

Valid five-letter port code

List of country and city codes

City code of port of inspection and release. These may be displayed on E-cert with additional state or country information.

2-letter country code followed by 3-letter city code.

<InspectionPort code = "DEFRA"/>

The description is optional. If a valid port code is entered, it will overwrite whatever is entered as a description.

Discharge port

AN (5)

Valid five-letter port code

List of country and city codes

City code of discharge port. If there is no discharge port code the system will put in this field the same code as the port of inspection.

2-letter country code followed by 3-letter city code.

<DischargePort code = "DEHAM"/>

The description is optional. If a valid port code is entered, it will overwrite whatever is typed as a description.

Final destination

AN (254)

AN (5)

Country required.

City optional depending upon OMAR requirements. Or 2-letter country code followed by 3-letter city code.

<FinalDestination>Los Angeles, United States
</FinalDestination>

5 letter code will convert to city, country format on submission.

Departure date

Date

yyyy-mm-dd

Date of departure from New Zealand port of export.

<Departure>
<Date>2007-06-02</Date>
</Departure>

 

3rd party access

AN (254)

One or more valid IDs, separated by commas.

Read-only access to the current certificate is granted to all users who can see certificates for the IDs specified here.

<ThirdParty identifier = "ME600"/>
<ThirdParty identifier = "S600"/>

Multiple Third Party premises need to be entered as separate ThirdParty tags.
A comma separated list in the identifier field will give an error.

Unofficial commercial information

AN (2000)

Any commercial information that the exporter wishes to specify.

NZFSA will not verify this data but cannot approve a certificate with known false information in this field.

This field is seen by overseas authorities on the printed certificate but not on E-cert.

<Comment language = "en">
Order number C43434 </Comment>

Only one Certificate Comment element is permitted in any one file.

Multiple lines can be displayed by including a carriage return or a \n for each line feed.

 

Product Tags

Product tags follow the header tags. Product and process tags are nearly all common to both EDs and export certificates (exceptions are noted).

A = Alphabetic, N = Numeric, AN = Alpha-Numeric, Date = Date field, Y/N = Yes/no flag
Numbers in brackets denote field length, eg AN(8) is up to 8 characters long; unl = unlimited.

Description

Type

Contents

Notes

XML tags

Notes for XML

Start of product item

 

 

Must precede each set of product item fields in the batch file

<Product item = "1">
................
all other tags for the product item
...............
</Product>

All data for any one product is between the start and end Product tags.

Declarations

AN (254)

One or more two-letter declaration category codes separated by commas or single spaces

ED only

Each product item shall have at least one declaration category but there must be enough to support onward certification.

Requirements for export certificate declarations are detailed in Specifying Export Declarations


<Classification>
<Class code="CH"/>
<Type code="DC"/>
</Classification>


Each DC code is specified separately, as Classification Types.

CH=Chilled

DC=Declaration Category

Product description

AN (254)

 

 

<Description language="en">Boneless lamb legs\nGigot d'Agneau Desosse</Description>

Multiple lines can be displayed by including a carriage return or a \n for each line feed.

Classification Data

AN (254)

Various

Export only

See individual certificate templates for details of requirements

Some fields must have the information exactly as shown on tables of data associated with the field in the online data entry form, including upper or lower case letters as specified.

Each classification item requires a separate code.

<Classification>
<Class code="Canadian Product  Code">020410508101</Class>
<Type code="CL"/>
</Classification>

 

Species

AN (254)

Species name

 

<Species language="en">
Bovine</Species>

<Species language="en">
Ovine &amp; Bovine
</Species>

You cannot use & in XML files, an alternative entity is &amp; see Special Characters

Countries

AN (254)

List of two-letter country-codes

separated by commas

ED only
Each product may have a different set of countries.

Transfers to exporters should only have the country of final destination (ZE for EU is not acceptable).

 

<Classification>
 <Class code="JP"/>
<Type code="CC"/>
 </Classification>
<Classification>
 <Class code="AU"/>
<Type code="CC"/>
 </Classification>

ED only

Each Product Country code is specified separately, as a Country Code Classification Type.

NZHS Codes

AN (6)

Valid entry from list.

ED only

This HS code is for "Meat”; of bovine animals, boneless cuts, fresh or chilled".

 <Classification>

<Class code="020130"/>

<Type code="NZHSC"/>

</Classification>

HS codes are another type of classification data in XML files.

Container no

AN (254)

 

Seafreight or airfreight container number.

<Container
number="TRLU123456"
seal="NZFSA12345678">
</Container>

Container number and seal number are both entered within the Container tag.

Leave out the seal= sub-element if it is not needed.

Multiple numbers can be entered separated by commas.

Seal no

AN (254)

 

NZFSA or, for EDs only, verifiable non-official seals explicitly required by specifications.

Item marks or brands

AN (254)

Format mandated by OMAR for some countries.

 

<Marks>M123</Marks>
<Marks>12345</Marks>

To display on multiple lines use \n or repeat the Marks element.

Number of packages

N

 

 

<Package count = "50">
<Type code = "CT"/>
</Package>

<Package count = "50">
<Type code = "CT"/>
</Package>

Number and type of packages are both entered within the Package tag.

If a valid package type code is entered, it will overwrite whatever is entered as a description

Package type

A (2)

Two letter package type code

Total (gross) weight

N

 

 

<Weight value = "3500.00">
<Type code = "AAB"/>
<Unit code = "KGM"/>
</Weight>

Gross weight and Gross Weight Unit are both entered within one instance of the Weight tag.
AAB identifies that this is Gross Weight.

If a weight unit code is used it will override any content in the description.
A separate instance of the tag is required to record Net Weight.

Net weight

N

 

 

<Weight value = "180.25">
<Type code = "AAA"/>
<Unit code = “KGM"/>
</Weight>

Net weight and Net Weight Unit are both entered within one instance of the Weight tag.
AAA identifies that this is Net Weight.
A separate instance of the tag is required to record Gross Weight.

Weight unit

A (3)

Three-letter weight unit code

 

See Gross Weight and Net Weight above.

 

This product was sourced from

AN (unl)

Source ED and product tracking information. 

This is required if the product has any incoming EDs supporting outward certification.

Format is: shoulder-no, product-no/ no-of-destination-units

There may be multiple product-no/ no-of-destination-units entries per source ED, separated by commas as in the second example.

<Document  number="NZL2001/ME1/4567T" item="2" outQuantity="50">
</Document>
<Document  number="NZL2001/ME1/4567T" item="3" outQuantity="40">
</Document>

A separate set of Document tags is required for each source product reference. This includes the situation where there are multiple products from a single source ED.

outQuantity is the number of outgoing packages that are attributable to the named source ED product item. 

Source EDs that are not on E-cert shall have 'P' in front of the shoulder number.

Comments

AN (4000)

Various

EDs - verifiable product item related data and transfer control declarations.

Export certificates - only comments authorised by NZFSA shall be entered.

See Transfer control declarations for information about those on EDs.

See Shellfish for entry of harvest information.

<Comment>Subject to moist heat at 120 C for 15 minutes.\n Packed into clean containers.</Comment>

Multiple lines can be displayed by including a carriage return or a \n for each line feed.

 

Process Tags

Product and process tags are nearly all common to both EDs and export certificates (exceptions are noted).

A = Alphabetic, N = Numeric, AN = Alpha-Numeric, Date = Date field, Y/N = Yes/no flag
Numbers in brackets denote field length, eg AN(8) is up to 8 characters long; unl = unlimited.

There is one set of process tags for each process and, for EDs, at least one set for each set of product item tags.

See Process Information for an overview of processes.

Description

Type

Contents

Notes

XML tags

Notes for XML

Start of process

 

 

 

<Processing>
............

all other process tags
............
</Processing>

Each set of data is contained within the start and end Processing tags.

Process type

A (3)

Three-letter process type code

For an ED there shall be at least one process added for the consignor. The source certificate processes are automatically carried forward and shall not be repeated unless using the date override facility - see below. 

If the source certificate is not on E-cert, at least one process shall be added for each premises that handled the product and there shall be enough processes to support onward certification.

The Transfer (TRA) process type is used by E-cert for Exporter to Exporter transfers

To see what processes are required for specific export certificates see Available Templates.

<Processing>
<Type code = "SLT"/>
..............
</Processing>

The description (eg Slaughter) is optional. The code will override any content in the description.

Start of processing

Date

yyyy-mm-dd

Start date of process.

Required if the process is slaughter or Expiry Date.

Dates for other processes may be required by OMAR.

<Processing>
<Type code = "SLT"/>
<StartDate>1998-01-10</StartDate>
..............
</Processing>

 

End of processing 

Date

yyyy-mm-dd

End date of process.

Required if the process is slaughter or Expiry Date.

Dates for other processes may be required by OMAR.

<Processing>
<Type code = "SLT"/>
<StartDate>1998-01-10</StartDate>
<EndDate>1998-01-13</EndDate>
..............
</Processing>

 

Applied by

AN(10)

Licence ID

Required if the process was applied by a premises other than the consignor.

<Processing>
<Type code = "SLT"/>
<StartDate>1998-01-10</StartDate>
<EndDate>1998-01-13</EndDate>
<Premises identifier = "ME600"/>
</Processing>

 

Date override

Y/N

Yes or leave blank

Can only be used if there is the same process for the same premises on a source ED. Dates must fall on or between the equivalent source ED dates.

<Processing dateOverride="YES">
<Type code = "SLT"/>
<StartDate>1998-01-10</StartDate>
<EndDate>1998-01-13</EndDate>
<Premises identifier = "ME600"/>
</Processing>

The dateOverride attribute can either be omitted, or set to "NO", if Process Override is not to be applied.

 

Special Characters

XML restricts the use of the following special characters; in order to use them in the batch file equivalent entities have to be used.

Character

Entity

Character

Entity

Less than symbol (<)

&lt;

Apostrophe symbol (‘)

&apos;

Greater than symbol (>)

&gt;

Ampersand symbol (&)

&amp;

Quote symbol (“)

&quot;

   

Specifying Export Declarations

In the batch file you must indicate the reference number of the correct export certificate template for the type of product to the country of destination, including the letter prefix. 

It is extremely important you enter the correct certificate number as E-cert has no way of knowing if you have got it right.

 

From this reference number E-cert determines which declarations it requires to make up the final certificate. 

Export certificate templates have version numbers and statuses. Only one certificate template version is current at any one time on the live site but there may be more than one available on the Training site depending upon the template status. 

The version number cannot be specified in batch files submitted to the live site as the system will only allow you to raise an export certificate from the current version. On the Training site, the template with the highest version number will be used unless you specify an earlier available version. The <Form code=”AP1125.2”/> will determine the template version number used but you are advised to put the version in each declaration. For the format, see Example 3 below.

All export certificates have at least one declaration on them. Some declarations are mandatory, some are optional and some require user-defined values to be entered. Mandatory declarations for the certificate don't need to be specified in the batch file unless they have user-defined values but optional ones you want included must be. If you don't wish to include any of the optional declarations, the minimum entry is a declaration code for the certificate template number. 

A batch file can have multiple declarations for each certificate. Each declaration shall be specified on a separate single line. You can use \n, if necessary, to display the information over more than one line when viewed on the E-cert site.

Example 1

<Approval form = "AP1676">

<Declaration code = "AP1676/9">

<Insert order="1">131</Insert>

<Insert order="2">15</Insert>
</Declaration>
</Approval>

Selects declaration 9 from template AP1676 (AP1676/9) and declares 2 user input fields.

Example 2

<Approval form = "AP120">

</Approval>

Will declare all mandatory attestations for template AP120

Example 3

Submission to Training site

<Approval form = "AP1125.2">

<Declaration code = "AP1125.2/4"/>
<Declaration code = "AP1125.2/6"/>
</Approval>

Selects declaration 4 and 6 from template AP1125 version 2.

 

See Batch File Examples for more examples.

If you intend to use batch files to generate Export Certificates you must at all times be aware of any changes made to the declarations. New certificates for a country should always be notified by OMAR but new versions of the certificate may not. The declaration number may change from one version of the certificate template to the next, sometimes without notification.

The currently available templates with associated declarations are on one of these pages, for which you will need an E-cert password: 

Training site https://ectrain.maf.govt.nz/cgi-ectrain/ecdr/FilterByCountry

Live site https://sancrt.maf.govt.nz/cgi-eclive/ecdr/FilterByCountry

 

Downloading Certificate Declarations into Operator or Exporter Databases

If you need to import a current export declaration file into your database system, download the following CSV file and import them into your system from there.

https://sancrt.maf.govt.nz/eclive/lookup/ap.csv

The file is updated overnight and contains all declarations for current approved templates. The text of the declarations is not needed for batch files but it is there to help make sure you specify the correct clauses and operator entries for the particular certificate.

 

Exhausting EDs via Batch File

You can exhaust a single product item, multiple product items, whole EDs or multiple EDs with a single batch file. This is a very efficient way of exhausting EDs from which the product has been fully used up. 

Note: Exhaustion of EDs used to support an export certificate or a paper ED is mandatory. 
It is the responsibility of the authorised person signing the paper export certificate or approving the electronic export certificate to exhaust the supporting electronic ED.

A = Alphabetic, N = Numeric, AN = Alpha-Numeric, Date = Date field, Y/N = Yes/no flag
Numbers in brackets denote field length, eg AN(8) is up to 8 characters long; unl = unlimited.

To exhaust whole EDs or multiple EDs:

Description

Type

Contents

XML tags

Notes

Start

 

 

<batch_request>

 

Exhaust ED

AN

The full shoulder number of an approved ED.

<exhaust_eligibility_documents>
<shoulder_number>NZL2002/ME600/2345T</shoulder_number>
</exhaust_eligibility_documents>

The shoulder number and the tags for it must be on the same line in the batch file.

To exhaust multiple EDs, repeat the whole group of tags for each additional shoulder number.

End of batch

 

 

</batch_request>

 

 

To exhaust single or multiple product items within an ED:

Description

Type

Contents

XML tags

Notes

Start

 

 

<batch_request>

 

Exhaust product item

N

The product item number to be exhausted.

<exhaust_eligibility_document_products>
<shoulder_number>NZL2002/ME600/2345T</shoulder_number>
<product_number>3</product_number>
</exhaust_eligibility_document_products>

<exhaust_eligibility_document_products>
<shoulder_number>NZL2002/ME600/2345T</shoulder_number>
<product_number>4</product_number>
</exhaust_eligibility_document_products>

The shoulder number and the tags for it must be on the same line in the batch file. Also, the product item number and its tags must be on the same line.

To exhaust multiple products on an ED, repeat the whole element group for each additional product number, as shown.

End of batch

 

 

</batch_request>

 

See Batch File Examples for more examples.

Batch File Submission

Batch files can be submitted by SOAP or on-line using the XML Batch File or XML Submit forms.


XML Batch file via Browser

 

Anyone with Consignor permissions can submit a batch file using the E-cert Submit Certificate XML Batch File form.

1. Click the 'XML Batch File' link on the navigation pane on the home page.

2. Type the batch file name and path in the XML Batch File box or select the batch file from your computer using the Browse button. You can only submit one XML batch file at a time this way.

3. Click Submit XML Batch File

4. The XML Batch Status page appears and shows you the current status of XML batch files you have submitted. Ones that have been accepted by E-cert show with a in the Status column. Ones that have errors and have not been accepted show with an and the details of the error. There is a short delay before XML files are processed. Ones that are yet to be processed show as Ready.

5. These files stay on the list until you delete them. To delete individual files tick the box on the left then click the Delete Selected button. To delete all files of a particular status, tick the box next to or at the bottom of the list where it shows Select Batch Requests then click the Delete Selected button.

See Batch File Frequently Asked Questions for some more help.

XML Submit via Browser

Anyone with Consignor permissions can submit a batch file using the E-cert XML Submit form. This submission option should be used for files that contain less that 5 certificate requests. This file will be processed real-time, for bigger files use the XML Batch file option described above.

1. Click the 'XML Submit' link on the navigation pane on the home page.

2. Type the batch file name and path in the XML File box or select the batch file from your computer using the Browse button. You can only submit one XML batch file at a time this way.

3. Click Submit XML File. 

All information on this website is subject to a disclaimer.
Contact for enquiries

New Zealand Food Safety Authority
68-86 Jervois Quay
PO Box 2835
Wellington
NEW ZEALAND

Phone: +64 4 894 2500
Fax: +64 4 894 2501

Contact NZFSA about this page