Amazon MWS - Rates

Carrier: Amazon MWS
Action: Rates
Description: Example implementation for Amazon MWS Rates
{
  "carrier": "amazon-mws",
  "action": "GetAllRates",
  "params": {
    "key": "YOUR_SELLER_ID",
    "username": "YOUR_ACCESS_KEY_ID",
    "password": "YOUR_SECRET_KEY",
    "order": {
      "id": "111-7676169-9674624",
      "items": [
        {
          "id": "28367575711066",
          "quantity": 1
        }
      ]
    },
    "packages": [
      {
        "weight": 5,
        "length": 5,
        "width": 5,
        "height": 5
      }
    ],
    "shipper": "RocketShipIt",
    "ship_addr1": "123 Main St",
    "ship_city": "Whitehall",
    "ship_state": "MT",
    "ship_code": "59759",
    "ship_country": "US",
    "ship_email": "john@doe.com",
    "ship_phone": "1231231234",
    "weight_unit": "oz"
  }
}

<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
  'carrier' => 'amazon-mws',
  'action' => 'GetAllRates',
  'params' => 
  array (
    'key' => 'YOUR_SELLER_ID',
    'username' => 'YOUR_ACCESS_KEY_ID',
    'password' => 'YOUR_SECRET_KEY',
    'order' => 
    array (
      'id' => '111-7676169-9674624',
      'items' => 
      array (
        0 => 
        array (
          'id' => '28367575711066',
          'quantity' => 1,
        ),
      ),
    ),
    'packages' => 
    array (
      0 => 
      array (
        'weight' => 5,
        'length' => 5,
        'width' => 5,
        'height' => 5,
      ),
    ),
    'shipper' => 'RocketShipIt',
    'ship_addr1' => '123 Main St',
    'ship_city' => 'Whitehall',
    'ship_state' => 'MT',
    'ship_code' => '59759',
    'ship_country' => 'US',
    'ship_email' => 'john@doe.com',
    'ship_phone' => '1231231234',
    'weight_unit' => 'oz',
  ),
)
);

rs.request(
  {'action': 'GetAllRates',
 'carrier': 'amazon-mws',
 'params': {'key': 'YOUR_SELLER_ID',
            'order': {'id': '111-7676169-9674624',
                      'items': [{'id': '28367575711066', 'quantity': 1}]},
            'packages': [{'height': 5, 'length': 5, 'weight': 5, 'width': 5}],
            'password': 'YOUR_SECRET_KEY',
            'ship_addr1': '123 Main St',
            'ship_city': 'Whitehall',
            'ship_code': '59759',
            'ship_country': 'US',
            'ship_email': 'john@doe.com',
            'ship_phone': '1231231234',
            'ship_state': 'MT',
            'shipper': 'RocketShipIt',
            'username': 'YOUR_ACCESS_KEY_ID',
            'weight_unit': 'oz'}}

)

rs.request(
  {"carrier"=>"amazon-mws",
 "action"=>"GetAllRates",
 "params"=>
  {"key"=>"YOUR_SELLER_ID",
   "username"=>"YOUR_ACCESS_KEY_ID",
   "password"=>"YOUR_SECRET_KEY",
   "order"=>
    {"id"=>"111-7676169-9674624",
     "items"=>[{"id"=>"28367575711066", "quantity"=>1}]},
   "packages"=>[{"weight"=>5, "length"=>5, "width"=>5, "height"=>5}],
   "shipper"=>"RocketShipIt",
   "ship_addr1"=>"123 Main St",
   "ship_city"=>"Whitehall",
   "ship_state"=>"MT",
   "ship_code"=>"59759",
   "ship_country"=>"US",
   "ship_email"=>"john@doe.com",
   "ship_phone"=>"1231231234",
   "weight_unit"=>"oz"}}

)

rocketshipit.request(
  {
  "carrier": "amazon-mws",
  "action": "GetAllRates",
  "params": {
    "key": "YOUR_SELLER_ID",
    "username": "YOUR_ACCESS_KEY_ID",
    "password": "YOUR_SECRET_KEY",
    "order": {
      "id": "111-7676169-9674624",
      "items": [
        {
          "id": "28367575711066",
          "quantity": 1
        }
      ]
    },
    "packages": [
      {
        "weight": 5,
        "length": 5,
        "width": 5,
        "height": 5
      }
    ],
    "shipper": "RocketShipIt",
    "ship_addr1": "123 Main St",
    "ship_city": "Whitehall",
    "ship_state": "MT",
    "ship_code": "59759",
    "ship_country": "US",
    "ship_email": "john@doe.com",
    "ship_phone": "1231231234",
    "weight_unit": "oz"
  }
}
)
← Back to All Examples