DOCUMENTS

Add

Submit a document, a bundle of copies, or a mailing list. Review the returned details, then call Confirm to release the submission for processing.

Class: documents

Method: add

POST/documents/add

Single documents

Parameters

  • client_id*
  • akey*
  • document_file* - File sent as a multipart upload
  • document_type* - set this to a value of "single"
  • print_type* - Print format; Use one of the following values:
    • black_white - print using Black & White
    • black_white_duplex - print using Black & White Duplex
    • color - print using Color
    • color_duplex - print using Color Duplex
  • document_address_type* - Use one of the following values:
    • address_provided_separately - Select this value to include a cover page and supply the address in the fields below
    • address_included_in_file - The document already contains the mailing address
  • mail_to - Recipient name
  • address - Mailing address
  • address2 - Second address line, if required
  • city - Mailing city
  • state - Mailing state
  • zip - Mailing ZIP or postal code
  • country - Mailing country
  • trans_id - an optional custom client transaction ID stored for record keeping
  • document_return_address_option* - Use one of the following values:
    • smartpayables - Select this value to use our address in the event of a return
    • custom - Provide a return address in the field below, separating lines with the | character
  • document_return_address* - custom return address to be used with new lines indicated by the | character (eg. company name|address|city, state, zip|country)
  • envelope_type_id - this field is used to specify an envelope type ID, which will be issued to you by our setup and support team if you have custom envelope types setup with us. You can also retrieve a list of usable IDs for your account from the Documents -> Get Envelope Types method
  • postage_code (one of the following numeric values)
    • 1 - USPS First Class (Default if not specified)
    • 2 - USPS Priority
    • 3 - USPS Priority + Delivery Confirmation
    • 4 - USPS Priority + Signature Confirmation
    • 5 - FedEx Express 2 Day
    • 6 - FedEx Express Overnight
    • 8 - USPS Overnight
    • 9 - USPS Certified Mail
    • 10 - FedEx Priority Overnight
  • sub_account_id - Existing sub account ID to associate with the document
  • include_no9_envelope - Select whether to include a No. 9 return envelope, with or without postage:
    • include - this value indicates to include the envelope without postage
    • include_postage - this value indicates to include the envelope with postage

JSON response

JSONResponse example
{
  "document": {
    "id": "120585",
    "confirmed": false,
    "document_type": "single",
    "document_address_type": "address_included_in_file",
    "print_type": "black_white",
    "mail_to": "",
    "address": "",
    "address2": "",
    "city": "",
    "state": "",
    "zip": "",
    "country": "",
    "trans_id": "PAY-2026-001042",
    "address_position_type": "single_top_left",
    "document_return_address_option": "custom",
    "document_return_address": "Northstar Supply Co.|1800 Meridian Avenue|Suite 200|Denver, CO 80202",
    "status": {
      "id": "1",
      "name": "Pending Release"
    }
  }
}

XML response

XMLResponse example
<wmc-response status="1">
	<documents>
		<document id='120584'>
			<id>120584</id>
			<confirmed>0</confirmed>
			<document_type>single</document_type>
			<document_address_type>address_included_in_file</document_address_type>
			<print_type>black_white</print_type>
			<mail_to></mail_to>
			<address></address>
			<address2></address2>
			<city></city>
			<state></state>
			<zip></zip>
			<country></country>
			<trans_id>PAY-2026-001042</trans_id>
			<address_position_type>single_top_left</address_position_type>
			<document_return_address_option>custom</document_return_address_option>
			<document_return_address>Northstar Supply Co.|1800 Meridian Avenue|Suite 200|Denver, CO 80202</document_return_address>
			<status_id>1</status_id>
		</document>
	</documents>
</wmc-response>

Document bundles

Parameters

  • client_id*
  • akey*
  • document_file* - File sent as a multipart upload
  • document_type* - set this to a value of "bundle"
  • print_type* - Print format; Use one of the following values:
    • black_white - print using Black & White
    • black_white_duplex - print using Black & White Duplex
    • color - print using Color
    • color_duplex - print using Color Duplex
  • bundle_mail_to* - Recipient name
  • bundle_address* - Mailing address
  • bundle_address2 - Second address line, if required
  • bundle_city* - Mailing city
  • bundle_state* - Mailing state
  • bundle_zip* - Mailing ZIP or postal code
  • bundle_country* - Mailing country
  • bundle_postage_type  - Use one of the following values when required
    • usps_priority - send via USPS Priority, this is the default postage type if no postage type is provided
    • usps_priority_sig - send via USPS Priority (signature required)
    • usps_overnight - send via USPS Overnight (express)
    • fedex_2day - send via FedEx Express 2 Day
    • fedex_overnight - send via FedEx Express Overnight
    • fedex_priority_overnight - send via FedEx Priority Overnight
  • bundle_custom_account_number  - Your FedEx account number, when using your own shipping account
  • bundle_custom_alert_email  - if opting to use your own FedEx account number, you may also send an alert email address in this field
  • bundle_count* - number of copies to print and send
  • trans_id - an optional custom client transaction ID stored for record keeping
  • sub_account_id - Existing sub account ID to associate with the documents

JSON response

JSONResponse example
{
  "bundle_id": "35",
  "documents": [
    {
      "id": "120586",
      "confirmed": false,
      "document_type": "bundle",
      "print_type": "black_white",
      "trans_id": "PAY-2026-001042",
      "status": {
        "id": "1",
        "name": "Pending Release"
      }
    },
    {
      "id": "120587",
      "confirmed": false,
      "document_type": "bundle",
      "print_type": "black_white",
      "trans_id": "PAY-2026-001043",
      "status": {
        "id": "1",
        "name": "Pending Release"
      }
    },
    {
      "id": "120588",
      "confirmed": false,
      "document_type": "bundle",
      "print_type": "black_white",
      "trans_id": "PAY-2026-001044",
      "status": {
        "id": "1",
        "name": "Pending Release"
      }
    },
    {
      "id": "120589",
      "confirmed": false,
      "document_type": "bundle",
      "print_type": "black_white",
      "trans_id": "PAY-2026-001045",
      "status": {
        "id": "1",
        "name": "Pending Release"
      }
    },
    {
      "id": "120590",
      "confirmed": false,
      "document_type": "bundle",
      "print_type": "black_white",
      "trans_id": "PAY-2026-001042",
      "status": {
        "id": "1",
        "name": "Pending Release"
      }
    }
  ]
}

XML response

XMLResponse example
<wmc-response status="1" bundleid="36">
	<documents>
		<document id='120591'>
			<id>120591</id>
			<confirmed>0</confirmed>
			<document_type>bundle</document_type>
			<print_type>black_white</print_type>
			<trans_id>PAY-2026-001042</trans_id>
			<status_id>1</status_id>
		</document>
			<document id='120592'>
			<id>120592</id>
			<confirmed>0</confirmed>
			<document_type>bundle</document_type>
			<print_type>black_white</print_type>
			<trans_id>PAY-2026-001043</trans_id>
			<status_id>1</status_id>
		</document>
			<document id='120593'>
			<id>120593</id>
			<confirmed>0</confirmed>
			<document_type>bundle</document_type>
			<print_type>black_white</print_type>
			<trans_id>PAY-2026-001044</trans_id>
			<status_id>1</status_id>
		</document>
			<document id='120594'>
			<id>120594</id>
			<confirmed>0</confirmed>
			<document_type>bundle</document_type>
			<print_type>black_white</print_type>
			<trans_id>PAY-2026-001045</trans_id>
			<status_id>1</status_id>
		</document>
			<document id='120595'>
			<id>120595</id>
			<confirmed>0</confirmed>
			<document_type>bundle</document_type>
			<print_type>black_white</print_type>
			<trans_id>PAY-2026-001042</trans_id>
			<status_id>1</status_id>
		</document>
	</documents>
</wmc-response>

Mailing lists

Parameters

  • client_id*
  • akey*
  • document_file* - File sent as a multipart upload
  • mailing_list_file* - File sent as a multipart upload, in CSV format, with the following columns/headers:
    Mail To Recipient,Address,Address 2,City,State,Zip,Country,Client Transaction ID,Sub Account ID,Postage Code,Custom FedEx Account Number,Custom FedEx Alert Email
  • Set the Postage Code column to one of the numeric values below. For FedEx shipments billed to your own account, also provide the Custom FedEx Account Number and, optionally, Custom FedEx Alert Email
    • 1 - USPS First Class (Default if not specified)
    • 2 - USPS Priority
    • 3 - USPS Priority + Delivery Confirmation
    • 4 - USPS Priority + Signature Confirmation
    • 5 - FedEx Express 2 Day
    • 6 - FedEx Express Overnight
    • 8 - USPS Overnight
    • 9 - USPS Certified Mail
    • 10 - FedEx Priority Overnight
  • document_type* - set this to a value of "mailing_list"
  • print_type* - Print format; Use one of the following values:
    • black_white - print using Black & White
    • black_white_duplex - print using Black & White Duplex
    • color - print using Color
    • color_duplex - print using Color Duplex
  • trans_id - an optional custom client transaction ID stored for record keeping
  • document_return_address_option* - Use one of the following values:
    • smartpayables - Select this value to use our address in the event of a return
    • custom - Provide a return address in the field below, separating lines with the | character
  • document_return_address* - custom return address to be used with new lines indicated by the | character (eg. company name|address|city, state, zip|country)
  • envelope_type_id - this field is used to specify an envelope type ID, which will be issued to you by our setup and support team if you have custom envelope types setup with us. You can also retrieve a list of usable IDs for your account from the Documents -> Get Envelope Types method
  • sub_account_id - Existing sub account ID to associate with the documents

JSON response

JSONResponse example
{
  "file_id": 94,
  "documents": [
    {
      "id": "120600",
      "confirmed": false,
      "document_type": "mailing_list",
      "print_type": "black_white",
      "mail_to": "Harbor Office Supply LLC",
      "address": "1250 Market Street",
      "address2": "Suite 200",
      "city": "Denver",
      "state": "CO",
      "zip": "80202",
      "country": "US",
      "trans_id": "PAY-2026-001042",
      "address_position_type": "double_top_left",
      "document_return_address_option": "smartpayables",
      "document_return_address": "",
      "status": {
        "id": "1",
        "name": "Pending Release"
      }
    },
    {
      "id": "120601",
      "confirmed": false,
      "document_type": "mailing_list",
      "print_type": "black_white",
      "mail_to": "Summit Logistics LLC",
      "address": "4800 Innovation Drive",
      "address2": "Suite 300",
      "city": "Denver",
      "state": "CO",
      "zip": "80202",
      "country": "US",
      "trans_id": "PAY-2026-001043",
      "address_position_type": "double_top_left",
      "document_return_address_option": "smartpayables",
      "document_return_address": "",
      "status": {
        "id": "1",
        "name": "Pending Release"
      }
    },
    {
      "id": "120602",
      "confirmed": false,
      "document_type": "mailing_list",
      "print_type": "black_white",
      "mail_to": "Cedar Ridge Consulting LLC",
      "address": "720 Commerce Avenue",
      "address2": "Suite 400",
      "city": "Denver",
      "state": "CO",
      "zip": "80202",
      "country": "US",
      "trans_id": "PAY-2026-001044",
      "address_position_type": "double_top_left",
      "document_return_address_option": "smartpayables",
      "document_return_address": "",
      "status": {
        "id": "1",
        "name": "Pending Release"
      }
    },
    {
      "id": "120603",
      "confirmed": false,
      "document_type": "mailing_list",
      "print_type": "black_white",
      "mail_to": "Westfield Equipment Co.",
      "address": "950 Park Boulevard",
      "address2": "Suite 500",
      "city": "Denver",
      "state": "CO",
      "zip": "80202",
      "country": "US",
      "trans_id": "PAY-2026-001045",
      "address_position_type": "double_top_left",
      "document_return_address_option": "smartpayables",
      "document_return_address": "",
      "status": {
        "id": "1",
        "name": "Pending Release"
      }
    }
  ]
}

XML response

XMLResponse example
<wmc-response status="1" fileid="93">
	<documents>
		<document id='120596'>
			<id>120596</id>
			<confirmed>0</confirmed>
			<document_type>mailing_list</document_type>
			<print_type>black_white</print_type>
			<mail_to>Harbor Office Supply LLC</mail_to>
			<address>1250 Market Street</address>
			<address2>Suite 200</address2>
			<city>Denver</city>
			<state>CO</state>
			<zip>80202</zip>
			<country>US</country>
			<trans_id>PAY-2026-001042</trans_id>
			<address_position_type>double_top_left</address_position_type>
			<document_return_address_option>smartpayables</document_return_address_option>
			<document_return_address></document_return_address>
			<status_id>1</status_id>
		</document>
		<document id='120597'>
			<id>120597</id>
			<confirmed>0</confirmed>
			<document_type>mailing_list</document_type>
			<print_type>black_white</print_type>
			<mail_to>Summit Logistics LLC</mail_to>
			<address>4800 Innovation Drive</address>
			<address2>Suite 300</address2>
			<city>Denver</city>
			<state>CO</state>
			<zip>80202</zip>
			<country>US</country>
			<trans_id>PAY-2026-001043</trans_id>
			<address_position_type>double_top_left</address_position_type>
			<document_return_address_option>smartpayables</document_return_address_option>
			<document_return_address></document_return_address>
			<status_id>1</status_id>
		</document>
		<document id='120598'>
			<id>120598</id>
			<confirmed>0</confirmed>
			<document_type>mailing_list</document_type>
			<print_type>black_white</print_type>
			<mail_to>Cedar Ridge Consulting LLC</mail_to>
			<address>720 Commerce Avenue</address>
			<address2>Suite 400</address2>
			<city>Denver</city>
			<state>CO</state>
			<zip>80202</zip>
			<country>US</country>
			<trans_id>PAY-2026-001044</trans_id>
			<address_position_type>double_top_left</address_position_type>
			<document_return_address_option>smartpayables</document_return_address_option>
			<document_return_address></document_return_address>
			<status_id>1</status_id>
		</document>
		<document id='120599'>
			<id>120599</id>
			<confirmed>0</confirmed>
			<document_type>mailing_list</document_type>
			<print_type>black_white</print_type>
			<mail_to>Westfield Equipment Co.</mail_to>
			<address>950 Park Boulevard</address>
			<address2>Suite 500</address2>
			<city>Denver</city>
			<state>CO</state>
			<zip>80202</zip>
			<country>US</country>
			<trans_id>PAY-2026-001045</trans_id>
			<address_position_type>double_top_left</address_position_type>
			<document_return_address_option>smartpayables</document_return_address_option>
			<document_return_address></document_return_address>
			<status_id>1</status_id>
		</document>
	</documents>
</wmc-response>

Search documentation