ShipmentSpecialServices Property
Contains the collection of special services offered by USPS on shipment level.
Syntax
uspsrates.getShipmentSpecialServices([callback]) uspsrates.setShipmentSpecialServices( shipmentSpecialServices, [callback])
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 getShipmentSpecialServices([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 setShipmentSpecialServices([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
To request any of the special services offered by USPS, you must set the ShipmentSpecialServices to a set of flags as listed below (specified in hexadecimal notation). They can be or-ed together to include multiple conditions:
Value | Meaning |
0x0000000000000004L | COD |
0x0000000000008000L | Hold For Pickup |
0x0000000008000000L | Return Shipment |
0x0000000080000000L | Restricted Delivery |
0x0000000100000000L | Return Receipt |
0x0000000200000000L | Certificate Of Mailing |
0x0000000400000000L | Sunday and Holiday Delivery |
0x0000000800000000L | No Weekend |
0x0000001000000000L | Registered Mail |
0x0000002000000000L | Premium Service (Sunday/Holiday) |
0x0000004000000000L | Commercial |
0x0000008000000000L | Delivery Confirmation |
Data Type
Long64