{
"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",
"packages": [
{
"weight": 5,
"length": 10,
"width": 8,
"height": 4,
"reference_value": "ORDER-12345",
"seller_display_name": "My Brand Name"
}
],
"label_attributes": ["PACKAGE_CLIENT_REFERENCE_ID", "SELLER_DISPLAY_NAME"],
"shipper": "RocketShipIt",
"ship_name": "Warehouse",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"ship_country": "US",
"from_name": "Returns Desk",
"from_company": "RocketShipIt",
"from_addr1": "500 Returns Way",
"from_city": "Bozeman",
"from_state": "MT",
"from_code": "59715",
"from_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",
"special_instructions": "Leave with the doorman",
"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',
'service' => 'std-us-swa-mfn',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 10,
'width' => 8,
'height' => 4,
'reference_value' => 'ORDER-12345',
'seller_display_name' => 'My Brand Name',
),
),
'label_attributes' =>
array (
0 => 'PACKAGE_CLIENT_REFERENCE_ID',
1 => 'SELLER_DISPLAY_NAME',
),
'shipper' => 'RocketShipIt',
'ship_name' => 'Warehouse',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'ship_country' => 'US',
'from_name' => 'Returns Desk',
'from_company' => 'RocketShipIt',
'from_addr1' => '500 Returns Way',
'from_city' => 'Bozeman',
'from_state' => 'MT',
'from_code' => '59715',
'from_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',
'special_instructions' => 'Leave with the doorman',
'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',
'from_addr1': '500 Returns Way',
'from_city': 'Bozeman',
'from_code': '59715',
'from_company': 'RocketShipIt',
'from_country': 'US',
'from_name': 'Returns Desk',
'from_state': 'MT',
'image_type': 'PDF',
'label_attributes': ['PACKAGE_CLIENT_REFERENCE_ID',
'SELLER_DISPLAY_NAME'],
'length_unit': 'IN',
'packages': [{'height': 4,
'length': 10,
'reference_value': 'ORDER-12345',
'seller_display_name': 'My Brand Name',
'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': 'Warehouse',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'special_instructions': 'Leave with the doorman',
'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",
"service"=>"std-us-swa-mfn",
"packages"=>
[{"weight"=>5,
"length"=>10,
"width"=>8,
"height"=>4,
"reference_value"=>"ORDER-12345",
"seller_display_name"=>"My Brand Name"}],
"label_attributes"=>["PACKAGE_CLIENT_REFERENCE_ID", "SELLER_DISPLAY_NAME"],
"shipper"=>"RocketShipIt",
"ship_name"=>"Warehouse",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"ship_country"=>"US",
"from_name"=>"Returns Desk",
"from_company"=>"RocketShipIt",
"from_addr1"=>"500 Returns Way",
"from_city"=>"Bozeman",
"from_state"=>"MT",
"from_code"=>"59715",
"from_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",
"special_instructions"=>"Leave with the doorman",
"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",
"service": "std-us-swa-mfn",
"packages": [
{
"weight": 5,
"length": 10,
"width": 8,
"height": 4,
"reference_value": "ORDER-12345",
"seller_display_name": "My Brand Name"
}
],
"label_attributes": ["PACKAGE_CLIENT_REFERENCE_ID", "SELLER_DISPLAY_NAME"],
"shipper": "RocketShipIt",
"ship_name": "Warehouse",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"ship_country": "US",
"from_name": "Returns Desk",
"from_company": "RocketShipIt",
"from_addr1": "500 Returns Way",
"from_city": "Bozeman",
"from_state": "MT",
"from_code": "59715",
"from_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",
"special_instructions": "Leave with the doorman",
"image_type": "PDF",
"weight_unit": "LB",
"length_unit": "IN"
}
}
)