Data Import Standards for Parcels Program
Parcels XML Data Import Specifications
Version 2.14
Table of Contents
- XML File Structure…………………………………...... 3
- File Naming Convention
- File Structure / Content / Formatting Rules
- File Categories
- Header Record……………………………………………….……………………………………………...3
- Package Record………………………………………………..………………………..…………………..4
- Item Record………………………………………………………..………………………………………....5
- Sample of XML File………………………………………………..………………………….……………..6
- ISO Country Codes…………………………………………………..………………………………………8
- Contact Information……………………………………………………..…………………………..………13
XML File Structure
1.1 File Naming Convention
- The mailer’s company name or abbreviation. Underscore between spaces and after name
- The date the file was created. A dash is to be used between year, month and day.
Format: YYYY-MM-DD ( Example: _2007-02-20_ )
- Sequence number indicating the number of files created for that day. Underscore after date and before sequence number. (Example: 3rd file created for the day _3 )
- An extension of .xml after sequence number
Syntax: Your_Company_Name_ YYYY-MM-DD_3.xml
Sample File Name: Asendia_USA_2013-02-20_1.xml
1.2File Structure / Content / Formatting Rules
- XML Categories
R = Required. This field value must appear in the file.
O = Optional. The field value may be omitted from the file. Field tag is still required.
C = Client Specific. May be required depending on the specifications per client.
- The XML tags are case sensitive and must be displayed exactly as shown. An example is <PckDescription>. The P and D should be capitalized and everything else lower case.
- Note on Numeric Optional fields: If you are not passing a value to a field, then you do not have to add the field tags to the output. If you do create the field tag and the data type is numeric then it must have a value (can not be null/nothing). In these cases you can insert a zero for the numeric value.
HEADER RECORD
No / Name / Category / Description / Type / Max Length01 / CompanyName / R / Name of company contracted to Asendia USA / String / 50
02 / AccountNumber / R / Account number assigned by Asendia USA / String / 50
03 / FileTimeStamp / R / Date & time file was created.
April 26, 2006 11:05:30 AM / String / 50
04 / TimeZone / R / The abbreviation for the time zone where the file was created / String / 4
PACKAGE RECORD
Package TableNo / Name / Category / Description / Type / Max Length
01 / PckId / R / Unique Id given to each physical package. This number should never be re-used.
- PckId’s if possible should be prefixed with an abbreviation unique to your company.
- The value in this field must match a bar coded value on the label of the package.
02 / OrderId / O / Order identifier number. (order number representing all packages within an order) / String / 20
03 / LastName / R / Recipient Last Name / String / 20
04 / FirstName / R / Recipient First name / String / 14
05 / MiddleInitial / O / Recipient Middle / String / 1
06 / BusinessName / O / Business Name. Note that this field will not display on an address label at this time. / String / 35
07 / AddressLine1 / R / First line of recipient’s street address / String / 35
08 / AddressLine2 / O / Second line of recipient’s street address if needed / String / 35
09 / AddressLine3 / O / Third line of recipient’s street address if needed / String / 35
10 / City / C / The city of the recipient’s street address. May be required for some services. / String / 35
11 / Province / C / Recipient’s state or province if it applies. * This may be required for some services / String / 35
12 / PostalCode / R / Recipient’s postal code. / String / 20
13 / CountryCode / R / The 2 char ISO country code for the recipient’s address. / String / 2
14 / Phone / R / Recipient’s phone number. / String / 25
15 / Email / O / Recipient’s email address / String / 50
16 / PckWeight / R / Weight for package if known (pounds). Default value to zero if no weight is being given. / Decimal / 00.XX
17 / PckType / R / Indicates if package is a gift, sample, or merchandise
S = sample, G = Gift, M = Merchandise, D=Documents
Default is M / String / 1
18 / ServiceType / R / “EXP” for express service,
“OSP” for oversized pck’s
“PAR” for all other pck’s
This field should be defaulted to “PAR” unless otherwise specified to customer / String / 3
19 / PckDescription / C / Summary description of pck contents.
* This may be required for specific services / String / 35
20 / ShippingCost / C / This is the shipping charge that your customer paid. *This may be required for specific services / Decimal / 00.XX
21 / DutyTaxHandling / C / Duties & Taxes paid for the package. *This may be required for specific services / Decimal / 00.XX
22 / CustomsBarCode / O / Customs Bar code value or tracking number. This normally will be the USPS CN22 or 2976A number if shipper needs this to be recorded. / String / 34
23 / RegistrationNumber / C / For some specific services and/or countries, a registration number may be required. Normally this field is not needed / String / 20
Package Table Notes:
- Field Names are case sensitive
- PckId:
- The PckId must match the barcode on the physical package.
- This is a key value and must always remain unique.
- If possible prefix your PckId with an abbreviation unique to your company
- Address fields are limited in length according to requirements by specific postal services. There may be some flexibility on this depending on the specific services that you will be using and whether Asendia USA is printing the shipping labels. Contact to discuss further if the above lengths are of issue.
ITEM RECORD
No / Name / Category / Description / Type / Max Length01 / PckId / R / Unique Id number given to each physical package. (re-ships, multi-package orders etc must all have unique ids) / String / 20
02 / ItemId / R / Product code or SKU for item
ItemId must be unique per each package / String / 20
03 / ItemDescription / R / Description of item / String / 32
04 / CustomsDescription / C / Description of the item by Customs
requirement, containing information
about the content of the item. May be required for some services. / String / 32
05 / Quantity / R / Quantity of the item(s) with the same ItemId within the same package. Cannot be zero / Integer / X
06 / UnitPrice / R / Resale value of an individual item (USD)
All items should have a value, including back-orders or gift items. / Decimal / 0.00
07 / CountryOfOrigin / R / ISO 2 char country code representing the country of manufacture of the item / String / 2
08 / HTSNumber / C / Harmonized number that is associated
with the item. If the harmonization number is known, it should be placed in
this field.
* This may be required for specific services / String / 20
Item Table Notes:
- The PckId & the ItemId make up a composite key constraint in our system. It is important that we receive only one item record per package that has the same item id.
- Quantity can not be set to zero
- Do not list item records for items not in the physical package or unneeded taxes could occur.
SAMPLE XML FILE
Sample File: This sample file contains two package records.
<?xml version="1.0" encoding="ISO-8859-1" standalone="no" ?>
AsendiausaManifest
Header
CompanyNameYour Company Name Here</CompanyName
AccountNumber123456789012345</AccountNumber
FileTimeStamp2011-03-01{T}13:12:00</FileTimeStamp
TimeZoneEST</TimeZone
</Header
Package
PckIdBW00709000019</PckId
OrderId89105221002001100217</OrderId
LastNameDoe</LastName
FirstNameJane</FirstName
MiddleInitialS</MiddleInitial
AddressLine117 Robilliard Way</AddressLine1
AddressLine2/>
AddressLine3/>
CitySebastopol</City
ProvinceBonshaw</Province
PostalCode3356</PostalCode
CountryCodeAU</CountryCode
Phone/>
Email/>
PckWeight3.58</PckWeight
PckTypeM</PckType
ServiceTypePAR</ServiceType
PckDescriptionClothing</PckDescription
ShippingCost20.21</ShippingCost
DutyTaxHandling10.83</DutyTaxHandling
CustomsBarCodeLM473124829US/CustomsBarCode
RegistrationNumber1234567890987/RegistrationNumber
Item
PckIdBW00709000019</PckId
ItemId2929840</ItemId
ItemDescriptionShirt</ItemDescription
CustomsDescriptionShirt</CustomsDescription
Quantity1</Quantity
UnitPrice10.00</UnitPrice
CountryOfOriginUS</CountryOfOrigin
HTSNumber123456789</HTSNumber
</Item
Item
PckIdBW00709000019</PckId
ItemId2929841</ItemId
ItemDescriptionPants</ItemDescription
CustomsDescriptionPants</CustomsDescription
Quantity2</Quantity
UnitPrice15.00</UnitPrice
CountryOfOriginUS</CountryOfOrigin
HTSNumber987654321</HTSNumber
</Item
</Package
Package
PckIdBW00709012345</PckId
OrderId89105221002001100217</OrderId
LastNameSmith</LastName
FirstNameJohn</FirstName
FirstNameQ</FirstName
AddressLine128A CLIFTON ST</AddressLine1
AddressLine2 Apartment 203</AddressLine2
AddressLine3 />
CityCAMPBELLTOWN</City
ProvinceSYDNEY</Province
PostalCode2560</PostalCode
CountryCodeAU</CountryCode
Phone </Phone
Email />
PckWeight1.25</PckWeight
PckTypePAR</PckType
ServiceTypePAR</ServiceType
PckDescriptionClothing</PckDescription
CustomsBarCodeLM473124829US/CustomsBarCode
RegistrationNumber65432198765423/RegistrationNumber
Item
PckId BW00709012345</PckId
ItemId123456789</ItemId
ItemDescriptionPants</ItemDescription
CustomsDescription100% cotton</CustomsDescription
Quantity1</Quantity
UnitPrice25.00</UnitPrice
CountryOfOriginUS</CountryOfOrigin
HTSNumber/>
</Item
</Package
</AsendiausaManifest
ISO COUNTRY CODES
International Organization for Standardization
The following links will display the most current ISO Country code list. The ISO 2 digit country code should be used.
XML download:
HTML:
TEXT:
ISO Country Code Overview
Contact Information
Asendia USA
Corporate Headquarters:Philadelphia, PA
701C Ashland Avenue
Folcroft, PA 19032-2011
Phone: 1.800.MAIL.287
Fax: 610.461.4239
Technical questions or comments about these specifications can be sent to:
Tom Weigel
Software Developer, Asendia USA
Email:
Work: 610-461-3661 x5352
Cell: 267-257-9677