USPS-eVS - Label Priority Mail International

Carrier: USPS-eVS
Action: Label Priority Mail International
Description: Example implementation for USPS-eVS Label Priority Mail International
{
  "carrier": "USPS-eVS",
  "action": "SubmitShipment",
  "params": {
    "test": true,
    "username": "YOUR_USERNAME",
    "password": "YOUR_PASSWORD",
    "service": "US-PMI",
    "customs_content_type": "SAMPLE",
    "packages": [
      {
        "weight": 4.3,
        "length": 7,
        "width": 7,
        "height": 8
      }
    ],
    "customs": [
      {
        "customs_quantity_units": "EA",
        "customs_quantity": 1,
        "customs_value": 50.00,
        "country_of_manufacture": "US",
        "customs_weight": 2,
        "customs_description": "My Description"
      },
      {
        "customs_quantity_units": "EA",
        "customs_quantity": 1,
        "customs_value": 50.00,
        "country_of_manufacture": "US",
        "customs_weight": 2,
        "customs_description": "My Description",
        "number_of_packages_per_commodity": 2
      }
    ],
    "shipper": "RocketShipIt",
    "ship_contact": "John Doe",
    "ship_addr1": "123 Main St",
    "ship_city": "Whitehall",
    "ship_state": "MT",
    "ship_code": "59759",
    "ship_phone": "1231231234",
    "ship_country": "US",
    "to_name": "JOHN DOE",
    "to_addr1": "2000 Meadowvale Rd",
    "to_state": "ON",
    "to_city": "Toronto",
    "to_code": "M1B5K7",
    "to_phone": "1231231234",
    "to_country": "CA",
    "image_type": "PDF"
  }
}

<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
  'carrier' => 'USPS-eVS',
  'action' => 'SubmitShipment',
  'params' => 
  array (
    'test' => true,
    'username' => 'YOUR_USERNAME',
    'password' => 'YOUR_PASSWORD',
    'service' => 'US-PMI',
    'customs_content_type' => 'SAMPLE',
    'packages' => 
    array (
      0 => 
      array (
        'weight' => 4.3,
        'length' => 7,
        'width' => 7,
        'height' => 8,
      ),
    ),
    'customs' => 
    array (
      0 => 
      array (
        'customs_quantity_units' => 'EA',
        'customs_quantity' => 1,
        'customs_value' => 50.0,
        'country_of_manufacture' => 'US',
        'customs_weight' => 2,
        'customs_description' => 'My Description',
      ),
      1 => 
      array (
        'customs_quantity_units' => 'EA',
        'customs_quantity' => 1,
        'customs_value' => 50.0,
        'country_of_manufacture' => 'US',
        'customs_weight' => 2,
        'customs_description' => 'My Description',
        'number_of_packages_per_commodity' => 2,
      ),
    ),
    'shipper' => 'RocketShipIt',
    'ship_contact' => 'John Doe',
    'ship_addr1' => '123 Main St',
    'ship_city' => 'Whitehall',
    'ship_state' => 'MT',
    'ship_code' => '59759',
    'ship_phone' => '1231231234',
    'ship_country' => 'US',
    'to_name' => 'JOHN DOE',
    'to_addr1' => '2000 Meadowvale Rd',
    'to_state' => 'ON',
    'to_city' => 'Toronto',
    'to_code' => 'M1B5K7',
    'to_phone' => '1231231234',
    'to_country' => 'CA',
    'image_type' => 'PDF',
  ),
)
);

rs.request(
  {'action': 'SubmitShipment',
 'carrier': 'USPS-eVS',
 'params': {'customs': [{'country_of_manufacture': 'US',
                         'customs_description': 'My Description',
                         'customs_quantity': 1,
                         'customs_quantity_units': 'EA',
                         'customs_value': 50.0,
                         'customs_weight': 2},
                        {'country_of_manufacture': 'US',
                         'customs_description': 'My Description',
                         'customs_quantity': 1,
                         'customs_quantity_units': 'EA',
                         'customs_value': 50.0,
                         'customs_weight': 2,
                         'number_of_packages_per_commodity': 2}],
            'customs_content_type': 'SAMPLE',
            'image_type': 'PDF',
            'packages': [{'height': 8, 'length': 7, 'weight': 4.3, 'width': 7}],
            'password': 'YOUR_PASSWORD',
            'service': 'US-PMI',
            'ship_addr1': '123 Main St',
            'ship_city': 'Whitehall',
            'ship_code': '59759',
            'ship_contact': 'John Doe',
            'ship_country': 'US',
            'ship_phone': '1231231234',
            'ship_state': 'MT',
            'shipper': 'RocketShipIt',
            'test': True,
            'to_addr1': '2000 Meadowvale Rd',
            'to_city': 'Toronto',
            'to_code': 'M1B5K7',
            'to_country': 'CA',
            'to_name': 'JOHN DOE',
            'to_phone': '1231231234',
            'to_state': 'ON',
            'username': 'YOUR_USERNAME'}}

)

rs.request(
  {"carrier"=>"USPS-eVS",
 "action"=>"SubmitShipment",
 "params"=>
  {"test"=>true,
   "username"=>"YOUR_USERNAME",
   "password"=>"YOUR_PASSWORD",
   "service"=>"US-PMI",
   "customs_content_type"=>"SAMPLE",
   "packages"=>[{"weight"=>4.3, "length"=>7, "width"=>7, "height"=>8}],
   "customs"=>
    [{"customs_quantity_units"=>"EA",
      "customs_quantity"=>1,
      "customs_value"=>50.0,
      "country_of_manufacture"=>"US",
      "customs_weight"=>2,
      "customs_description"=>"My Description"},
     {"customs_quantity_units"=>"EA",
      "customs_quantity"=>1,
      "customs_value"=>50.0,
      "country_of_manufacture"=>"US",
      "customs_weight"=>2,
      "customs_description"=>"My Description",
      "number_of_packages_per_commodity"=>2}],
   "shipper"=>"RocketShipIt",
   "ship_contact"=>"John Doe",
   "ship_addr1"=>"123 Main St",
   "ship_city"=>"Whitehall",
   "ship_state"=>"MT",
   "ship_code"=>"59759",
   "ship_phone"=>"1231231234",
   "ship_country"=>"US",
   "to_name"=>"JOHN DOE",
   "to_addr1"=>"2000 Meadowvale Rd",
   "to_state"=>"ON",
   "to_city"=>"Toronto",
   "to_code"=>"M1B5K7",
   "to_phone"=>"1231231234",
   "to_country"=>"CA",
   "image_type"=>"PDF"}}

)

rocketshipit.request(
  {
  "carrier": "USPS-eVS",
  "action": "SubmitShipment",
  "params": {
    "test": true,
    "username": "YOUR_USERNAME",
    "password": "YOUR_PASSWORD",
    "service": "US-PMI",
    "customs_content_type": "SAMPLE",
    "packages": [
      {
        "weight": 4.3,
        "length": 7,
        "width": 7,
        "height": 8
      }
    ],
    "customs": [
      {
        "customs_quantity_units": "EA",
        "customs_quantity": 1,
        "customs_value": 50.00,
        "country_of_manufacture": "US",
        "customs_weight": 2,
        "customs_description": "My Description"
      },
      {
        "customs_quantity_units": "EA",
        "customs_quantity": 1,
        "customs_value": 50.00,
        "country_of_manufacture": "US",
        "customs_weight": 2,
        "customs_description": "My Description",
        "number_of_packages_per_commodity": 2
      }
    ],
    "shipper": "RocketShipIt",
    "ship_contact": "John Doe",
    "ship_addr1": "123 Main St",
    "ship_city": "Whitehall",
    "ship_state": "MT",
    "ship_code": "59759",
    "ship_phone": "1231231234",
    "ship_country": "US",
    "to_name": "JOHN DOE",
    "to_addr1": "2000 Meadowvale Rd",
    "to_state": "ON",
    "to_city": "Toronto",
    "to_code": "M1B5K7",
    "to_phone": "1231231234",
    "to_country": "CA",
    "image_type": "PDF"
  }
}
)
← Back to All Examples

Other USPS-eVS Examples

Label
Example implementation for USPS-eVS Label
Label APO
Example implementation for USPS-eVS Label APO
Label Express Mail International
Example implementation for USPS-eVS Label Express Mail International
Label First Class Mail International
Example implementation for USPS-eVS Label First Class Mail International
Void
Example implementation for USPS-eVS Void