Documentation: Uploading Documents
[ Home | Docs | FAQ | Download | CVS | Mailing Lists | Bug Tracker | USPS's MOL Site ]
mml upload document ?-flags?
?-switches?
document_name
-only_if_not_found(Optional)This flag indicates that the document should only be uploaded if an existing document with the same
$document_namedoes not exist.
-debug filename(Optional)If specified, the XML generated and sent to the MOL system, as well as the XML reply from the MOL system, will be appended to
filename.-data data(Required Alt.)Use this switch to provide the
$datato be uploaded. This switch is mutually exclusive with-file.-file filename(Required Alt.)Use this switch to specify that the contents of
filenameare to be read & uploaded. This switch is mutually exclusive with-data.
document_nameThis is an arbitrary text string used to name the document. The MOL system requires
document_nameto be unique; however, if a duplicate is used, MOL (appears to) append a counter suffix of sorts.
If successful the
document_idassigned by the MOL system is returned. This is an opaque value used to identify the document in subsequent actions (i.e.,document details,delete document, andupload order).An error will be returned if the document upload was not succesful. Possible causes under which an error could be raised include: transient network outages, MOL processor internal errors, uploading of document-types that the MOL system does not know how to process, etc.
For a list of supported file formats, consult the USPS's MOL site.