SendPostcardAndAddress
Description
The SendPostcardAndAddress() method is used for sending postcards through the PostalMethods service.
Read how to place content in postcards and how to use documents, images, pre-uploaded files and templates to get a better understanding of this method.
Formal Definition
https://api.postalmethods.com/2009-02-26/PostalWS.asmx?op=SendPostcardAndAddress
Input
| Property | Type | Comments |
|---|---|---|
| Username | String | As provided during registration |
| Password | String | As provided during registration |
| MyDescription | String | Up to 100 characters. Free text. User may add any text to help identify the request (UTF8) |
| ImageSideFileType | String | Provide details regarding the document used for the Image Side of the postcard. Option 1: The extension of the attached document. Example: jpgList of supported file types. FileBinaryData must contain the binary representation of the document. Option 2: The name of a pre-uploaded file to be used for this card side. Format: MyFile:<finename>.<extension>. FileBinaryData must be empty.Option 3: the name of a pre-uploaded template to be used for this card side. Format: MyTemplate:<filename>.<extension>. FileBinaryData may either be empty or contain a binary representation of values to be merged to this template in an XML format.
|
| ImageSideBinaryData | base64Binary | Attached document represented as binary data List of supported file types |
| ImageSideScaling | Default or FitToPage or None |
|
| AddressSideFileType | String | Provide details regarding the document used for the Address Side of the postcard. Option 1: The extension of the attached document. Example: jpgList of supported file types. FileBinaryData must contain the binary representation of the document. Option 2: The name of a pre-uploaded file to be used for this card side. Format: MyFile:<finename>.<extension>. FileBinaryData must be empty.Option 3: the name of a pre-uploaded template to be used for this card side. Format: MyTemplate:<filename>.<extension>. FileBinaryData may either be empty or contain a binary representation of values to be merged to this template in an XML format.
|
| AddressSideBinaryData | base64Binary | Attached document represented as binary data List of supported file types |
| WorkMode | Default or Production or Development |
|
| PrintColor | Default or Black or FullColor | Color used for printing both sides of the postcard. |
| PostcardSize | Default or Postcard_4_25X6 | Physical size of the postcard. For future use. Current size is 4.25x6 only. |
| MailingPriority | Default or FirstClass | Postage used. For future use. Current postage is First-Class priority only. |
| AttentionLine1 | String | Up to 45 characters. Non-address data, such as company, name, position, department, etc. Line will not be printed when empty. At least one of the attention or company lines must contain data. |
| AttentionLine2 | String | Up to 45 characters. Non-address data, such as name, position, department, etc. Line will not be printed when empty |
| Company | String | Up to 45 characters. Company / Firm name. At least one of the attention or company lines must contain data. |
| Address1 | String | Up to 45 characters.Main delivery address (e.g., 123 Main St.) or PO Box. This line must contain data. |
| Address2 | String | Up to 45 characters. Secondary address unit (i.e., Additional address elements such as Apartment, Suite, Building, Room, etc.) |
| City | String | Up to 30 characters. Use 'FPO' or 'APO' when sending to U.S. Military destinations. This line must contain data. |
| State | String | Up to 30 characters. State or Region. Use 'AE', 'AP' or 'AA' when sending to U.S. Military destinations |
| PostalCode | String | Up to 15 characters. Provide postal code in a format used in the destination country. When destination country is the USA, use a ZIP+4 code. If ZIP+4 is not provided we will try to add it |
| Country | String | Postcards can only be sent within the United States. Up to 45 characters. Value is required only when destination country is different than the user's country. |
Output: SendPostcardAndAddressResponse
| Element | Type | Comments |
|---|---|---|
| SendPostcardAndAddressResult | int | In case of successful submission, a positive number is returned indicating the postcard's unique identifier on the system. In case of failure, a negative number is returned indicating the failure reason. See the list of Web Service Result Codes. |
