Shipping Integrator V5 - Online Help
Shipping Integrator V5
Questions / Feedback?

PackageType Property

The packaging type of the package being rated and/or shipped.

Syntax

 fedexshipintl.getPackageType(index, [callback])
 fedexshipintl.setPackageType(index,  packageType, [callback])

Possible Values

  0 (ptNone), 
  1 (ptPostcards), 
  2 (ptLetter), 
  3 (ptLargeEnvelope), 
  4 (ptFlatRateEnvelope), 
  5 (ptFlatRateLegalEnvelope), 
  6 (ptFlatRatePaddedEnvelope), 
  7 (ptFlatRateGiftCardEnvelope), 
  8 (ptFlatRateWindowEnvelope), 
  9 (ptFlatRateCardboardEnvelope), 
  10 (ptSmallFlatRateEnvelope), 
  11 (ptPak), 
  12 (ptBox), 
  13 (pt10kgBox), 
  14 (pt25kgBox), 
  15 (ptSmallExpressBox), 
  16 (ptMediumExpressBox), 
  17 (ptLargeExpressBox), 
  18 (ptFlatRateBox), 
  19 (ptSmallFlatRateBox), 
  20 (ptMediumFlatRateBox), 
  21 (ptLargeFlatRateBox), 
  22 (ptDVDFlatRateBox), 
  23 (ptLargeVideoFlatRateBox), 
  24 (ptRegionalRateBoxA), 
  25 (ptRegionalRateBoxB), 
  26 (ptRectangular), 
  27 (ptNonRectangular), 
  28 (ptTube), 
  29 (ptMatterForTheBlind), 
  30 (ptPallet), 
  31 (ptYourPackaging), 
  32 (ptDocument), 
  33 (ptFlats), 
  34 (ptParcels), 
  35 (ptBPM), 
  36 (ptFirstClass), 
  37 (ptPriority), 
  38 (ptMachinables), 
  39 (ptIrregulars), 
  40 (ptParcelPost), 
  41 (ptBPMParcel), 
  42 (ptMediaMail), 
  43 (ptBPMFlat), 
  44 (ptStandardFlat), 
  45 (ptRegionalRateBoxC)

Default Value

0


Callback

The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).

The callback for the getPackageType([callback]) method is defined as:

function(err, data){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'data' is the value returned by the method.

The callback for the setPackageType([callback]) method is defined as:

function(err){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'err' has 2 properties which hold detailed information:

err.code
err.message

Remarks

The packaging type of the package being rated and/or shipped.

Possible values are:

Value FedEx UPS USPS USPS (Endicia) USPS (Stamps.com) Canada Post
ptNone (0) X X X
ptPostcards (1) X X X
ptLetter (2) X X X X
ptLargeEnvelope (3) X X X
ptFlatRateEnvelope (4) X X X
ptFlatRateLegalEnvelope (5) X X X
ptFlatRatePaddedEnvelope (6) X X X
ptFlatRateGiftCardEnvelope (7) X X
ptFlatRateWindowEnvelope (8) X X
ptFlatRateCardboardEnvelope (9) X
ptSmallFlatRateEnvelope (10) X X
ptPak (11) X X
ptBox (12) X X
pt10kgBox (13) X X
pt25kgBox (14) X X
ptSmallExpressBox (15) X
ptMediumExpressBox (16) X
ptLargeExpressBox (17) X
ptFlatRateBox (18) X X
ptSmallFlatRateBox (19) X X X
ptMediumFlatRateBox (20) X X X
ptLargeFlatRateBox (21) X X X
ptDVDFlatRateBox (22) X
ptLargeVideoFlatRateBox (23) X
ptRegionalRateBoxA (24) X X X
ptRegionalRateBoxB (25) X X X
ptRectangular (26) X
ptNonRectangular (27) X
ptTube (28) X X X
ptMatterForTheBlind (29) X
ptPallet (30) X
ptYourPackaging (31) X X X X X X
ptDocument (32) X
ptFlats (33) X
ptParcels (34) X
ptBPM (35) X
ptFirstClass (36) X
ptPriority (37) X
ptMachinables (38) X
ptIrregulars (39) X
ptParcelPost (40) X
ptBPMParcel (41) X
ptMediaMail (42) X
ptBPMFlat (43) X
ptStandardFlat (44) X
ptRegionalRateBoxC (45) X X X

If this is set to a value that is not applicable to a certain provider, it will automatically be set to ptNone (0), except for with FedEx, in which case it will default to ptLetter (2).

For FedEx, this is required in a ship request when either the GetPackageLabel or GetShipmentLabels method is called. FedEx only supports one packaging type for the whole shipment, so only the PackagePackagingType for the first package is used in label requests.

If the PackagePackagingType is set to 31 (Your Packaging), then the dimensions of the package should be provided in the request by setting the following: PackageLength, PackageWidth, and PackageHeight.

If the ServiceType is set to any of the FedEx Ground services (Ground or Ground Home Delivery), then the PackagePackagingType will be automatically set to 31 (Your Packaging).

Please note that the types pt10kgBox (13) and pt25kgBox (14) are only meant for international shipments and domestic shipments outside of the United States.

For UPS, please note that when selecting PackagePackagingType make sure this is valid for all the following: SenderCountryCode, RecipientCountryCode, ServiceType, and all special services requested at both shipment and package level.

Also the following restrictions apply when using UPS Mail Innovations:

ServiceType PackagePackagingType PackageWeight
stFirstClass (35) ptFirstClass (36) 1 to 13 OZS
stPriorityMail (36) ptPriority (37) 1 to 70 LBS
stExpeditedMailInnovations (37) ptMachinables (38) 6 to <16 OZS
stExpeditedMailInnovations (37) ptIrregulars (39) 1 to <16 OZS
stExpeditedMailInnovations (37) ptParcelPost (40) 1 to 70 LBS
stExpeditedMailInnovations (37) ptBPMParcel (41) 1 to 15 LBS
stExpeditedMailInnovations (37) ptMediaMail (42) 1 to 70 LBS
stExpeditedMailInnovations (37) ptBPMFlat (43) 1 to 15 LBS
stExpeditedMailInnovations (37) ptStandardFlat (44) 1 to <16 OZS
stPriorityMailInnovations (38) ptFlats (33) 1 to 70 LBS
stPriorityMailInnovations (38) ptParcels (34) 1 to 70 LBS
stPriorityMailInnovations (38) ptBPM (35) 1 to 70 LBS
stEconomyMailInnovations (39) ptFlats (33) 1 to 70 LBS
stEconomyMailInnovations (39) ptParcels (34) 1 to 70 LBS
stEconomyMailInnovations (39) ptBPM (35) 1 to 70 LBS

For USPS, this is used for getting rates and Endicia labels. For international shipments, the only valid values are: ptRectangular and ptNonRectangular.

For Canada Post, ptLetter (2) is only applicable if theContractId is set.

The size of the array is controlled by the PackageCount property.

This property is not available at design time.

Data Type

Integer

 
 
Copyright (c) 2017 /n software inc. - All rights reserved.
Build 5.0.6240.0