{
"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",
"service": "std-us-swa-mfn",
"order": {
"id": "111-7676169-9674624",
"items": [
{
"id": "28367575711066",
"quantity": 1
}
]
},
"packages": [
{
"weight": 5,
"length": 10,
"width": 8,
"height": 4,
"insured_value": 50
}
],
"ship_name": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"ship_country": "US",
"image_type": "PNG",
"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',
'service' => 'std-us-swa-mfn',
'order' =>
array (
'id' => '111-7676169-9674624',
'items' =>
array (
0 =>
array (
'id' => '28367575711066',
'quantity' => 1,
),
),
),
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 10,
'width' => 8,
'height' => 4,
'insured_value' => 50,
),
),
'ship_name' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'ship_country' => 'US',
'image_type' => 'PNG',
'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': 'PNG',
'length_unit': 'IN',
'order': {'id': '111-7676169-9674624',
'items': [{'id': '28367575711066', 'quantity': 1}]},
'packages': [{'height': 4,
'insured_value': 50,
'length': 10,
'weight': 5,
'width': 8}],
'refresh_token': 'Atzr|your-refresh-token',
'service': 'std-us-swa-mfn',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_name': 'RocketShipIt',
'ship_phone': '1231231234',
'ship_state': 'MT',
'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",
"service"=>"std-us-swa-mfn",
"order"=>
{"id"=>"111-7676169-9674624",
"items"=>[{"id"=>"28367575711066", "quantity"=>1}]},
"packages"=>
[{"weight"=>5,
"length"=>10,
"width"=>8,
"height"=>4,
"insured_value"=>50}],
"ship_name"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"ship_country"=>"US",
"image_type"=>"PNG",
"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",
"service": "std-us-swa-mfn",
"order": {
"id": "111-7676169-9674624",
"items": [
{
"id": "28367575711066",
"quantity": 1
}
]
},
"packages": [
{
"weight": 5,
"length": 10,
"width": 8,
"height": 4,
"insured_value": 50
}
],
"ship_name": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"ship_country": "US",
"image_type": "PNG",
"weight_unit": "LB",
"length_unit": "IN"
}
}
)