Amazon - Sandbox Rates

Carrier
Amazon
Action
Sandbox Rates
{
  "carrier": "amazon",
  "action": "getallrates",
  "params": {
    "client_id": "amzn1.application-oa2-client.abc123",
    "client_secret": "your-client-secret",
    "refresh_token": "Atzr|your-refresh-token",
    "application_id": "AmazonShipping_UK",
    "test": true,
    "packages": [
      {
        "weight": 1.5,
        "length": 30,
        "width": 20,
        "height": 10
      }
    ],
    "ship_name": "RocketShipIt",
    "ship_addr1": "1 Principal Place",
    "ship_city": "London",
    "ship_code": "EC2A 2FA",
    "ship_country": "GB",
    "ship_phone": "02071234567",
    "to_name": "Jane Doe",
    "to_addr1": "10 Downing St",
    "to_city": "London",
    "to_code": "SW1A 2AA",
    "to_country": "GB",
    "weight_unit": "KG",
    "length_unit": "CM"
  }
}

<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
  'carrier' => 'amazon',
  'action' => 'getallrates',
  'params' => 
  array (
    'client_id' => 'amzn1.application-oa2-client.abc123',
    'client_secret' => 'your-client-secret',
    'refresh_token' => 'Atzr|your-refresh-token',
    'application_id' => 'AmazonShipping_UK',
    'test' => true,
    'packages' => 
    array (
      0 => 
      array (
        'weight' => 1.5,
        'length' => 30,
        'width' => 20,
        'height' => 10,
      ),
    ),
    'ship_name' => 'RocketShipIt',
    'ship_addr1' => '1 Principal Place',
    'ship_city' => 'London',
    'ship_code' => 'EC2A 2FA',
    'ship_country' => 'GB',
    'ship_phone' => '02071234567',
    'to_name' => 'Jane Doe',
    'to_addr1' => '10 Downing St',
    'to_city' => 'London',
    'to_code' => 'SW1A 2AA',
    'to_country' => 'GB',
    'weight_unit' => 'KG',
    'length_unit' => 'CM',
  ),
)
);

rs.request(
  {'action': 'getallrates',
 'carrier': 'amazon',
 'params': {'application_id': 'AmazonShipping_UK',
            'client_id': 'amzn1.application-oa2-client.abc123',
            'client_secret': 'your-client-secret',
            'length_unit': 'CM',
            'packages': [{'height': 10,
                          'length': 30,
                          'weight': 1.5,
                          'width': 20}],
            'refresh_token': 'Atzr|your-refresh-token',
            'ship_addr1': '1 Principal Place',
            'ship_city': 'London',
            'ship_code': 'EC2A 2FA',
            'ship_country': 'GB',
            'ship_name': 'RocketShipIt',
            'ship_phone': '02071234567',
            'test': True,
            'to_addr1': '10 Downing St',
            'to_city': 'London',
            'to_code': 'SW1A 2AA',
            'to_country': 'GB',
            'to_name': 'Jane Doe',
            'weight_unit': 'KG'}}

)

rs.request(
  {"carrier"=>"amazon",
 "action"=>"getallrates",
 "params"=>
  {"client_id"=>"amzn1.application-oa2-client.abc123",
   "client_secret"=>"your-client-secret",
   "refresh_token"=>"Atzr|your-refresh-token",
   "application_id"=>"AmazonShipping_UK",
   "test"=>true,
   "packages"=>[{"weight"=>1.5, "length"=>30, "width"=>20, "height"=>10}],
   "ship_name"=>"RocketShipIt",
   "ship_addr1"=>"1 Principal Place",
   "ship_city"=>"London",
   "ship_code"=>"EC2A 2FA",
   "ship_country"=>"GB",
   "ship_phone"=>"02071234567",
   "to_name"=>"Jane Doe",
   "to_addr1"=>"10 Downing St",
   "to_city"=>"London",
   "to_code"=>"SW1A 2AA",
   "to_country"=>"GB",
   "weight_unit"=>"KG",
   "length_unit"=>"CM"}}

)

rocketshipit.request(
  {
  "carrier": "amazon",
  "action": "getallrates",
  "params": {
    "client_id": "amzn1.application-oa2-client.abc123",
    "client_secret": "your-client-secret",
    "refresh_token": "Atzr|your-refresh-token",
    "application_id": "AmazonShipping_UK",
    "test": true,
    "packages": [
      {
        "weight": 1.5,
        "length": 30,
        "width": 20,
        "height": 10
      }
    ],
    "ship_name": "RocketShipIt",
    "ship_addr1": "1 Principal Place",
    "ship_city": "London",
    "ship_code": "EC2A 2FA",
    "ship_country": "GB",
    "ship_phone": "02071234567",
    "to_name": "Jane Doe",
    "to_addr1": "10 Downing St",
    "to_city": "London",
    "to_code": "SW1A 2AA",
    "to_country": "GB",
    "weight_unit": "KG",
    "length_unit": "CM"
  }
}
)

← All Amazon examples