Restrictions Property
Restrictions on items being shipped.
Syntax
uspsrates.getRestrictions([callback])
Default Value
""
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 getRestrictions([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 setRestrictions([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
For domestic shipments, this describes the restrictions for APO/FPI destination Zip Codes. This data is returned in the GetRates method call if the RecipientZipCode is an APO/FPO Zip Code.
For international shipments, this property will contain information indicating mail articles which are restricted by the destination country, Any packages sent are subject to the import requirements of that country. The contents of this property is based on information furnished by the country concerned.
You may also inquire at the Post Office facility about specific restrictions as a country may return or seize mail containing articles prohibited or restricted within that country, whether or not notice of such restriction has been provided to or published by the Postal Service.
The value of this property is filled after a call to the GetRates method.
NOTE: For rates requests using APO/FPO/DPO ZIP codes (origin or destination), any restrictions will be found in the Restrictions[i] Configuration setting, not in this property.
This property is read-only.
Data Type
String