{
"carrier": "amazon",
"action": "SubmitShipment",
"params": {
"client_id": "amzn1.application-oa2-client.abc123",
"client_secret": "your-client-secret",
"refresh_token": "Atzr|your-refresh-token",
"application_id": "AmazonShipping_US",
"packages": [
{
"weight": 5,
"length": 10,
"width": 8,
"height": 4
}
],
"ship_name": "RocketShipIt",
"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": "940 Presidio Ave",
"to_addr2": "#103",
"to_city": "San Francisco",
"to_state": "CA",
"to_code": "94115",
"to_country": "US",
"image_type": "PDF",
"weight_unit": "LB",
"length_unit": "IN"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'amazon',
'action' => 'SubmitShipment',
'params' =>
array (
'client_id' => 'amzn1.application-oa2-client.abc123',
'client_secret' => 'your-client-secret',
'refresh_token' => 'Atzr|your-refresh-token',
'application_id' => 'AmazonShipping_US',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 10,
'width' => 8,
'height' => 4,
),
),
'ship_name' => 'RocketShipIt',
'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' => '940 Presidio Ave',
'to_addr2' => '#103',
'to_city' => 'San Francisco',
'to_state' => 'CA',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'PDF',
'weight_unit' => 'LB',
'length_unit' => 'IN',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'amazon',
'params': {'application_id': 'AmazonShipping_US',
'client_id': 'amzn1.application-oa2-client.abc123',
'client_secret': 'your-client-secret',
'image_type': 'PDF',
'length_unit': 'IN',
'packages': [{'height': 4, 'length': 10, 'weight': 5, 'width': 8}],
'refresh_token': 'Atzr|your-refresh-token',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_name': 'RocketShipIt',
'ship_phone': '1231231234',
'ship_state': 'MT',
'to_addr1': '940 Presidio Ave',
'to_addr2': '#103',
'to_city': 'San Francisco',
'to_code': '94115',
'to_country': 'US',
'to_name': 'John Doe',
'to_state': 'CA',
'weight_unit': 'LB'}}
)
rs.request(
{"carrier"=>"amazon",
"action"=>"SubmitShipment",
"params"=>
{"client_id"=>"amzn1.application-oa2-client.abc123",
"client_secret"=>"your-client-secret",
"refresh_token"=>"Atzr|your-refresh-token",
"application_id"=>"AmazonShipping_US",
"packages"=>[{"weight"=>5, "length"=>10, "width"=>8, "height"=>4}],
"ship_name"=>"RocketShipIt",
"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"=>"940 Presidio Ave",
"to_addr2"=>"#103",
"to_city"=>"San Francisco",
"to_state"=>"CA",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"PDF",
"weight_unit"=>"LB",
"length_unit"=>"IN"}}
)
rocketshipit.request(
{
"carrier": "amazon",
"action": "SubmitShipment",
"params": {
"client_id": "amzn1.application-oa2-client.abc123",
"client_secret": "your-client-secret",
"refresh_token": "Atzr|your-refresh-token",
"application_id": "AmazonShipping_US",
"packages": [
{
"weight": 5,
"length": 10,
"width": 8,
"height": 4
}
],
"ship_name": "RocketShipIt",
"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": "940 Presidio Ave",
"to_addr2": "#103",
"to_city": "San Francisco",
"to_state": "CA",
"to_code": "94115",
"to_country": "US",
"image_type": "PDF",
"weight_unit": "LB",
"length_unit": "IN"
}
}
)