USPS - EMRS Return Label

Carrier
USPS
Action
EMRS Return Label
{
    "carrier": "USPS",
    "action": "submitshipment",
    "params": {
      "permit_number": "293829",
      "permit_issuing_po_city": "New York",
      "permit_issuing_po_state": "NY",
      "permit_issuing_po_zip5": "10001",
      "pdu_firm_name": "Acme Inc",
      "pdu_po_box": "PO Box 100",
      "pdu_city": "Wilkes Barre",
      "pdu_state": "PA",
      "pdu_zip5": "18702",
      "pdu_zip4": "1234",
      "packages": [
        {
          "weight": 4,
          "length": 7,
          "width": 7,
          "height": 8
        }
      ],
      "service": "PRIORITY",
      "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",
      "from_name": "John Doe",
      "from_addr1": "940 Presidio Ave",
      "from_addr2": "#103",
      "from_state": "CA",
      "from_city": "San Francisco",
      "from_code": "94115",
      "from_country": "US",
      "image_type": "PDF",
      "test": true
    }
}

<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
  'carrier' => 'USPS',
  'action' => 'submitshipment',
  'params' => 
  array (
    'permit_number' => '293829',
    'permit_issuing_po_city' => 'New York',
    'permit_issuing_po_state' => 'NY',
    'permit_issuing_po_zip5' => '10001',
    'pdu_firm_name' => 'Acme Inc',
    'pdu_po_box' => 'PO Box 100',
    'pdu_city' => 'Wilkes Barre',
    'pdu_state' => 'PA',
    'pdu_zip5' => '18702',
    'pdu_zip4' => '1234',
    'packages' => 
    array (
      0 => 
      array (
        'weight' => 4,
        'length' => 7,
        'width' => 7,
        'height' => 8,
      ),
    ),
    'service' => 'PRIORITY',
    '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',
    'from_name' => 'John Doe',
    'from_addr1' => '940 Presidio Ave',
    'from_addr2' => '#103',
    'from_state' => 'CA',
    'from_city' => 'San Francisco',
    'from_code' => '94115',
    'from_country' => 'US',
    'image_type' => 'PDF',
    'test' => true,
  ),
)
);

rs.request(
  {'action': 'submitshipment',
 'carrier': 'USPS',
 'params': {'from_addr1': '940 Presidio Ave',
            'from_addr2': '#103',
            'from_city': 'San Francisco',
            'from_code': '94115',
            'from_country': 'US',
            'from_name': 'John Doe',
            'from_state': 'CA',
            'image_type': 'PDF',
            'packages': [{'height': 8, 'length': 7, 'weight': 4, 'width': 7}],
            'pdu_city': 'Wilkes Barre',
            'pdu_firm_name': 'Acme Inc',
            'pdu_po_box': 'PO Box 100',
            'pdu_state': 'PA',
            'pdu_zip4': '1234',
            'pdu_zip5': '18702',
            'permit_issuing_po_city': 'New York',
            'permit_issuing_po_state': 'NY',
            'permit_issuing_po_zip5': '10001',
            'permit_number': '293829',
            'service': 'PRIORITY',
            '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}}

)

rs.request(
  {"carrier"=>"USPS",
 "action"=>"submitshipment",
 "params"=>
  {"permit_number"=>"293829",
   "permit_issuing_po_city"=>"New York",
   "permit_issuing_po_state"=>"NY",
   "permit_issuing_po_zip5"=>"10001",
   "pdu_firm_name"=>"Acme Inc",
   "pdu_po_box"=>"PO Box 100",
   "pdu_city"=>"Wilkes Barre",
   "pdu_state"=>"PA",
   "pdu_zip5"=>"18702",
   "pdu_zip4"=>"1234",
   "packages"=>[{"weight"=>4, "length"=>7, "width"=>7, "height"=>8}],
   "service"=>"PRIORITY",
   "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",
   "from_name"=>"John Doe",
   "from_addr1"=>"940 Presidio Ave",
   "from_addr2"=>"#103",
   "from_state"=>"CA",
   "from_city"=>"San Francisco",
   "from_code"=>"94115",
   "from_country"=>"US",
   "image_type"=>"PDF",
   "test"=>true}}

)

rocketshipit.request(
  {
    "carrier": "USPS",
    "action": "submitshipment",
    "params": {
      "permit_number": "293829",
      "permit_issuing_po_city": "New York",
      "permit_issuing_po_state": "NY",
      "permit_issuing_po_zip5": "10001",
      "pdu_firm_name": "Acme Inc",
      "pdu_po_box": "PO Box 100",
      "pdu_city": "Wilkes Barre",
      "pdu_state": "PA",
      "pdu_zip5": "18702",
      "pdu_zip4": "1234",
      "packages": [
        {
          "weight": 4,
          "length": 7,
          "width": 7,
          "height": 8
        }
      ],
      "service": "PRIORITY",
      "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",
      "from_name": "John Doe",
      "from_addr1": "940 Presidio Ave",
      "from_addr2": "#103",
      "from_state": "CA",
      "from_city": "San Francisco",
      "from_code": "94115",
      "from_country": "US",
      "image_type": "PDF",
      "test": true
    }
}
)

← All USPS examples