Module: Usps::Api::Endpoints::EVSExpressMailIntl
- Included in:
- Usps::Api::Endpoints
- Defined in:
- lib/usps/api/endpoints/e_vs_express_mail_intl.rb
Instance Method Summary collapse
-
#e_vs_express_mail_intl(options = {}) ⇒ Object
The eVS Priority Mail Express International Label API lets customers generate eVS Priority Mail Express International labels and integrated customs forms.
Instance Method Details
#e_vs_express_mail_intl(options = {}) ⇒ Object
The eVS Priority Mail Express International Label API lets customers generate eVS Priority Mail Express International labels and integrated customs forms.
Parameters:
- options (Hash) (defaults to: {})
Options Hash (options):
-
e_vs_express_mail_intl_request
(required, Hash)
—
-
:option (Empty) — For future use.
-
:revision (String) — Use of value 2 Required as of January 2011. For example: <Revision>2</Revision>
-
:image_parameters (Hash) — Groups alternate image options.
-
:image_parameter (String) — Returns alternate label image. Only alternate 4’’x6’’ size label image may be requested at this time. · 4X6LABEL - (4X6 on a full page 8.5/11” background) · 4X6LABELL- (Landscape – true size 4X6; image rotated, not on an 8.5 x 11 background page) · 4X6LABELP - (Portrait – true size 4X6, not on an 8.5 x 11 background page) · 4X6ZPL203DPI - (ZPL - Zebra Programming Language) format. When using this enumeration, <ImageType> is required - this tag cannot be left blank. Integrators should use either “TIF” or “PDF” for ZPL – neither value will impact the label image itself, but it must be included in the request to return a successful response. · 4X6ZPL300DPI - Prints a label formatted for ZPL printers in 300 dpi. When using this enumeration, <ImageType> is required - this tag cannot be left blank. Integrators should use either “TIF” or “PDF” for ZPL – neither value will impact the label image itself, but it must be included in the request to return a successful response. For example: <ImageParameter>4X6LABEL</ImageParameter>
-
:from_first_name (required, String) — Both FromFirstName and FromLastName are Required if FromFirmName is left blank. Maximum Length: 32 characters total for First, Middle, and Last Names with space after first and middle name. For example: <FromFirstName>John</FromFirstName>
-
:from_middle_initial (String) — Middle Initial. Maximum Length: 32 characters total for First, Middle, and Last Names with space after first and middle name. For example: <FromMiddleInitial>L</FromMiddleInitial>
-
:from_last_name (required, String) — Both FromFirstName and FromLastName are Required if FromFirmName is left blank. Maximum Length: 32 characters total for First, Middle, and Last Names with space after first and middle name. For example: <FromLastName>Doe</FromLastName>
-
:from_firm (required, String) — FromFirm is Required if FromFirstName and FromLastName are left blank. For example: <FromFirm>ABC Corp</FromFirm>
-
:from_address1 (String) — Use this tag for a suite or apartment number only. Either Address1 or Address2 is Required. For example: <FromAddress1>Suite 101 </FromAddress1>
-
:from_address2 (required, String) — Use this tag for the primary address line. For example: <FromAddress2>10 Elm Street </FromAddress2>
-
:from_urbanization (String) — Use this tag for Puerto Rico only. ZIP Code prefixes 006 to 009, if area is so designated. For example: <FromUrbanization>URB Caparra Ter</FromUrbanization>
-
:from_city (required, String) — For example: <FromCity>Bristol</FromCity>
-
:from_state (required, String) — Use 2-letter USPS state abbreviation. For example: <FromState>CT</FromState>
-
:from_zip5 (required, String) — Input tag exactly as presented, not all caps. 5 digits Required. For example: <FromZip5>06010</FromZip5>
-
:from_zip4 (String) — Input tag exactly as presented, not all caps. If value is entered, 4 digits Required. This is the ZIP+4 extension. For example: <FromZip4>5678</FromZip4>
-
:from_phone (required, String) — 10 digits Required (including area code), with no punctuation. Use format: 2125551234 For example: <FromPhone>5555555555</FromPhone>
-
:from_customs_reference (String) — Enter a value for the “Sender’s Customs Reference” that will appear on the label. The text entered is any reference number that the sender wishes to use. For example: <FromCustomsReference></FromCustomsReference>
-
:to_name (String) — Deprecated. See “ToFirstName” and “ToLastName” tags.
-
:to_first_name (required, String) — Both ToFirstName and ToLastName are Required if ToFirm is left blank. For example: <ToFirstName>John</ToFirstName>
-
:to_last_name (required, String) — Both ToFirstName and ToLastName are Required if ToFirm is left blank. For example: <ToLastName>Doe</ToLastName>
-
:to_firm (required, String) — ToFirm is Required if ToFirstName and ToLastName are left blank. For example: <ToFirm>ABC Co</ToFirm>
-
:to_address1 (String) — Three address lines are provided, but only 1 is Required. Use as many as needed for complete address. For example: <ToAddress1> 60 Carlton St</ToAddress1>
-
:to_address2 (required, String) — Three address lines are provided, but only 1 is Required. Use as many as needed for complete address.
-
:to_address3 (String) — Three address lines are provided, but only 1 is Required. Use as many as needed for complete address.
-
:to_city (required, String) — Recipient’s city. For example: <ToCity>Toronto</ToCity>
-
:to_province (String) — Enter the province for the recipient. For example: <ToProvince>ON</ToProvince>
-
:to_country (required, String) — The country name entered must match an entry from the USPS-approved International Index of Countries and Localities. See the Index of Countries and Localities. Using a country name not on the list will result in a request failure. For example: <ToCountry>Canada</ToCountry>
-
:to_postal_code (required, String) — Enter the postal code for the recipient. For example: <ToPostalCode> M5B 1J2</ToPostalCode>
-
:to_po_box_flag (required, String) — Indicates whether the destination address is a Post Office Box. For example: <ToPOBoxFlag>N</ToPOBoxFlag>
-
:to_phone (String) — No format checking is done on international phone numbers. Required when <ToPOBoxFlag>Y</ToPOBoxFlag> For example: <ToPhone>011 52 (322) 222-0069</ToPhone>
-
:to_fax (String) — No format checking is done on international fax numbers. For example: <ToFax>011 52 (322) 222-0074</ToFax>
-
:to_email (String) — Complete valid e-mail address is Required if tag is used. For example: <ToEmail>[email protected]</ToEmail>
-
:importers_reference_number (String) — Enter a value for the “Importer’s Customs Reference” that will appear on the label. The text entered is any reference number that the recipient wishes to use. For example: <ToCustomsReference>Order 23432</ToCustomsReference>
-
:non_delivery_option (String) — In case package is undeliverable, enter one of the following: “RETURN” for package to be returned to <FromAddress> above. “REDIRECT” to return package to address specified below in <AltReturn> tags. “ABANDON” to dispose of undeliverable package. For example: <NonDeliveryOption>RETURN</NonDeliveryOption>
-
:redirect_name (String) — Enter a value for the recipient’s name.
-
:redirect_email (String) — Complete valid e-mail address is required if tag is used.
-
:redirect_sms (String) — This value must be a syntactically valid SMS number.
-
:redirect_address (String) — Enter the redirect address. This is a free form field.
-
:redirect_city (String) — Redirect city. For example: <RedirectCity>ANYTOWN</RedirectCity>
-
:redirect_state (String) — Redirect state. For example: <RedirectState>MN</RedirectState>
-
:redirect_zip_code (String) — Redirect ZIP code. For example: <RedirectZipCode>12345</RedirectZipCode>
-
:redirect_zip4 (String) — Redirect ZIP+4 extension. For example: <RedirectZip4>01234</RedirectZip4>
-
:container (String) — Container type.
-
:shipping_contents (required, Hash) —
-
:item_detail (Hash) —
-
:description (required, String) — Description of the item. For example: <Description>Policy guidelines document</Description>
-
:quantity (required, integer) — Quantity of the item. Integer value Required. For example: <Quantity>1</Quantity>
-
:value (required, decimal) — The data entered with this tag provides the value of the set of items. If the item is 2 boxes of 50 pens and the value of each box is $10.00, “20.00” (2 boxes x $10.00) should be entered. If the value of each pen is .25 then “25.00” (100 pens x .25) should be entered. For example: <Value>55.00</Value>
-
:net_pounds (required, integer) — Provide the pounds component of the weight of the individual item listed with <Description>. For example: <NetPounds>1</NetPounds>
-
:net_ounces (required, decimal) — Provide the ounces component of the weight of the individual item listed with <Description>. For example: <NetOunces>5</NetOunces>
-
:hs_tariff_number (required, String) — For commercial items only. If known, the HS tariff number must be based on the Harmonized Commodity Description and Coding System developed by the World Customs Organization. For example: <HSTariffNumber>490110</HSTariffNumber>
-
:country_of_origin (required, String) — For commercial items only. Country of Origin means the country where the goods originated, e.g. were produced, manufactured, or assembled. It is recommended you supply this information and attach an invoice to the outside to accelerate customs clearance in processing the items. The country name entered must match an entry from the USPS-approved International Index of Countries and Localities or be “United States”. pe.usps.gov/text/Imm/immctry.htm – click on the link for “International Country Listings”. Using a country name not on the list will result in a request failure. For example: <CountryOfOrigin>United States</CountryOfOrigin>
-
:insured_number (String) — For backward compatibility; not validated.
-
:insured_amount (String) — Use this tag for entering an insurance amount, if known. For example: <InsuredAmount>100.00</InsuredAmount>
-
:postage (String) — Use this tag for entering a postage amount, if known. If the tag is present, but the value is blank, the postage will be automatically calculated. For example: <Postage>10.50</Postage>
-
:gross_pounds (required, integer) — Gross pounds and ounces together represent the total package weight, including packing material. For example, a package weighing 3 lbs 8 ounces would have “3” entered here and “8” entered with the <GrossOunces> tag. The Web Tool will check for maximum shipping weight of 70 pounds. Allowable weight may change based on the service used to send package and the destination country. For example: <GrossPounds>4</GrossPounds>
-
:gross_ounces (required, integer) — Enter the ounces component of the total package weight with this tag. For example: <GrossOunces>0</GrossOunces>
-
:content_type (required, String) — Specifies the content of the package or envelope. For example: <ContentType>DOCUMENTS</ContentType> Note : “NONNEGOTIABLEDOCUMENT” and “DOCUMENTS” both signify mailable non-negotiable documents and are insured automatically for up to $100, though Insurance will not be returned as an extra service. Additional Insurance cannot be purchased. Any non-document <ContentType> values are insured automatically for up to $200. Additional Insurance can be purchased for values $200 and greater.
-
:content_type_other (String) — Required when <ContentType>OTHER<ContentType>.
-
:agreement (required, String) — Requires a value of “Y” to print <FromFirstName/> and <FromLastName/> in Signature Box along with Current Date (Central Time USA). Any other value returns an error.
-
:comments (String) — Enter any comments. For example: <Comments> eVSExpressMailIntl</Comments>
-
:license_number (String) — Enter license number, if known or if included in package. For example: <LicenseNumber>LIC-24356879</LicenseNumber>
-
:certificate_number (String) — Enter certificate number, if known or if included in package. For example: <CertificateNumber>CERT-97865342</CertificateNumber>
-
:invoice_number (String) — Enter invoice number, if known or if included in package. For example: <InvoiceNumber>INV-040903</InvoiceNumber>
-
:image_type (required, String) — Label Image Type. Note: All <ImageType> values are ignored when <ImageParameter> = “4X6ZPL203DPI” or “4X6ZPL300DPI”. For example: <ImageType>PDF</ImageType>
-
:image_layout (String) — Controls how the multipage form is returned in the response tags. “ONEPERFILE” returns one page per response tag while “ALLINONEFILE” returns all pages in a single response tag. The “TRIM” options conserve page space if possible, by combining two form parts on a single page. For example: <ImageLayout>ONEPERFILE<ImageLayout>
-
:customer_ref_no (String) — Written to Postal Manifest Detail record. For example: <CustomerRefNo>Ref 369246</CustomerRefNo>
-
:customer_ref_no2 (String) — Written to Postal Manifest Detail record. For example: <CustomerRefNo2>ACT369246</CustomerRefNo2>
-
:po_zip_code (String) — ZIP Code of Post Office or collection box where item is mailed. May be different than FromZip5. This tag will take precedence over FromZip5 when provided. For example: <POZipCode>00962</POZipCode>
-
:label_date (String) — Date the mail will enter the mail stream. No more than 3 days in the future. Default is day of request. For example: <LabelDate>09/28/2010</LabelDate>
-
:emca_account () — For future use. USPS Corporate Account
-
:hold_for_manifest (String) — Restricted use. Holds manifest record for possible inclusion in SCAN request.
-
:eelpfc (String) — Exemption and Exclusion Legend or PFC Code. Please refer to the International Mail Manual for further information: pe.usps.gov/text/imm/immc5_007.htm. For example: <EELPFC>30.37a</EELPFC>
-
:price_options (String) — Indicates if commercial-base price should be returned. For commercial-base price eligibility, please reference the Domestic Mail Manual at pe.usps.com/.
-
:length (String) — Value must be numeric. Units are inches. If partial dimensions are provided, an error response will return. Length, Width, Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. In addition, Girth is required only for a non-rectangular package in addition to Length, Width, Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non-rectangular packages. For more details on dimensional weight pricing or dimension validation reference IMM pe.usps.com/text/imm/welcome.htm
-
:width (String) — Value must be numeric. Units are inches. If partial dimensions are provided, an error response will return. Length, Width, Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. In addition, Girth is required only for a non-rectangular package in addition to Length, Width, Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non-rectangular packages. For more details on dimensional weight pricing or dimension validation reference IMM pe.usps.com/text/imm/welcome.htm
-
:height (String) — Value must be numeric. Units are inches. If partial dimensions are provided, an error response will return. Length, Width, Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. In addition, Girth is required only for a non-rectangular package in addition to Length, Width, Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non-rectangular packages. For more details on dimensional weight pricing or dimension validation reference IMM pe.usps.com/text/imm/welcome.htm
-
:girth (String) — Value must be numeric. Units are inches. If partial dimensions are provided, an error response will return. Length, Width, Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. In addition, Girth is required only for a non-rectangular package in addition to Length, Width, Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non-rectangular packages. For more details on dimensional weight pricing or dimension validation reference IMM pe.usps.com/text/imm/welcome.htm
-
:label_time (String) — Available if <Revision>= 2. LabelTime is used in conjunction with LabelDate to determine the Guarantee
-
:meter_payment_flag (String) — Meter payment indicator
-
:action_code (String) — Used to specify the action code.Value is passed to Shipping Partner Event file via the shipment manifest. · M0 – Mailer Owner · S0 – Service Provider For example: <ActionCode>M0</ActionCode>
-
:opt_out_of_spe (Boolean) — Allows a customer to opt out of SPE file creation. “false” WILL create a SPE file. Note: This request tag is case sensitive.
-
:permit_number (String) — Number associated with a mailing permit. The permit is permission to use a certain postage payment method for bulk and commercial mailings
-
:account_zip_code (String) — ZIP of Account Post Office where mailed if different from <FromZip5>. Written to Postal Manifest Detail record. Must be valid ZIP Code. For example: <AccountZipCode>00962</AccountZipCode>
-
:importers_reference_type (String) — Tax code / VAT no. / Importer Code.
-
:importers_telephone_number (String) — For Importer: 10 digits (including area code), with no punctuation. Use format: 2125551234 For example: <ImportersTelephoneNumber>5555555555</ImportersTelephoneNumber>
-
:importers_fax_number (String) — For Importer: No format checking is done on international fax numbers. For example: <ImportersFaxNumber>011 52 (322) 222-0074</ImportersFaxNumber>
-
:importers_email (String) — For Importer: Complete valid e-mail address is Required if tag is used. For example: <ImportersEmail>[email protected]</ImportersEmail>
-
:machinable (Boolean) — Indicates whether the item is machinable. For example: <Machinable>false</Machinable>
-
:destination_rate_indicator (required, String) — Required for destination entry packages enter either “I” or “N”. · I= International Service Center (ISC) · N = None
-
:mid (String) — Mailer ID (MID), Represents Mail Owner MID. Located in position #13 in the Detail 1 record of the Shipping Services File v2.0. For example: <MID>847654321</ MID>
-
:logistics_manager_mid (String) — The MID of the company that manages the mailing. Located in position #12 in the Detail 1 record of the Shipping Services File v2.0. Note: If LogisticsManagerMID is populated, either CRID or MID must also be populated. For example: <LogisticsManagerMID>489001< / LogisticsManagerMID>
-
:crid (String) — Customer Registration ID, Represents Mail Owner CRID. Located in position #20 in the Detail 1 record of the Shipping Services File v2.0. For example: <CRID>544762</ CRID>
-
:vendor_code (String) — Code from vendor software to identify the developer of the shipping system. Located in position #15 in the Detail 1 record of the Shipping Services File v2.0. For example: <VendorCode>1234<VendorCode>
-
:vendor_product_version_number (String) — Shipping software’s product version number. Located in position #16 in the Detail 1 record of the Shipping Services File v2.0. For example: <VendorProductVersionNumber>5.02.1B</ VendorProductVersionNumber>
-
:e_postage_mailer_reporting (String) — Verifies Sender Information, sender fields must match From information when <ePostageMailerReporting>=1 · 1 - (ePostage sender information in SSF) · 2 - (ePostage sender information through DES) · 3 - (ePostage sender information using child MID)
-
:sender_first_name (String) — First Name of Sender. For example: <SenderFirstName>Adam </SenderFirstName> Required when <ePostageMailerReporting>=1
-
:sender_last_name (String) — Last Name of Sender. For example: <SenderLastName>Smith </SenderLastName> Required when <ePostageMailerReporting>=1
-
:sender_business_name (String) — Values for Sender Business Name must be sent. For example: <SenderBusinessName>USPS</SenderBusinessName>
-
:sender_address1 (String) — Sender address line. Use this tag for full address (Address1 and Address2) Must match Address1 and Address2 or will produce an error. For example: <SenderAddress1>STE 150 10 Elm Street </SenderAddress1> Required when <ePostageMailerReporting>=1
-
:sender_city (String) — Sender city. For example: <SenderCity>BETHESDA</SenderCity>Required when <ePostageMailerReporting>=1
-
:sender_state (String) — Sender state. For example: <SenderState>MD</SenderState> Required when <ePostageMailerReporting>=1
-
:sender_zip5 (String) — Sender ZIP code. For example: <SenderZip5>20212</SenderZip5> Required when <ePostageMailerReporting>=1
-
:sender_phone (String) — Sender Phone #. 10 digits Required (including area code), with no punctuation. For example: <SenderPhone>2125551234</SenderPhone> Required when <ePostageMailerReporting>=1
-
:sender_email (String) — E-mail Address of Sender. Valid e-mail addresses must be used. For example: <SenderEMail>[email protected]</SenderEMail> Required when <ePostageMailerReporting>=1
-
:extra_services (Hash) — Groups extra services elements
-
:extra_service (Service Name) — [Name”=>“Scan Retention”, “Service ID”=>“181”, Name”=>“Scan + Signature Retention”, “Service ID”=>“182”]
-
:tracking_retention_period (ServiceID) — [“<TrackingRetentionPeriod>”=>““0.5” (6 Months)”, “<TrackingRetentionPeriod>”=>““1” (1 Year)”, “<TrackingRetentionPeriod>”=>““3” (3 Years)”, “<TrackingRetentionPeriod>”=>““5” (5 Years)”, “<TrackingRetentionPeriod>”=>““7” (7 Years)”, “<TrackingRetentionPeriod>”=>““3” (3 Years)”, “<TrackingRetentionPeriod>”=>““5” (5 Years)”, “<TrackingRetentionPeriod>”=>““7” (7 Years)”]
-
-
-
-
-
122 123 124 125 126 127 128 129 130 |
# File 'lib/usps/api/endpoints/e_vs_express_mail_intl.rb', line 122 def e_vs_express_mail_intl(options = {}) throw ArgumentError.new('Required arguments :e_vs_express_mail_intl_request missing') if options[:e_vs_express_mail_intl_request].nil? request = build_request(:e_vs_express_mail_intl, options) get('https://secure.shippingapis.com/ShippingAPI.dll', { API: 'eVSExpressMailIntl', XML: request, }) end |