{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"test": true,
"custom_images": [
{
"document": "CommercialInvoice",
"id": "IMAGE_1",
"type": "SIGNATURE"
}
],
"generate_docs": [
"COMMERCIAL_INVOICE",
"NAFTA_CERTIFICATE_OF_ORIGIN"
],
"currency": "CAD",
"packages": [
{
"weight": 5,
"length": 1,
"width": 1,
"height": 1
}
],
"customs": [
{
"customs_quantity_units": "EA",
"customs_quantity": 1,
"customs_line_amount": 50.00,
"country_of_manufacture": "US",
"customs_weight": 2.5,
"customs_description": "My Description",
"customs_hs_tariff": "2000"
},
{
"customs_quantity_units": "EA",
"customs_quantity": 1,
"customs_line_amount": 50.00,
"country_of_manufacture": "US",
"customs_weight": 2.5,
"customs_description": "My Description",
"number_of_packages_per_commodity": 2
}
],
"customs_value": 100.00,
"sold_company": "Acme Inc.",
"sold_name": "John Doe",
"sold_tax_id": "123abc",
"sold_phone": "1231231234",
"sold_addr1": "2000 Meadowvale Rd",
"sold_city": "Toronto",
"sold_state": "ON",
"sold_code": "M1B5K7",
"sold_country": "CA",
"service": "INTERNATIONAL_PRIORITY",
"shipper": "John Doe",
"ship_contact": "John Doe",
"ship_addr1": "2000 Meadowvale Rd",
"ship_city": "Toronto",
"ship_state": "ON",
"ship_code": "M1B5K7",
"ship_country": "CA",
"ship_phone": "1231231234",
"to_attention_name": "John Doe",
"to_name": "John Doe",
"to_addr1": "2300 Southern Blvd",
"to_state": "NY",
"to_city": "Bronx",
"to_code": "10460",
"to_country": "US",
"to_phone": "1231231234",
"image_type": "PNG",
"shipment_description": "xxx",
"packaging_type": "YOUR_PACKAGING",
"pickup_type": "02",
"weight_unit": "LB",
"length_unit": "IN"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'SubmitShipment',
'params' =>
array (
'test' => true,
'custom_images' =>
array (
0 =>
array (
'document' => 'CommercialInvoice',
'id' => 'IMAGE_1',
'type' => 'SIGNATURE',
),
),
'generate_docs' =>
array (
0 => 'COMMERCIAL_INVOICE',
1 => 'NAFTA_CERTIFICATE_OF_ORIGIN',
),
'currency' => 'CAD',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 1,
'width' => 1,
'height' => 1,
),
),
'customs' =>
array (
0 =>
array (
'customs_quantity_units' => 'EA',
'customs_quantity' => 1,
'customs_line_amount' => 50.0,
'country_of_manufacture' => 'US',
'customs_weight' => 2.5,
'customs_description' => 'My Description',
'customs_hs_tariff' => '2000',
),
1 =>
array (
'customs_quantity_units' => 'EA',
'customs_quantity' => 1,
'customs_line_amount' => 50.0,
'country_of_manufacture' => 'US',
'customs_weight' => 2.5,
'customs_description' => 'My Description',
'number_of_packages_per_commodity' => 2,
),
),
'customs_value' => 100.0,
'sold_company' => 'Acme Inc.',
'sold_name' => 'John Doe',
'sold_tax_id' => '123abc',
'sold_phone' => '1231231234',
'sold_addr1' => '2000 Meadowvale Rd',
'sold_city' => 'Toronto',
'sold_state' => 'ON',
'sold_code' => 'M1B5K7',
'sold_country' => 'CA',
'service' => 'INTERNATIONAL_PRIORITY',
'shipper' => 'John Doe',
'ship_contact' => 'John Doe',
'ship_addr1' => '2000 Meadowvale Rd',
'ship_city' => 'Toronto',
'ship_state' => 'ON',
'ship_code' => 'M1B5K7',
'ship_country' => 'CA',
'ship_phone' => '1231231234',
'to_attention_name' => 'John Doe',
'to_name' => 'John Doe',
'to_addr1' => '2300 Southern Blvd',
'to_state' => 'NY',
'to_city' => 'Bronx',
'to_code' => '10460',
'to_country' => 'US',
'to_phone' => '1231231234',
'image_type' => 'PNG',
'shipment_description' => 'xxx',
'packaging_type' => 'YOUR_PACKAGING',
'pickup_type' => '02',
'weight_unit' => 'LB',
'length_unit' => 'IN',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx',
'params': {'currency': 'CAD',
'custom_images': [{'document': 'CommercialInvoice',
'id': 'IMAGE_1',
'type': 'SIGNATURE'}],
'customs': [{'country_of_manufacture': 'US',
'customs_description': 'My Description',
'customs_hs_tariff': '2000',
'customs_line_amount': 50.0,
'customs_quantity': 1,
'customs_quantity_units': 'EA',
'customs_weight': 2.5},
{'country_of_manufacture': 'US',
'customs_description': 'My Description',
'customs_line_amount': 50.0,
'customs_quantity': 1,
'customs_quantity_units': 'EA',
'customs_weight': 2.5,
'number_of_packages_per_commodity': 2}],
'customs_value': 100.0,
'generate_docs': ['COMMERCIAL_INVOICE',
'NAFTA_CERTIFICATE_OF_ORIGIN'],
'image_type': 'PNG',
'length_unit': 'IN',
'packages': [{'height': 1, 'length': 1, 'weight': 5, 'width': 1}],
'packaging_type': 'YOUR_PACKAGING',
'pickup_type': '02',
'service': 'INTERNATIONAL_PRIORITY',
'ship_addr1': '2000 Meadowvale Rd',
'ship_city': 'Toronto',
'ship_code': 'M1B5K7',
'ship_contact': 'John Doe',
'ship_country': 'CA',
'ship_phone': '1231231234',
'ship_state': 'ON',
'shipment_description': 'xxx',
'shipper': 'John Doe',
'sold_addr1': '2000 Meadowvale Rd',
'sold_city': 'Toronto',
'sold_code': 'M1B5K7',
'sold_company': 'Acme Inc.',
'sold_country': 'CA',
'sold_name': 'John Doe',
'sold_phone': '1231231234',
'sold_state': 'ON',
'sold_tax_id': '123abc',
'test': True,
'to_addr1': '2300 Southern Blvd',
'to_attention_name': 'John Doe',
'to_city': 'Bronx',
'to_code': '10460',
'to_country': 'US',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'NY',
'weight_unit': 'LB'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"SubmitShipment",
"params"=>
{"test"=>true,
"custom_images"=>
[{"document"=>"CommercialInvoice", "id"=>"IMAGE_1", "type"=>"SIGNATURE"}],
"generate_docs"=>["COMMERCIAL_INVOICE", "NAFTA_CERTIFICATE_OF_ORIGIN"],
"currency"=>"CAD",
"packages"=>[{"weight"=>5, "length"=>1, "width"=>1, "height"=>1}],
"customs"=>
[{"customs_quantity_units"=>"EA",
"customs_quantity"=>1,
"customs_line_amount"=>50.0,
"country_of_manufacture"=>"US",
"customs_weight"=>2.5,
"customs_description"=>"My Description",
"customs_hs_tariff"=>"2000"},
{"customs_quantity_units"=>"EA",
"customs_quantity"=>1,
"customs_line_amount"=>50.0,
"country_of_manufacture"=>"US",
"customs_weight"=>2.5,
"customs_description"=>"My Description",
"number_of_packages_per_commodity"=>2}],
"customs_value"=>100.0,
"sold_company"=>"Acme Inc.",
"sold_name"=>"John Doe",
"sold_tax_id"=>"123abc",
"sold_phone"=>"1231231234",
"sold_addr1"=>"2000 Meadowvale Rd",
"sold_city"=>"Toronto",
"sold_state"=>"ON",
"sold_code"=>"M1B5K7",
"sold_country"=>"CA",
"service"=>"INTERNATIONAL_PRIORITY",
"shipper"=>"John Doe",
"ship_contact"=>"John Doe",
"ship_addr1"=>"2000 Meadowvale Rd",
"ship_city"=>"Toronto",
"ship_state"=>"ON",
"ship_code"=>"M1B5K7",
"ship_country"=>"CA",
"ship_phone"=>"1231231234",
"to_attention_name"=>"John Doe",
"to_name"=>"John Doe",
"to_addr1"=>"2300 Southern Blvd",
"to_state"=>"NY",
"to_city"=>"Bronx",
"to_code"=>"10460",
"to_country"=>"US",
"to_phone"=>"1231231234",
"image_type"=>"PNG",
"shipment_description"=>"xxx",
"packaging_type"=>"YOUR_PACKAGING",
"pickup_type"=>"02",
"weight_unit"=>"LB",
"length_unit"=>"IN"}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"test": true,
"custom_images": [
{
"document": "CommercialInvoice",
"id": "IMAGE_1",
"type": "SIGNATURE"
}
],
"generate_docs": [
"COMMERCIAL_INVOICE",
"NAFTA_CERTIFICATE_OF_ORIGIN"
],
"currency": "CAD",
"packages": [
{
"weight": 5,
"length": 1,
"width": 1,
"height": 1
}
],
"customs": [
{
"customs_quantity_units": "EA",
"customs_quantity": 1,
"customs_line_amount": 50.00,
"country_of_manufacture": "US",
"customs_weight": 2.5,
"customs_description": "My Description",
"customs_hs_tariff": "2000"
},
{
"customs_quantity_units": "EA",
"customs_quantity": 1,
"customs_line_amount": 50.00,
"country_of_manufacture": "US",
"customs_weight": 2.5,
"customs_description": "My Description",
"number_of_packages_per_commodity": 2
}
],
"customs_value": 100.00,
"sold_company": "Acme Inc.",
"sold_name": "John Doe",
"sold_tax_id": "123abc",
"sold_phone": "1231231234",
"sold_addr1": "2000 Meadowvale Rd",
"sold_city": "Toronto",
"sold_state": "ON",
"sold_code": "M1B5K7",
"sold_country": "CA",
"service": "INTERNATIONAL_PRIORITY",
"shipper": "John Doe",
"ship_contact": "John Doe",
"ship_addr1": "2000 Meadowvale Rd",
"ship_city": "Toronto",
"ship_state": "ON",
"ship_code": "M1B5K7",
"ship_country": "CA",
"ship_phone": "1231231234",
"to_attention_name": "John Doe",
"to_name": "John Doe",
"to_addr1": "2300 Southern Blvd",
"to_state": "NY",
"to_city": "Bronx",
"to_code": "10460",
"to_country": "US",
"to_phone": "1231231234",
"image_type": "PNG",
"shipment_description": "xxx",
"packaging_type": "YOUR_PACKAGING",
"pickup_type": "02",
"weight_unit": "LB",
"length_unit": "IN"
}
}
)