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_name
does 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
$data
to be uploaded. This switch is mutually exclusive with-file
.-file filename
(Required Alt.)Use this switch to specify that the contents of
filename
are to be read & uploaded. This switch is mutually exclusive with-data
.
document_name
This is an arbitrary text string used to name the document. The MOL system requires
document_name
to be unique; however, if a duplicate is used, MOL (appears to) append a counter suffix of sorts.
If successful the
document_id
assigned 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.