Examples
Amazon MWS - Rates
{
"carrier": "amazon-mws",
"action": "GetAllRates",
"params": {
"key": "YOUR_SELLER_ID",
"username": "YOUR_ACCESS_KEY_ID",
"password": "YOUR_SECRET_KEY",
"order": {
"id": "111-7676169-9674624",
"items": [
{
"id": "28367575711066",
"quantity": 1
}
]
},
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"ship_email": "john@doe.com",
"ship_phone": "1231231234",
"weight_unit": "oz"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'amazon-mws',
'action' => 'GetAllRates',
'params' =>
array (
'key' => 'YOUR_SELLER_ID',
'username' => 'YOUR_ACCESS_KEY_ID',
'password' => 'YOUR_SECRET_KEY',
'order' =>
array (
'id' => '111-7676169-9674624',
'items' =>
array (
0 =>
array (
'id' => '28367575711066',
'quantity' => 1,
),
),
),
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 5,
'width' => 5,
'height' => 5,
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'ship_email' => 'john@doe.com',
'ship_phone' => '1231231234',
'weight_unit' => 'oz',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'amazon-mws',
'params': {'key': 'YOUR_SELLER_ID',
'order': {'id': '111-7676169-9674624',
'items': [{'id': '28367575711066', 'quantity': 1}]},
'packages': [{'height': 5, 'length': 5, 'weight': 5, 'width': 5}],
'password': 'YOUR_SECRET_KEY',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_email': 'john@doe.com',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'username': 'YOUR_ACCESS_KEY_ID',
'weight_unit': 'oz'}}
)
rs.request(
{"carrier"=>"amazon-mws",
"action"=>"GetAllRates",
"params"=>
{"key"=>"YOUR_SELLER_ID",
"username"=>"YOUR_ACCESS_KEY_ID",
"password"=>"YOUR_SECRET_KEY",
"order"=>
{"id"=>"111-7676169-9674624",
"items"=>[{"id"=>"28367575711066", "quantity"=>1}]},
"packages"=>[{"weight"=>5, "length"=>5, "width"=>5, "height"=>5}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"ship_email"=>"john@doe.com",
"ship_phone"=>"1231231234",
"weight_unit"=>"oz"}}
)
rocketshipit.request(
{
"carrier": "amazon-mws",
"action": "GetAllRates",
"params": {
"key": "YOUR_SELLER_ID",
"username": "YOUR_ACCESS_KEY_ID",
"password": "YOUR_SECRET_KEY",
"order": {
"id": "111-7676169-9674624",
"items": [
{
"id": "28367575711066",
"quantity": 1
}
]
},
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"ship_email": "john@doe.com",
"ship_phone": "1231231234",
"weight_unit": "oz"
}
}
)
Asendia - Label
{
"carrier": "Asendia",
"action": "SubmitShipment",
"params": {
"key": "YOUR_ASENDIA_API_KEY",
"account_number": "YOUR_ASENDIA_ACCOUNT_NUMBER",
"username": "YOUR_ASENDIA_USERNAME",
"password": "YOUR_ASENDIA_PASSWORD",
"meter_number": "YOUR_ASENDIA_DATA_SOURCE",
"service": "A105",
"monetary_value": 20.00,
"packages": [
{
"weight": 2,
"length": 5,
"width": 5,
"height": 5
}
],
"customs": [
{
"invoice_line_part_number": "abc123",
"customs_description": "foo",
"invoice_line_value": "10.00",
"customs_quantity": 2
}
],
"shipper": "TEST LABEL",
"ship_addr1": "5333 Zoo Dr",
"ship_city": "Los Angeles",
"ship_state": "CA",
"ship_code": "90027",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "John Doe",
"to_addr1": "73 Harbord Street",
"to_state": "ON",
"to_city": "Toronto",
"to_code": "M5S1G4",
"to_phone": "1231231234",
"to_country": "CA",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'Asendia',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'YOUR_ASENDIA_API_KEY',
'account_number' => 'YOUR_ASENDIA_ACCOUNT_NUMBER',
'username' => 'YOUR_ASENDIA_USERNAME',
'password' => 'YOUR_ASENDIA_PASSWORD',
'meter_number' => 'YOUR_ASENDIA_DATA_SOURCE',
'service' => 'A105',
'monetary_value' => 20.0,
'packages' =>
array (
0 =>
array (
'weight' => 2,
'length' => 5,
'width' => 5,
'height' => 5,
),
),
'customs' =>
array (
0 =>
array (
'invoice_line_part_number' => 'abc123',
'customs_description' => 'foo',
'invoice_line_value' => '10.00',
'customs_quantity' => 2,
),
),
'shipper' => 'TEST LABEL',
'ship_addr1' => '5333 Zoo Dr',
'ship_city' => 'Los Angeles',
'ship_state' => 'CA',
'ship_code' => '90027',
'ship_phone' => '1231231234',
'ship_country' => 'US',
'to_name' => 'John Doe',
'to_addr1' => '73 Harbord Street',
'to_state' => 'ON',
'to_city' => 'Toronto',
'to_code' => 'M5S1G4',
'to_phone' => '1231231234',
'to_country' => 'CA',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'Asendia',
'params': {'account_number': 'YOUR_ASENDIA_ACCOUNT_NUMBER',
'customs': [{'customs_description': 'foo',
'customs_quantity': 2,
'invoice_line_part_number': 'abc123',
'invoice_line_value': '10.00'}],
'key': 'YOUR_ASENDIA_API_KEY',
'meter_number': 'YOUR_ASENDIA_DATA_SOURCE',
'monetary_value': 20.0,
'packages': [{'height': 5, 'length': 5, 'weight': 2, 'width': 5}],
'password': 'YOUR_ASENDIA_PASSWORD',
'service': 'A105',
'ship_addr1': '5333 Zoo Dr',
'ship_city': 'Los Angeles',
'ship_code': '90027',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'CA',
'shipper': 'TEST LABEL',
'test': True,
'to_addr1': '73 Harbord Street',
'to_city': 'Toronto',
'to_code': 'M5S1G4',
'to_country': 'CA',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'ON',
'username': 'YOUR_ASENDIA_USERNAME'}}
)
rs.request(
{"carrier"=>"Asendia",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"YOUR_ASENDIA_API_KEY",
"account_number"=>"YOUR_ASENDIA_ACCOUNT_NUMBER",
"username"=>"YOUR_ASENDIA_USERNAME",
"password"=>"YOUR_ASENDIA_PASSWORD",
"meter_number"=>"YOUR_ASENDIA_DATA_SOURCE",
"service"=>"A105",
"monetary_value"=>20.0,
"packages"=>[{"weight"=>2, "length"=>5, "width"=>5, "height"=>5}],
"customs"=>
[{"invoice_line_part_number"=>"abc123",
"customs_description"=>"foo",
"invoice_line_value"=>"10.00",
"customs_quantity"=>2}],
"shipper"=>"TEST LABEL",
"ship_addr1"=>"5333 Zoo Dr",
"ship_city"=>"Los Angeles",
"ship_state"=>"CA",
"ship_code"=>"90027",
"ship_phone"=>"1231231234",
"ship_country"=>"US",
"to_name"=>"John Doe",
"to_addr1"=>"73 Harbord Street",
"to_state"=>"ON",
"to_city"=>"Toronto",
"to_code"=>"M5S1G4",
"to_phone"=>"1231231234",
"to_country"=>"CA",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "Asendia",
"action": "SubmitShipment",
"params": {
"key": "YOUR_ASENDIA_API_KEY",
"account_number": "YOUR_ASENDIA_ACCOUNT_NUMBER",
"username": "YOUR_ASENDIA_USERNAME",
"password": "YOUR_ASENDIA_PASSWORD",
"meter_number": "YOUR_ASENDIA_DATA_SOURCE",
"service": "A105",
"monetary_value": 20.00,
"packages": [
{
"weight": 2,
"length": 5,
"width": 5,
"height": 5
}
],
"customs": [
{
"invoice_line_part_number": "abc123",
"customs_description": "foo",
"invoice_line_value": "10.00",
"customs_quantity": 2
}
],
"shipper": "TEST LABEL",
"ship_addr1": "5333 Zoo Dr",
"ship_city": "Los Angeles",
"ship_state": "CA",
"ship_code": "90027",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "John Doe",
"to_addr1": "73 Harbord Street",
"to_state": "ON",
"to_city": "Toronto",
"to_code": "M5S1G4",
"to_phone": "1231231234",
"to_country": "CA",
"test": true
}
}
)
Asendia - Rates
{
"carrier": "asendia",
"action": "GetAllRates",
"params": {
"key": "YOUR_ASENDIA_API_KEY",
"account_number": "YOUR_ASENDIA_ACCOUNT_NUMBER",
"username": "YOUR_ASENDIA_USERNAME",
"password": "YOUR_ASENDIA_PASSWORD",
"meter_number": "YOUR_ASENDIA_DATA_SOURCE",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5
}
],
"ship_country": "US",
"to_country": "CA",
"to_code": "V4W1N7",
"weight_unit": "LBS",
"pickup_type": "01",
"length_unit": "IN",
"packaging_type": "02"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'asendia',
'action' => 'GetAllRates',
'params' =>
array (
'key' => 'YOUR_ASENDIA_API_KEY',
'account_number' => 'YOUR_ASENDIA_ACCOUNT_NUMBER',
'username' => 'YOUR_ASENDIA_USERNAME',
'password' => 'YOUR_ASENDIA_PASSWORD',
'meter_number' => 'YOUR_ASENDIA_DATA_SOURCE',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 5,
'width' => 5,
'height' => 5,
),
),
'ship_country' => 'US',
'to_country' => 'CA',
'to_code' => 'V4W1N7',
'weight_unit' => 'LBS',
'pickup_type' => '01',
'length_unit' => 'IN',
'packaging_type' => '02',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'asendia',
'params': {'account_number': 'YOUR_ASENDIA_ACCOUNT_NUMBER',
'key': 'YOUR_ASENDIA_API_KEY',
'length_unit': 'IN',
'meter_number': 'YOUR_ASENDIA_DATA_SOURCE',
'packages': [{'height': 5, 'length': 5, 'weight': 5, 'width': 5}],
'packaging_type': '02',
'password': 'YOUR_ASENDIA_PASSWORD',
'pickup_type': '01',
'ship_country': 'US',
'to_code': 'V4W1N7',
'to_country': 'CA',
'username': 'YOUR_ASENDIA_USERNAME',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"asendia",
"action"=>"GetAllRates",
"params"=>
{"key"=>"YOUR_ASENDIA_API_KEY",
"account_number"=>"YOUR_ASENDIA_ACCOUNT_NUMBER",
"username"=>"YOUR_ASENDIA_USERNAME",
"password"=>"YOUR_ASENDIA_PASSWORD",
"meter_number"=>"YOUR_ASENDIA_DATA_SOURCE",
"packages"=>[{"weight"=>5, "length"=>5, "width"=>5, "height"=>5}],
"ship_country"=>"US",
"to_country"=>"CA",
"to_code"=>"V4W1N7",
"weight_unit"=>"LBS",
"pickup_type"=>"01",
"length_unit"=>"IN",
"packaging_type"=>"02"}}
)
rocketshipit.request(
{
"carrier": "asendia",
"action": "GetAllRates",
"params": {
"key": "YOUR_ASENDIA_API_KEY",
"account_number": "YOUR_ASENDIA_ACCOUNT_NUMBER",
"username": "YOUR_ASENDIA_USERNAME",
"password": "YOUR_ASENDIA_PASSWORD",
"meter_number": "YOUR_ASENDIA_DATA_SOURCE",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5
}
],
"ship_country": "US",
"to_country": "CA",
"to_code": "V4W1N7",
"weight_unit": "LBS",
"pickup_type": "01",
"length_unit": "IN",
"packaging_type": "02"
}
}
)
Asendia - VoidShipment
{
"carrier": "Asendia",
"action": "VoidShipment",
"params": {
"key": "YOUR_ASENDIA_API_KEY",
"account_number": "YOUR_ASENDIA_ACCOUNT_NUMBER",
"username": "YOUR_ASENDIA_USERNAME",
"password": "YOUR_ASENDIA_PASSWORD",
"meter_number": "YOUR_ASENDIA_DATA_SOURCE",
"shipment_id": "123123",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'Asendia',
'action' => 'VoidShipment',
'params' =>
array (
'key' => 'YOUR_ASENDIA_API_KEY',
'account_number' => 'YOUR_ASENDIA_ACCOUNT_NUMBER',
'username' => 'YOUR_ASENDIA_USERNAME',
'password' => 'YOUR_ASENDIA_PASSWORD',
'meter_number' => 'YOUR_ASENDIA_DATA_SOURCE',
'shipment_id' => '123123',
'test' => true,
),
)
);
rs.request(
{'action': 'VoidShipment',
'carrier': 'Asendia',
'params': {'account_number': 'YOUR_ASENDIA_ACCOUNT_NUMBER',
'key': 'YOUR_ASENDIA_API_KEY',
'meter_number': 'YOUR_ASENDIA_DATA_SOURCE',
'password': 'YOUR_ASENDIA_PASSWORD',
'shipment_id': '123123',
'test': True,
'username': 'YOUR_ASENDIA_USERNAME'}}
)
rs.request(
{"carrier"=>"Asendia",
"action"=>"VoidShipment",
"params"=>
{"key"=>"YOUR_ASENDIA_API_KEY",
"account_number"=>"YOUR_ASENDIA_ACCOUNT_NUMBER",
"username"=>"YOUR_ASENDIA_USERNAME",
"password"=>"YOUR_ASENDIA_PASSWORD",
"meter_number"=>"YOUR_ASENDIA_DATA_SOURCE",
"shipment_id"=>"123123",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "Asendia",
"action": "VoidShipment",
"params": {
"key": "YOUR_ASENDIA_API_KEY",
"account_number": "YOUR_ASENDIA_ACCOUNT_NUMBER",
"username": "YOUR_ASENDIA_USERNAME",
"password": "YOUR_ASENDIA_PASSWORD",
"meter_number": "YOUR_ASENDIA_DATA_SOURCE",
"shipment_id": "123123",
"test": true
}
}
)
Batch Request - UPS, FedEx, USPS Rates
{
"batch": [
{
"request_id": "UPS Rates",
"request": {
"carrier": "UPS",
"action": "GetAllRates",
"params": {
"key": "YOUR_UPS_API_KEY",
"account_number": "YOUR_ACCOUNT_NUMBER",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_code": "90210",
"weight_unit": "LBS",
"pickup_type": "01",
"customer_classification": "01",
"length_unit": "IN",
"packaging_type": "02"
}
}
},
{
"request_id": "USPS Rates",
"request": {
"carrier": "USPS",
"action": "GetAllRates",
"params": {
"username": "YOUR_USERNAME",
"packages": [
{
"weight": 6
}
],
"ship_code": "59759",
"to_code": "90210"
}
}
},
{
"request_id": "FedEx Rates",
"request": {
"carrier": "FedEx",
"action": "GetAllRates",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 2
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_code": "90210",
"weight_unit": "LB",
"packaging_type": "YOUR_PACKAGING",
"dropoff_type": "REGULAR_PICKUP",
"test": true,
"negotiated_rates": true
}
}
}
]
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'batch' =>
array (
0 =>
array (
'request_id' => 'UPS Rates',
'request' =>
array (
'carrier' => 'UPS',
'action' => 'GetAllRates',
'params' =>
array (
'key' => 'YOUR_UPS_API_KEY',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 5,
'width' => 5,
'height' => 5,
),
),
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_country' => 'US',
'to_code' => '90210',
'weight_unit' => 'LBS',
'pickup_type' => '01',
'customer_classification' => '01',
'length_unit' => 'IN',
'packaging_type' => '02',
),
),
),
1 =>
array (
'request_id' => 'USPS Rates',
'request' =>
array (
'carrier' => 'USPS',
'action' => 'GetAllRates',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'packages' =>
array (
0 =>
array (
'weight' => 6,
),
),
'ship_code' => '59759',
'to_code' => '90210',
),
),
),
2 =>
array (
'request_id' => 'FedEx Rates',
'request' =>
array (
'carrier' => 'FedEx',
'action' => 'GetAllRates',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 2,
),
),
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_country' => 'US',
'to_code' => '90210',
'weight_unit' => 'LB',
'packaging_type' => 'YOUR_PACKAGING',
'dropoff_type' => 'REGULAR_PICKUP',
'test' => true,
'negotiated_rates' => true,
),
),
),
),
)
);
rs.request(
{'batch': [{'request': {'action': 'GetAllRates',
'carrier': 'UPS',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'customer_classification': '01',
'customs': [],
'key': 'YOUR_UPS_API_KEY',
'length_unit': 'IN',
'packages': [{'height': 5,
'length': 5,
'weight': 5,
'width': 5}],
'packaging_type': '02',
'password': 'YOUR_PASSWORD',
'pickup_type': '01',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'to_code': '90210',
'to_country': 'US',
'username': 'YOUR_USERNAME',
'weight_unit': 'LBS'}},
'request_id': 'UPS Rates'},
{'request': {'action': 'GetAllRates',
'carrier': 'USPS',
'params': {'packages': [{'weight': 6}],
'ship_code': '59759',
'to_code': '90210',
'username': 'YOUR_USERNAME'}},
'request_id': 'USPS Rates'},
{'request': {'action': 'GetAllRates',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'customs': [],
'dropoff_type': 'REGULAR_PICKUP',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'negotiated_rates': True,
'packages': [{'weight': 2}],
'packaging_type': 'YOUR_PACKAGING',
'password': 'YOUR_PASSWORD',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_code': '90210',
'to_country': 'US',
'weight_unit': 'LB'}},
'request_id': 'FedEx Rates'}]}
)
rs.request(
{"batch"=>
[{"request_id"=>"UPS Rates",
"request"=>
{"carrier"=>"UPS",
"action"=>"GetAllRates",
"params"=>
{"key"=>"YOUR_UPS_API_KEY",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"packages"=>[{"weight"=>5, "length"=>5, "width"=>5, "height"=>5}],
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_country"=>"US",
"to_code"=>"90210",
"weight_unit"=>"LBS",
"pickup_type"=>"01",
"customer_classification"=>"01",
"length_unit"=>"IN",
"packaging_type"=>"02"}}},
{"request_id"=>"USPS Rates",
"request"=>
{"carrier"=>"USPS",
"action"=>"GetAllRates",
"params"=>
{"username"=>"YOUR_USERNAME",
"packages"=>[{"weight"=>6}],
"ship_code"=>"59759",
"to_code"=>"90210"}}},
{"request_id"=>"FedEx Rates",
"request"=>
{"carrier"=>"FedEx",
"action"=>"GetAllRates",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"packages"=>[{"weight"=>2}],
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_country"=>"US",
"to_code"=>"90210",
"weight_unit"=>"LB",
"packaging_type"=>"YOUR_PACKAGING",
"dropoff_type"=>"REGULAR_PICKUP",
"test"=>true,
"negotiated_rates"=>true}}}]}
)
rocketshipit.request(
{
"batch": [
{
"request_id": "UPS Rates",
"request": {
"carrier": "UPS",
"action": "GetAllRates",
"params": {
"key": "YOUR_UPS_API_KEY",
"account_number": "YOUR_ACCOUNT_NUMBER",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_code": "90210",
"weight_unit": "LBS",
"pickup_type": "01",
"customer_classification": "01",
"length_unit": "IN",
"packaging_type": "02"
}
}
},
{
"request_id": "USPS Rates",
"request": {
"carrier": "USPS",
"action": "GetAllRates",
"params": {
"username": "YOUR_USERNAME",
"packages": [
{
"weight": 6
}
],
"ship_code": "59759",
"to_code": "90210"
}
}
},
{
"request_id": "FedEx Rates",
"request": {
"carrier": "FedEx",
"action": "GetAllRates",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 2
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_code": "90210",
"weight_unit": "LB",
"packaging_type": "YOUR_PACKAGING",
"dropoff_type": "REGULAR_PICKUP",
"test": true,
"negotiated_rates": true
}
}
}
]
}
)
CH Robinson - Authenticate
{
"carrier": "CHRobinson",
"action": "Authenticate",
"params": {
"client_id": "your-client-id",
"client_secret": "your-client-secret",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'CHRobinson',
'action' => 'Authenticate',
'params' =>
array (
'client_id' => 'your-client-id',
'client_secret' => 'your-client-secret',
'test' => true,
),
)
);
rs.request(
{'action': 'Authenticate',
'carrier': 'CHRobinson',
'params': {'client_id': 'your-client-id',
'client_secret': 'your-client-secret',
'test': True}}
)
rs.request(
{"carrier"=>"CHRobinson",
"action"=>"Authenticate",
"params"=>
{"client_id"=>"your-client-id",
"client_secret"=>"your-client-secret",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "CHRobinson",
"action": "Authenticate",
"params": {
"client_id": "your-client-id",
"client_secret": "your-client-secret",
"test": true
}
}
)
CH Robinson - LTL Freight Rates
{
"carrier": "CHRobinson",
"action": "GetAllRates",
"params": {
"key": "your-key-from-authenticate-request",
"ship_date": "2024-01-22",
"account_number": "1231234",
"test": true,
"packages": [
{
"weight": 200,
"freight_class": "50"
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "14800 Charlson Rd",
"ship_addr2": "Building 1",
"ship_city": "Eden Prairie",
"ship_state": "MN",
"ship_code": "55347",
"ship_country": "US",
"to_addr1": "800 Washington Avenue North",
"to_country": "US",
"to_city": "Minneapolis",
"to_state": "MN",
"to_code": "55401",
"weight_unit": "LB"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'CHRobinson',
'action' => 'GetAllRates',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'ship_date' => '2024-01-22',
'account_number' => '1231234',
'test' => true,
'packages' =>
array (
0 =>
array (
'weight' => 200,
'freight_class' => '50',
),
),
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '14800 Charlson Rd',
'ship_addr2' => 'Building 1',
'ship_city' => 'Eden Prairie',
'ship_state' => 'MN',
'ship_code' => '55347',
'ship_country' => 'US',
'to_addr1' => '800 Washington Avenue North',
'to_country' => 'US',
'to_city' => 'Minneapolis',
'to_state' => 'MN',
'to_code' => '55401',
'weight_unit' => 'LB',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'CHRobinson',
'params': {'account_number': '1231234',
'customs': [],
'key': 'your-key-from-authenticate-request',
'packages': [{'freight_class': '50', 'weight': 200}],
'ship_addr1': '14800 Charlson Rd',
'ship_addr2': 'Building 1',
'ship_city': 'Eden Prairie',
'ship_code': '55347',
'ship_country': 'US',
'ship_date': '2024-01-22',
'ship_state': 'MN',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '800 Washington Avenue North',
'to_city': 'Minneapolis',
'to_code': '55401',
'to_country': 'US',
'to_state': 'MN',
'weight_unit': 'LB'}}
)
rs.request(
{"carrier"=>"CHRobinson",
"action"=>"GetAllRates",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"ship_date"=>"2024-01-22",
"account_number"=>"1231234",
"test"=>true,
"packages"=>[{"weight"=>200, "freight_class"=>"50"}],
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"14800 Charlson Rd",
"ship_addr2"=>"Building 1",
"ship_city"=>"Eden Prairie",
"ship_state"=>"MN",
"ship_code"=>"55347",
"ship_country"=>"US",
"to_addr1"=>"800 Washington Avenue North",
"to_country"=>"US",
"to_city"=>"Minneapolis",
"to_state"=>"MN",
"to_code"=>"55401",
"weight_unit"=>"LB"}}
)
rocketshipit.request(
{
"carrier": "CHRobinson",
"action": "GetAllRates",
"params": {
"key": "your-key-from-authenticate-request",
"ship_date": "2024-01-22",
"account_number": "1231234",
"test": true,
"packages": [
{
"weight": 200,
"freight_class": "50"
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "14800 Charlson Rd",
"ship_addr2": "Building 1",
"ship_city": "Eden Prairie",
"ship_state": "MN",
"ship_code": "55347",
"ship_country": "US",
"to_addr1": "800 Washington Avenue North",
"to_country": "US",
"to_city": "Minneapolis",
"to_state": "MN",
"to_code": "55401",
"weight_unit": "LB"
}
}
)
CH Robinson - Tracking
{
"carrier": "CHRobinson",
"action": "Track",
"params": {
"key": "your-key-from-authenticate-request",
"tracking_number": "20015434520",
"account_number": "your-account-number",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'CHRobinson',
'action' => 'Track',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'tracking_number' => '20015434520',
'account_number' => 'your-account-number',
'test' => true,
),
)
);
rs.request(
{'action': 'Track',
'carrier': 'CHRobinson',
'params': {'account_number': 'your-account-number',
'key': 'your-key-from-authenticate-request',
'test': True,
'tracking_number': '20015434520'}}
)
rs.request(
{"carrier"=>"CHRobinson",
"action"=>"Track",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"tracking_number"=>"20015434520",
"account_number"=>"your-account-number",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "CHRobinson",
"action": "Track",
"params": {
"key": "your-key-from-authenticate-request",
"tracking_number": "20015434520",
"account_number": "your-account-number",
"test": true
}
}
)
Canada Post - Create Manifest
{
"carrier": "Canada",
"action": "CreateManifest",
"params": {
"contract_id": "42708517",
"username": "6e93d53968881714",
"password": "0bfa9fcb9853d1f51ee57a",
"account_number": "2004381",
"group_ids": [
"5432",
"1234"
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"ship_phone": "1231231234",
"ship_country": "CA",
"image_type": "PDF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'Canada',
'action' => 'CreateManifest',
'params' =>
array (
'contract_id' => '42708517',
'username' => '6e93d53968881714',
'password' => '0bfa9fcb9853d1f51ee57a',
'account_number' => '2004381',
'group_ids' =>
array (
0 => '5432',
1 => '1234',
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Ottawa',
'ship_state' => 'ON',
'ship_code' => 'K1A0B1',
'ship_phone' => '1231231234',
'ship_country' => 'CA',
'image_type' => 'PDF',
'test' => true,
),
)
);
rs.request(
{'action': 'CreateManifest',
'carrier': 'Canada',
'params': {'account_number': '2004381',
'contract_id': '42708517',
'group_ids': ['5432', '1234'],
'image_type': 'PDF',
'password': '0bfa9fcb9853d1f51ee57a',
'ship_addr1': '123 Main St',
'ship_city': 'Ottawa',
'ship_code': 'K1A0B1',
'ship_country': 'CA',
'ship_phone': '1231231234',
'ship_state': 'ON',
'shipper': 'RocketShipIt',
'test': True,
'username': '6e93d53968881714'}}
)
rs.request(
{"carrier"=>"Canada",
"action"=>"CreateManifest",
"params"=>
{"contract_id"=>"42708517",
"username"=>"6e93d53968881714",
"password"=>"0bfa9fcb9853d1f51ee57a",
"account_number"=>"2004381",
"group_ids"=>["5432", "1234"],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Ottawa",
"ship_state"=>"ON",
"ship_code"=>"K1A0B1",
"ship_phone"=>"1231231234",
"ship_country"=>"CA",
"image_type"=>"PDF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "Canada",
"action": "CreateManifest",
"params": {
"contract_id": "42708517",
"username": "6e93d53968881714",
"password": "0bfa9fcb9853d1f51ee57a",
"account_number": "2004381",
"group_ids": [
"5432",
"1234"
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"ship_phone": "1231231234",
"ship_country": "CA",
"image_type": "PDF",
"test": true
}
}
)
Canada Post - Label
{
"carrier": "canada",
"action": "SubmitShipment",
"params": {
"packages": [
{
"weight": 4,
"length": 7,
"width": 5,
"height": 5
}
],
"service": "DOM.EP",
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "John Doe",
"to_addr1": "361A Old Finch Avenue",
"to_addr2": "#103",
"to_state": "ON",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_country": "CA",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'canada',
'action' => 'SubmitShipment',
'params' =>
array (
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'width' => 5,
'height' => 5,
),
),
'service' => 'DOM.EP',
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Ottawa',
'ship_state' => 'ON',
'ship_code' => 'K1A0B1',
'ship_phone' => '1231231234',
'ship_country' => 'US',
'to_name' => 'John Doe',
'to_addr1' => '361A Old Finch Avenue',
'to_addr2' => '#103',
'to_state' => 'ON',
'to_city' => 'Toronto',
'to_code' => 'M1B5K7',
'to_country' => 'CA',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'canada',
'params': {'packages': [{'height': 5, 'length': 7, 'weight': 4, 'width': 5}],
'service': 'DOM.EP',
'ship_addr1': '123 Main St',
'ship_city': 'Ottawa',
'ship_code': 'K1A0B1',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'ON',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '361A Old Finch Avenue',
'to_addr2': '#103',
'to_city': 'Toronto',
'to_code': 'M1B5K7',
'to_country': 'CA',
'to_name': 'John Doe',
'to_state': 'ON'}}
)
rs.request(
{"carrier"=>"canada",
"action"=>"SubmitShipment",
"params"=>
{"packages"=>[{"weight"=>4, "length"=>7, "width"=>5, "height"=>5}],
"service"=>"DOM.EP",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Ottawa",
"ship_state"=>"ON",
"ship_code"=>"K1A0B1",
"ship_phone"=>"1231231234",
"ship_country"=>"US",
"to_name"=>"John Doe",
"to_addr1"=>"361A Old Finch Avenue",
"to_addr2"=>"#103",
"to_state"=>"ON",
"to_city"=>"Toronto",
"to_code"=>"M1B5K7",
"to_country"=>"CA",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "canada",
"action": "SubmitShipment",
"params": {
"packages": [
{
"weight": 4,
"length": 7,
"width": 5,
"height": 5
}
],
"service": "DOM.EP",
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "John Doe",
"to_addr1": "361A Old Finch Avenue",
"to_addr2": "#103",
"to_state": "ON",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_country": "CA",
"test": true
}
}
)
Canada Post - Label International
{
"carrier": "canada",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_NUMBER",
"test": true,
"reason_for_export": "SOG",
"customs": [
{
"customs_description": "books",
"customs_weight": 4,
"customs_quantity": 2,
"customs_line_amount": 10.00,
"customs_quantity_units": "EA"
}
],
"packages": [
{
"weight": 30,
"length": 7,
"width": 5,
"height": 5
}
],
"service": "USA.EP",
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"ship_phone": "1231231234",
"ship_country": "CA",
"to_phone": "123-123-1234",
"to_name": "John Doe",
"to_addr1": "940 Presidio Ave",
"to_addr2": "103",
"to_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'canada',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'test' => true,
'reason_for_export' => 'SOG',
'customs' =>
array (
0 =>
array (
'customs_description' => 'books',
'customs_weight' => 4,
'customs_quantity' => 2,
'customs_line_amount' => 10.0,
'customs_quantity_units' => 'EA',
),
),
'packages' =>
array (
0 =>
array (
'weight' => 30,
'length' => 7,
'width' => 5,
'height' => 5,
),
),
'service' => 'USA.EP',
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Ottawa',
'ship_state' => 'ON',
'ship_code' => 'K1A0B1',
'ship_phone' => '1231231234',
'ship_country' => 'CA',
'to_phone' => '123-123-1234',
'to_name' => 'John Doe',
'to_addr1' => '940 Presidio Ave',
'to_addr2' => '103',
'to_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'canada',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'customs': [{'customs_description': 'books',
'customs_line_amount': 10.0,
'customs_quantity': 2,
'customs_quantity_units': 'EA',
'customs_weight': 4}],
'packages': [{'height': 5, 'length': 7, 'weight': 30, 'width': 5}],
'password': 'YOUR_PASSWORD',
'reason_for_export': 'SOG',
'service': 'USA.EP',
'ship_addr1': '123 Main St',
'ship_city': 'Ottawa',
'ship_code': 'K1A0B1',
'ship_country': 'CA',
'ship_phone': '1231231234',
'ship_state': 'ON',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '940 Presidio Ave',
'to_addr2': '103',
'to_city': 'San Francisco',
'to_code': '94115',
'to_country': 'US',
'to_name': 'John Doe',
'to_phone': '123-123-1234',
'to_state': 'CA',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"canada",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"test"=>true,
"reason_for_export"=>"SOG",
"customs"=>
[{"customs_description"=>"books",
"customs_weight"=>4,
"customs_quantity"=>2,
"customs_line_amount"=>10.0,
"customs_quantity_units"=>"EA"}],
"packages"=>[{"weight"=>30, "length"=>7, "width"=>5, "height"=>5}],
"service"=>"USA.EP",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Ottawa",
"ship_state"=>"ON",
"ship_code"=>"K1A0B1",
"ship_phone"=>"1231231234",
"ship_country"=>"CA",
"to_phone"=>"123-123-1234",
"to_name"=>"John Doe",
"to_addr1"=>"940 Presidio Ave",
"to_addr2"=>"103",
"to_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US"}}
)
rocketshipit.request(
{
"carrier": "canada",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_NUMBER",
"test": true,
"reason_for_export": "SOG",
"customs": [
{
"customs_description": "books",
"customs_weight": 4,
"customs_quantity": 2,
"customs_line_amount": 10.00,
"customs_quantity_units": "EA"
}
],
"packages": [
{
"weight": 30,
"length": 7,
"width": 5,
"height": 5
}
],
"service": "USA.EP",
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"ship_phone": "1231231234",
"ship_country": "CA",
"to_phone": "123-123-1234",
"to_name": "John Doe",
"to_addr1": "940 Presidio Ave",
"to_addr2": "103",
"to_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US"
}
}
)
Canada Post - Label Return
{
"carrier": "Canada",
"action": "SubmitShipment",
"params": {
"username": "YOUR_URSERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_NUMBER",
"return_code": "PRINT_RETURN_LABEL",
"service": "DOM.EP",
"packages": [
{
"weight": 2
}
],
"ship_name": "Jane Doe Returner",
"shipper": "Capsule Corp.",
"ship_addr1": "2701 Return Avenue",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"ship_country": "CA",
"to_name": "John Doe",
"to_company": "Receiver of Return",
"to_addr1": "2701 Riverside Drive",
"to_state": "ON",
"to_city": "Ottawa",
"to_code": "K1A0B1",
"to_country": "CA",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'Canada',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_URSERNAME',
'password' => 'YOUR_PASSWORD',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'return_code' => 'PRINT_RETURN_LABEL',
'service' => 'DOM.EP',
'packages' =>
array (
0 =>
array (
'weight' => 2,
),
),
'ship_name' => 'Jane Doe Returner',
'shipper' => 'Capsule Corp.',
'ship_addr1' => '2701 Return Avenue',
'ship_city' => 'Ottawa',
'ship_state' => 'ON',
'ship_code' => 'K1A0B1',
'ship_country' => 'CA',
'to_name' => 'John Doe',
'to_company' => 'Receiver of Return',
'to_addr1' => '2701 Riverside Drive',
'to_state' => 'ON',
'to_city' => 'Ottawa',
'to_code' => 'K1A0B1',
'to_country' => 'CA',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'Canada',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'packages': [{'weight': 2}],
'password': 'YOUR_PASSWORD',
'return_code': 'PRINT_RETURN_LABEL',
'service': 'DOM.EP',
'ship_addr1': '2701 Return Avenue',
'ship_city': 'Ottawa',
'ship_code': 'K1A0B1',
'ship_country': 'CA',
'ship_name': 'Jane Doe Returner',
'ship_state': 'ON',
'shipper': 'Capsule Corp.',
'test': True,
'to_addr1': '2701 Riverside Drive',
'to_city': 'Ottawa',
'to_code': 'K1A0B1',
'to_company': 'Receiver of Return',
'to_country': 'CA',
'to_name': 'John Doe',
'to_state': 'ON',
'username': 'YOUR_URSERNAME'}}
)
rs.request(
{"carrier"=>"Canada",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_URSERNAME",
"password"=>"YOUR_PASSWORD",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"return_code"=>"PRINT_RETURN_LABEL",
"service"=>"DOM.EP",
"packages"=>[{"weight"=>2}],
"ship_name"=>"Jane Doe Returner",
"shipper"=>"Capsule Corp.",
"ship_addr1"=>"2701 Return Avenue",
"ship_city"=>"Ottawa",
"ship_state"=>"ON",
"ship_code"=>"K1A0B1",
"ship_country"=>"CA",
"to_name"=>"John Doe",
"to_company"=>"Receiver of Return",
"to_addr1"=>"2701 Riverside Drive",
"to_state"=>"ON",
"to_city"=>"Ottawa",
"to_code"=>"K1A0B1",
"to_country"=>"CA",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "Canada",
"action": "SubmitShipment",
"params": {
"username": "YOUR_URSERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_NUMBER",
"return_code": "PRINT_RETURN_LABEL",
"service": "DOM.EP",
"packages": [
{
"weight": 2
}
],
"ship_name": "Jane Doe Returner",
"shipper": "Capsule Corp.",
"ship_addr1": "2701 Return Avenue",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"ship_country": "CA",
"to_name": "John Doe",
"to_company": "Receiver of Return",
"to_addr1": "2701 Riverside Drive",
"to_state": "ON",
"to_city": "Ottawa",
"to_code": "K1A0B1",
"to_country": "CA",
"test": true
}
}
)
Canada Post - Label Return with Reference
{
"carrier": "Canada",
"action": "SubmitShipment",
"params": {
"username": "YOUR_URSERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_NUMBER",
"return_code": "PRINT_RETURN_LABEL",
"service": "DOM.EP",
"packages": [
{
"weight": 2,
"reference_value": "my reference value",
"reference_value2": "another reference"
}
],
"ship_name": "Jane Doe Returner",
"shipper": "Capsule Corp.",
"ship_addr1": "2701 Return Avenue",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"ship_country": "CA",
"to_name": "John Doe",
"to_company": "Receiver of Return",
"to_addr1": "2701 Riverside Drive",
"to_state": "ON",
"to_city": "Ottawa",
"to_code": "K1A0B1",
"to_country": "CA",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'Canada',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_URSERNAME',
'password' => 'YOUR_PASSWORD',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'return_code' => 'PRINT_RETURN_LABEL',
'service' => 'DOM.EP',
'packages' =>
array (
0 =>
array (
'weight' => 2,
'reference_value' => 'my reference value',
'reference_value2' => 'another reference',
),
),
'ship_name' => 'Jane Doe Returner',
'shipper' => 'Capsule Corp.',
'ship_addr1' => '2701 Return Avenue',
'ship_city' => 'Ottawa',
'ship_state' => 'ON',
'ship_code' => 'K1A0B1',
'ship_country' => 'CA',
'to_name' => 'John Doe',
'to_company' => 'Receiver of Return',
'to_addr1' => '2701 Riverside Drive',
'to_state' => 'ON',
'to_city' => 'Ottawa',
'to_code' => 'K1A0B1',
'to_country' => 'CA',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'Canada',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'packages': [{'reference_value': 'my reference value',
'reference_value2': 'another reference',
'weight': 2}],
'password': 'YOUR_PASSWORD',
'return_code': 'PRINT_RETURN_LABEL',
'service': 'DOM.EP',
'ship_addr1': '2701 Return Avenue',
'ship_city': 'Ottawa',
'ship_code': 'K1A0B1',
'ship_country': 'CA',
'ship_name': 'Jane Doe Returner',
'ship_state': 'ON',
'shipper': 'Capsule Corp.',
'test': True,
'to_addr1': '2701 Riverside Drive',
'to_city': 'Ottawa',
'to_code': 'K1A0B1',
'to_company': 'Receiver of Return',
'to_country': 'CA',
'to_name': 'John Doe',
'to_state': 'ON',
'username': 'YOUR_URSERNAME'}}
)
rs.request(
{"carrier"=>"Canada",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_URSERNAME",
"password"=>"YOUR_PASSWORD",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"return_code"=>"PRINT_RETURN_LABEL",
"service"=>"DOM.EP",
"packages"=>
[{"weight"=>2,
"reference_value"=>"my reference value",
"reference_value2"=>"another reference"}],
"ship_name"=>"Jane Doe Returner",
"shipper"=>"Capsule Corp.",
"ship_addr1"=>"2701 Return Avenue",
"ship_city"=>"Ottawa",
"ship_state"=>"ON",
"ship_code"=>"K1A0B1",
"ship_country"=>"CA",
"to_name"=>"John Doe",
"to_company"=>"Receiver of Return",
"to_addr1"=>"2701 Riverside Drive",
"to_state"=>"ON",
"to_city"=>"Ottawa",
"to_code"=>"K1A0B1",
"to_country"=>"CA",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "Canada",
"action": "SubmitShipment",
"params": {
"username": "YOUR_URSERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_NUMBER",
"return_code": "PRINT_RETURN_LABEL",
"service": "DOM.EP",
"packages": [
{
"weight": 2,
"reference_value": "my reference value",
"reference_value2": "another reference"
}
],
"ship_name": "Jane Doe Returner",
"shipper": "Capsule Corp.",
"ship_addr1": "2701 Return Avenue",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"ship_country": "CA",
"to_name": "John Doe",
"to_company": "Receiver of Return",
"to_addr1": "2701 Riverside Drive",
"to_state": "ON",
"to_city": "Ottawa",
"to_code": "K1A0B1",
"to_country": "CA",
"test": true
}
}
)
Canada Post - Label Third Party Billing
{
"carrier": "canada",
"action": "SubmitShipment",
"params": {
"contract_id": "42708517",
"username": "6e93d53968881714",
"password": "0bfa9fcb9853d1f51ee57a",
"account_number": "2004381",
"billing": [
{
"type": "transportation",
"payment_type": "third_party",
"account": "1234567"
}
],
"packages": [
{
"weight": 4,
"length": 7,
"width": 5,
"height": 5
}
],
"service": "DOM.EP",
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"ship_phone": "1231231234",
"ship_country": "CA",
"to_name": "John Doe",
"to_addr1": "361A Old Finch Avenue",
"to_addr2": "#103",
"to_state": "ON",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_country": "CA",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'canada',
'action' => 'SubmitShipment',
'params' =>
array (
'contract_id' => '42708517',
'username' => '6e93d53968881714',
'password' => '0bfa9fcb9853d1f51ee57a',
'account_number' => '2004381',
'billing' =>
array (
0 =>
array (
'type' => 'transportation',
'payment_type' => 'third_party',
'account' => '1234567',
),
),
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'width' => 5,
'height' => 5,
),
),
'service' => 'DOM.EP',
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Ottawa',
'ship_state' => 'ON',
'ship_code' => 'K1A0B1',
'ship_phone' => '1231231234',
'ship_country' => 'CA',
'to_name' => 'John Doe',
'to_addr1' => '361A Old Finch Avenue',
'to_addr2' => '#103',
'to_state' => 'ON',
'to_city' => 'Toronto',
'to_code' => 'M1B5K7',
'to_country' => 'CA',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'canada',
'params': {'account_number': '2004381',
'billing': [{'account': '1234567',
'payment_type': 'third_party',
'type': 'transportation'}],
'contract_id': '42708517',
'packages': [{'height': 5, 'length': 7, 'weight': 4, 'width': 5}],
'password': '0bfa9fcb9853d1f51ee57a',
'service': 'DOM.EP',
'ship_addr1': '123 Main St',
'ship_city': 'Ottawa',
'ship_code': 'K1A0B1',
'ship_country': 'CA',
'ship_phone': '1231231234',
'ship_state': 'ON',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '361A Old Finch Avenue',
'to_addr2': '#103',
'to_city': 'Toronto',
'to_code': 'M1B5K7',
'to_country': 'CA',
'to_name': 'John Doe',
'to_state': 'ON',
'username': '6e93d53968881714'}}
)
rs.request(
{"carrier"=>"canada",
"action"=>"SubmitShipment",
"params"=>
{"contract_id"=>"42708517",
"username"=>"6e93d53968881714",
"password"=>"0bfa9fcb9853d1f51ee57a",
"account_number"=>"2004381",
"billing"=>
[{"type"=>"transportation",
"payment_type"=>"third_party",
"account"=>"1234567"}],
"packages"=>[{"weight"=>4, "length"=>7, "width"=>5, "height"=>5}],
"service"=>"DOM.EP",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Ottawa",
"ship_state"=>"ON",
"ship_code"=>"K1A0B1",
"ship_phone"=>"1231231234",
"ship_country"=>"CA",
"to_name"=>"John Doe",
"to_addr1"=>"361A Old Finch Avenue",
"to_addr2"=>"#103",
"to_state"=>"ON",
"to_city"=>"Toronto",
"to_code"=>"M1B5K7",
"to_country"=>"CA",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "canada",
"action": "SubmitShipment",
"params": {
"contract_id": "42708517",
"username": "6e93d53968881714",
"password": "0bfa9fcb9853d1f51ee57a",
"account_number": "2004381",
"billing": [
{
"type": "transportation",
"payment_type": "third_party",
"account": "1234567"
}
],
"packages": [
{
"weight": 4,
"length": 7,
"width": 5,
"height": 5
}
],
"service": "DOM.EP",
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"ship_phone": "1231231234",
"ship_country": "CA",
"to_name": "John Doe",
"to_addr1": "361A Old Finch Avenue",
"to_addr2": "#103",
"to_state": "ON",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_country": "CA",
"test": true
}
}
)
Canada Post - Label with Contract 19+ Signature Required
{
"carrier": "canada",
"action": "SubmitShipment",
"params": {
"addons": [
"PA19"
],
"contract_id": "42708517",
"username": "6e93d53968881714",
"password": "0bfa9fcb9853d1f51ee57a",
"account_number": "2004381",
"packages": [
{
"weight": 4,
"length": 7,
"width": 5,
"height": 5,
"signature_type": "DIRECT"
}
],
"service": "DOM.EP",
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"ship_phone": "1231231234",
"ship_country": "CA",
"to_name": "John Doe",
"to_addr1": "361A Old Finch Avenue",
"to_addr2": "#103",
"to_state": "ON",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_country": "CA",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'canada',
'action' => 'SubmitShipment',
'params' =>
array (
'addons' =>
array (
0 => 'PA19',
),
'contract_id' => '42708517',
'username' => '6e93d53968881714',
'password' => '0bfa9fcb9853d1f51ee57a',
'account_number' => '2004381',
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'width' => 5,
'height' => 5,
'signature_type' => 'DIRECT',
),
),
'service' => 'DOM.EP',
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Ottawa',
'ship_state' => 'ON',
'ship_code' => 'K1A0B1',
'ship_phone' => '1231231234',
'ship_country' => 'CA',
'to_name' => 'John Doe',
'to_addr1' => '361A Old Finch Avenue',
'to_addr2' => '#103',
'to_state' => 'ON',
'to_city' => 'Toronto',
'to_code' => 'M1B5K7',
'to_country' => 'CA',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'canada',
'params': {'account_number': '2004381',
'addons': ['PA19'],
'contract_id': '42708517',
'packages': [{'height': 5,
'length': 7,
'signature_type': 'DIRECT',
'weight': 4,
'width': 5}],
'password': '0bfa9fcb9853d1f51ee57a',
'service': 'DOM.EP',
'ship_addr1': '123 Main St',
'ship_city': 'Ottawa',
'ship_code': 'K1A0B1',
'ship_country': 'CA',
'ship_phone': '1231231234',
'ship_state': 'ON',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '361A Old Finch Avenue',
'to_addr2': '#103',
'to_city': 'Toronto',
'to_code': 'M1B5K7',
'to_country': 'CA',
'to_name': 'John Doe',
'to_state': 'ON',
'username': '6e93d53968881714'}}
)
rs.request(
{"carrier"=>"canada",
"action"=>"SubmitShipment",
"params"=>
{"addons"=>["PA19"],
"contract_id"=>"42708517",
"username"=>"6e93d53968881714",
"password"=>"0bfa9fcb9853d1f51ee57a",
"account_number"=>"2004381",
"packages"=>
[{"weight"=>4,
"length"=>7,
"width"=>5,
"height"=>5,
"signature_type"=>"DIRECT"}],
"service"=>"DOM.EP",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Ottawa",
"ship_state"=>"ON",
"ship_code"=>"K1A0B1",
"ship_phone"=>"1231231234",
"ship_country"=>"CA",
"to_name"=>"John Doe",
"to_addr1"=>"361A Old Finch Avenue",
"to_addr2"=>"#103",
"to_state"=>"ON",
"to_city"=>"Toronto",
"to_code"=>"M1B5K7",
"to_country"=>"CA",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "canada",
"action": "SubmitShipment",
"params": {
"addons": [
"PA19"
],
"contract_id": "42708517",
"username": "6e93d53968881714",
"password": "0bfa9fcb9853d1f51ee57a",
"account_number": "2004381",
"packages": [
{
"weight": 4,
"length": 7,
"width": 5,
"height": 5,
"signature_type": "DIRECT"
}
],
"service": "DOM.EP",
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"ship_phone": "1231231234",
"ship_country": "CA",
"to_name": "John Doe",
"to_addr1": "361A Old Finch Avenue",
"to_addr2": "#103",
"to_state": "ON",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_country": "CA",
"test": true
}
}
)
Canada Post - Label with Contract Signature Required
{
"carrier": "canada",
"action": "SubmitShipment",
"params": {
"contract_id": "42708517",
"username": "6e93d53968881714",
"password": "0bfa9fcb9853d1f51ee57a",
"account_number": "2004381",
"packages": [
{
"weight": 4,
"length": 7,
"width": 5,
"height": 5,
"signature_type": "DIRECT"
}
],
"service": "DOM.EP",
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"ship_phone": "1231231234",
"ship_country": "CA",
"to_name": "John Doe",
"to_addr1": "361A Old Finch Avenue",
"to_addr2": "#103",
"to_state": "ON",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_country": "CA",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'canada',
'action' => 'SubmitShipment',
'params' =>
array (
'contract_id' => '42708517',
'username' => '6e93d53968881714',
'password' => '0bfa9fcb9853d1f51ee57a',
'account_number' => '2004381',
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'width' => 5,
'height' => 5,
'signature_type' => 'DIRECT',
),
),
'service' => 'DOM.EP',
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Ottawa',
'ship_state' => 'ON',
'ship_code' => 'K1A0B1',
'ship_phone' => '1231231234',
'ship_country' => 'CA',
'to_name' => 'John Doe',
'to_addr1' => '361A Old Finch Avenue',
'to_addr2' => '#103',
'to_state' => 'ON',
'to_city' => 'Toronto',
'to_code' => 'M1B5K7',
'to_country' => 'CA',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'canada',
'params': {'account_number': '2004381',
'contract_id': '42708517',
'packages': [{'height': 5,
'length': 7,
'signature_type': 'DIRECT',
'weight': 4,
'width': 5}],
'password': '0bfa9fcb9853d1f51ee57a',
'service': 'DOM.EP',
'ship_addr1': '123 Main St',
'ship_city': 'Ottawa',
'ship_code': 'K1A0B1',
'ship_country': 'CA',
'ship_phone': '1231231234',
'ship_state': 'ON',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '361A Old Finch Avenue',
'to_addr2': '#103',
'to_city': 'Toronto',
'to_code': 'M1B5K7',
'to_country': 'CA',
'to_name': 'John Doe',
'to_state': 'ON',
'username': '6e93d53968881714'}}
)
rs.request(
{"carrier"=>"canada",
"action"=>"SubmitShipment",
"params"=>
{"contract_id"=>"42708517",
"username"=>"6e93d53968881714",
"password"=>"0bfa9fcb9853d1f51ee57a",
"account_number"=>"2004381",
"packages"=>
[{"weight"=>4,
"length"=>7,
"width"=>5,
"height"=>5,
"signature_type"=>"DIRECT"}],
"service"=>"DOM.EP",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Ottawa",
"ship_state"=>"ON",
"ship_code"=>"K1A0B1",
"ship_phone"=>"1231231234",
"ship_country"=>"CA",
"to_name"=>"John Doe",
"to_addr1"=>"361A Old Finch Avenue",
"to_addr2"=>"#103",
"to_state"=>"ON",
"to_city"=>"Toronto",
"to_code"=>"M1B5K7",
"to_country"=>"CA",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "canada",
"action": "SubmitShipment",
"params": {
"contract_id": "42708517",
"username": "6e93d53968881714",
"password": "0bfa9fcb9853d1f51ee57a",
"account_number": "2004381",
"packages": [
{
"weight": 4,
"length": 7,
"width": 5,
"height": 5,
"signature_type": "DIRECT"
}
],
"service": "DOM.EP",
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"ship_phone": "1231231234",
"ship_country": "CA",
"to_name": "John Doe",
"to_addr1": "361A Old Finch Avenue",
"to_addr2": "#103",
"to_state": "ON",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_country": "CA",
"test": true
}
}
)
Canada Post - Label with contract
{
"carrier": "canada",
"action": "SubmitShipment",
"params": {
"contract_id": "42708517",
"username": "6e93d53968881714",
"password": "0bfa9fcb9853d1f51ee57a",
"account_number": "2004381",
"packages": [
{
"weight": 4,
"length": 7,
"width": 5,
"height": 5
}
],
"service": "DOM.EP",
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"ship_phone": "1231231234",
"ship_country": "CA",
"to_name": "John Doe",
"to_addr1": "361A Old Finch Avenue",
"to_addr2": "#103",
"to_state": "ON",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_country": "CA",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'canada',
'action' => 'SubmitShipment',
'params' =>
array (
'contract_id' => '42708517',
'username' => '6e93d53968881714',
'password' => '0bfa9fcb9853d1f51ee57a',
'account_number' => '2004381',
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'width' => 5,
'height' => 5,
),
),
'service' => 'DOM.EP',
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Ottawa',
'ship_state' => 'ON',
'ship_code' => 'K1A0B1',
'ship_phone' => '1231231234',
'ship_country' => 'CA',
'to_name' => 'John Doe',
'to_addr1' => '361A Old Finch Avenue',
'to_addr2' => '#103',
'to_state' => 'ON',
'to_city' => 'Toronto',
'to_code' => 'M1B5K7',
'to_country' => 'CA',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'canada',
'params': {'account_number': '2004381',
'contract_id': '42708517',
'packages': [{'height': 5, 'length': 7, 'weight': 4, 'width': 5}],
'password': '0bfa9fcb9853d1f51ee57a',
'service': 'DOM.EP',
'ship_addr1': '123 Main St',
'ship_city': 'Ottawa',
'ship_code': 'K1A0B1',
'ship_country': 'CA',
'ship_phone': '1231231234',
'ship_state': 'ON',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '361A Old Finch Avenue',
'to_addr2': '#103',
'to_city': 'Toronto',
'to_code': 'M1B5K7',
'to_country': 'CA',
'to_name': 'John Doe',
'to_state': 'ON',
'username': '6e93d53968881714'}}
)
rs.request(
{"carrier"=>"canada",
"action"=>"SubmitShipment",
"params"=>
{"contract_id"=>"42708517",
"username"=>"6e93d53968881714",
"password"=>"0bfa9fcb9853d1f51ee57a",
"account_number"=>"2004381",
"packages"=>[{"weight"=>4, "length"=>7, "width"=>5, "height"=>5}],
"service"=>"DOM.EP",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Ottawa",
"ship_state"=>"ON",
"ship_code"=>"K1A0B1",
"ship_phone"=>"1231231234",
"ship_country"=>"CA",
"to_name"=>"John Doe",
"to_addr1"=>"361A Old Finch Avenue",
"to_addr2"=>"#103",
"to_state"=>"ON",
"to_city"=>"Toronto",
"to_code"=>"M1B5K7",
"to_country"=>"CA",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "canada",
"action": "SubmitShipment",
"params": {
"contract_id": "42708517",
"username": "6e93d53968881714",
"password": "0bfa9fcb9853d1f51ee57a",
"account_number": "2004381",
"packages": [
{
"weight": 4,
"length": 7,
"width": 5,
"height": 5
}
],
"service": "DOM.EP",
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"ship_phone": "1231231234",
"ship_country": "CA",
"to_name": "John Doe",
"to_addr1": "361A Old Finch Avenue",
"to_addr2": "#103",
"to_state": "ON",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_country": "CA",
"test": true
}
}
)
Canada Post - Label with contract (ZPL)
{
"carrier": "canada",
"action": "SubmitShipment",
"params": {
"contract_id": "42708517",
"username": "6e93d53968881714",
"password": "0bfa9fcb9853d1f51ee57a",
"account_number": "2004381",
"image_type": "ZPL",
"packages": [
{
"weight": 4,
"length": 7,
"width": 5,
"height": 5
}
],
"service": "DOM.EP",
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"ship_phone": "1231231234",
"ship_country": "CA",
"to_name": "John Doe",
"to_addr1": "361A Old Finch Avenue",
"to_addr2": "#103",
"to_state": "ON",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_country": "CA",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'canada',
'action' => 'SubmitShipment',
'params' =>
array (
'contract_id' => '42708517',
'username' => '6e93d53968881714',
'password' => '0bfa9fcb9853d1f51ee57a',
'account_number' => '2004381',
'image_type' => 'ZPL',
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'width' => 5,
'height' => 5,
),
),
'service' => 'DOM.EP',
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Ottawa',
'ship_state' => 'ON',
'ship_code' => 'K1A0B1',
'ship_phone' => '1231231234',
'ship_country' => 'CA',
'to_name' => 'John Doe',
'to_addr1' => '361A Old Finch Avenue',
'to_addr2' => '#103',
'to_state' => 'ON',
'to_city' => 'Toronto',
'to_code' => 'M1B5K7',
'to_country' => 'CA',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'canada',
'params': {'account_number': '2004381',
'contract_id': '42708517',
'image_type': 'ZPL',
'packages': [{'height': 5, 'length': 7, 'weight': 4, 'width': 5}],
'password': '0bfa9fcb9853d1f51ee57a',
'service': 'DOM.EP',
'ship_addr1': '123 Main St',
'ship_city': 'Ottawa',
'ship_code': 'K1A0B1',
'ship_country': 'CA',
'ship_phone': '1231231234',
'ship_state': 'ON',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '361A Old Finch Avenue',
'to_addr2': '#103',
'to_city': 'Toronto',
'to_code': 'M1B5K7',
'to_country': 'CA',
'to_name': 'John Doe',
'to_state': 'ON',
'username': '6e93d53968881714'}}
)
rs.request(
{"carrier"=>"canada",
"action"=>"SubmitShipment",
"params"=>
{"contract_id"=>"42708517",
"username"=>"6e93d53968881714",
"password"=>"0bfa9fcb9853d1f51ee57a",
"account_number"=>"2004381",
"image_type"=>"ZPL",
"packages"=>[{"weight"=>4, "length"=>7, "width"=>5, "height"=>5}],
"service"=>"DOM.EP",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Ottawa",
"ship_state"=>"ON",
"ship_code"=>"K1A0B1",
"ship_phone"=>"1231231234",
"ship_country"=>"CA",
"to_name"=>"John Doe",
"to_addr1"=>"361A Old Finch Avenue",
"to_addr2"=>"#103",
"to_state"=>"ON",
"to_city"=>"Toronto",
"to_code"=>"M1B5K7",
"to_country"=>"CA",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "canada",
"action": "SubmitShipment",
"params": {
"contract_id": "42708517",
"username": "6e93d53968881714",
"password": "0bfa9fcb9853d1f51ee57a",
"account_number": "2004381",
"image_type": "ZPL",
"packages": [
{
"weight": 4,
"length": 7,
"width": 5,
"height": 5
}
],
"service": "DOM.EP",
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"ship_phone": "1231231234",
"ship_country": "CA",
"to_name": "John Doe",
"to_addr1": "361A Old Finch Avenue",
"to_addr2": "#103",
"to_state": "ON",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_country": "CA",
"test": true
}
}
)
Canada Post - Pickup Cancel
{
"carrier": "Canada",
"action": "CancelPickup",
"params": {
"pickup_id": "00110215",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'Canada',
'action' => 'CancelPickup',
'params' =>
array (
'pickup_id' => '00110215',
'test' => true,
),
)
);
rs.request(
{'action': 'CancelPickup',
'carrier': 'Canada',
'params': {'pickup_id': '00110215', 'test': True}}
)
rs.request(
{"carrier"=>"Canada",
"action"=>"CancelPickup",
"params"=>{"pickup_id"=>"00110215", "test"=>true}}
)
rocketshipit.request(
{
"carrier": "Canada",
"action": "CancelPickup",
"params": {
"pickup_id": "00110215",
"test": true
}
}
)
Canada Post - Pickup Schedule
{
"carrier": "Canada",
"action": "CreatePickup",
"params": {
"contract_id": "YOUR CONTRACT ID",
"pickup_company_name": "Acme Inc",
"pickup_contact_name": "Mark Sanborn",
"pickup_addr1": "123 Main St",
"pickup_city": "Vancouver",
"pickup_state": "BC",
"pickup_code": "V4W1N7",
"pickup_country": "US",
"pickup_phone": "123-123-1234",
"pickup_email": "john.doe@example.com",
"pickup_quantity": 1,
"pickup_date": "2019-06-20",
"close_time": "17:00",
"ready_time": "15:00",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'Canada',
'action' => 'CreatePickup',
'params' =>
array (
'contract_id' => 'YOUR CONTRACT ID',
'pickup_company_name' => 'Acme Inc',
'pickup_contact_name' => 'Mark Sanborn',
'pickup_addr1' => '123 Main St',
'pickup_city' => 'Vancouver',
'pickup_state' => 'BC',
'pickup_code' => 'V4W1N7',
'pickup_country' => 'US',
'pickup_phone' => '123-123-1234',
'pickup_email' => 'john.doe@example.com',
'pickup_quantity' => 1,
'pickup_date' => '2019-06-20',
'close_time' => '17:00',
'ready_time' => '15:00',
'test' => true,
),
)
);
rs.request(
{'action': 'CreatePickup',
'carrier': 'Canada',
'params': {'close_time': '17:00',
'contract_id': 'YOUR CONTRACT ID',
'pickup_addr1': '123 Main St',
'pickup_city': 'Vancouver',
'pickup_code': 'V4W1N7',
'pickup_company_name': 'Acme Inc',
'pickup_contact_name': 'Mark Sanborn',
'pickup_country': 'US',
'pickup_date': '2019-06-20',
'pickup_email': 'john.doe@example.com',
'pickup_phone': '123-123-1234',
'pickup_quantity': 1,
'pickup_state': 'BC',
'ready_time': '15:00',
'test': True}}
)
rs.request(
{"carrier"=>"Canada",
"action"=>"CreatePickup",
"params"=>
{"contract_id"=>"YOUR CONTRACT ID",
"pickup_company_name"=>"Acme Inc",
"pickup_contact_name"=>"Mark Sanborn",
"pickup_addr1"=>"123 Main St",
"pickup_city"=>"Vancouver",
"pickup_state"=>"BC",
"pickup_code"=>"V4W1N7",
"pickup_country"=>"US",
"pickup_phone"=>"123-123-1234",
"pickup_email"=>"john.doe@example.com",
"pickup_quantity"=>1,
"pickup_date"=>"2019-06-20",
"close_time"=>"17:00",
"ready_time"=>"15:00",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "Canada",
"action": "CreatePickup",
"params": {
"contract_id": "YOUR CONTRACT ID",
"pickup_company_name": "Acme Inc",
"pickup_contact_name": "Mark Sanborn",
"pickup_addr1": "123 Main St",
"pickup_city": "Vancouver",
"pickup_state": "BC",
"pickup_code": "V4W1N7",
"pickup_country": "US",
"pickup_phone": "123-123-1234",
"pickup_email": "john.doe@example.com",
"pickup_quantity": 1,
"pickup_date": "2019-06-20",
"close_time": "17:00",
"ready_time": "15:00",
"test": true
}
}
)
Canada Post - Pickup Status
{
"carrier": "Canada",
"action": "PickupStatus",
"params": {
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'Canada',
'action' => 'PickupStatus',
'params' =>
array (
'test' => true,
),
)
);
rs.request(
{'action': 'PickupStatus', 'carrier': 'Canada', 'params': {'test': True}}
)
rs.request(
{"carrier"=>"Canada", "action"=>"PickupStatus", "params"=>{"test"=>true}}
)
rocketshipit.request(
{
"carrier": "Canada",
"action": "PickupStatus",
"params": {
"test": true
}
}
)
Canada Post - Rate Domestic
{
"carrier": "canada",
"action": "GetAllRates",
"params": {
"test": true,
"packages": [
{
"weight": 2,
"length": 6,
"width": 16,
"height": 26
}
],
"customs": [],
"shipper": "John Doe",
"ship_state": "BC",
"ship_code": "V7A4M1",
"ship_country": "CA",
"to_state": "ON",
"to_code": "L3R9W6",
"to_country": "CA",
"weight_unit": "KG",
"length_unit": "CM"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'canada',
'action' => 'GetAllRates',
'params' =>
array (
'test' => true,
'packages' =>
array (
0 =>
array (
'weight' => 2,
'length' => 6,
'width' => 16,
'height' => 26,
),
),
'customs' =>
array (
),
'shipper' => 'John Doe',
'ship_state' => 'BC',
'ship_code' => 'V7A4M1',
'ship_country' => 'CA',
'to_state' => 'ON',
'to_code' => 'L3R9W6',
'to_country' => 'CA',
'weight_unit' => 'KG',
'length_unit' => 'CM',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'canada',
'params': {'customs': [],
'length_unit': 'CM',
'packages': [{'height': 26, 'length': 6, 'weight': 2, 'width': 16}],
'ship_code': 'V7A4M1',
'ship_country': 'CA',
'ship_state': 'BC',
'shipper': 'John Doe',
'test': True,
'to_code': 'L3R9W6',
'to_country': 'CA',
'to_state': 'ON',
'weight_unit': 'KG'}}
)
rs.request(
{"carrier"=>"canada",
"action"=>"GetAllRates",
"params"=>
{"test"=>true,
"packages"=>[{"weight"=>2, "length"=>6, "width"=>16, "height"=>26}],
"customs"=>[],
"shipper"=>"John Doe",
"ship_state"=>"BC",
"ship_code"=>"V7A4M1",
"ship_country"=>"CA",
"to_state"=>"ON",
"to_code"=>"L3R9W6",
"to_country"=>"CA",
"weight_unit"=>"KG",
"length_unit"=>"CM"}}
)
rocketshipit.request(
{
"carrier": "canada",
"action": "GetAllRates",
"params": {
"test": true,
"packages": [
{
"weight": 2,
"length": 6,
"width": 16,
"height": 26
}
],
"customs": [],
"shipper": "John Doe",
"ship_state": "BC",
"ship_code": "V7A4M1",
"ship_country": "CA",
"to_state": "ON",
"to_code": "L3R9W6",
"to_country": "CA",
"weight_unit": "KG",
"length_unit": "CM"
}
}
)
Canada Post - Rates
{
"carrier": "canada",
"action": "GetAllRates",
"params": {
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5
}
],
"customs": [],
"ship_city": "BELLEVILLE",
"ship_code": "K8N5W6",
"to_country": "US",
"to_code": "90210"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'canada',
'action' => 'GetAllRates',
'params' =>
array (
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 5,
'width' => 5,
'height' => 5,
),
),
'customs' =>
array (
),
'ship_city' => 'BELLEVILLE',
'ship_code' => 'K8N5W6',
'to_country' => 'US',
'to_code' => '90210',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'canada',
'params': {'customs': [],
'packages': [{'height': 5, 'length': 5, 'weight': 5, 'width': 5}],
'ship_city': 'BELLEVILLE',
'ship_code': 'K8N5W6',
'to_code': '90210',
'to_country': 'US'}}
)
rs.request(
{"carrier"=>"canada",
"action"=>"GetAllRates",
"params"=>
{"packages"=>[{"weight"=>5, "length"=>5, "width"=>5, "height"=>5}],
"customs"=>[],
"ship_city"=>"BELLEVILLE",
"ship_code"=>"K8N5W6",
"to_country"=>"US",
"to_code"=>"90210"}}
)
rocketshipit.request(
{
"carrier": "canada",
"action": "GetAllRates",
"params": {
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5
}
],
"customs": [],
"ship_city": "BELLEVILLE",
"ship_code": "K8N5W6",
"to_country": "US",
"to_code": "90210"
}
}
)
Canada Post - Rates Insurance
{
"carrier": "canada",
"action": "GetAllRates",
"params": {
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5,
"insured_value": 700
}
],
"customs": [],
"ship_city": "BELLEVILLE",
"ship_code": "K8N5W6",
"to_country": "US",
"to_code": "90210"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'canada',
'action' => 'GetAllRates',
'params' =>
array (
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 5,
'width' => 5,
'height' => 5,
'insured_value' => 700,
),
),
'customs' =>
array (
),
'ship_city' => 'BELLEVILLE',
'ship_code' => 'K8N5W6',
'to_country' => 'US',
'to_code' => '90210',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'canada',
'params': {'customs': [],
'packages': [{'height': 5,
'insured_value': 700,
'length': 5,
'weight': 5,
'width': 5}],
'ship_city': 'BELLEVILLE',
'ship_code': 'K8N5W6',
'to_code': '90210',
'to_country': 'US'}}
)
rs.request(
{"carrier"=>"canada",
"action"=>"GetAllRates",
"params"=>
{"packages"=>
[{"weight"=>5,
"length"=>5,
"width"=>5,
"height"=>5,
"insured_value"=>700}],
"customs"=>[],
"ship_city"=>"BELLEVILLE",
"ship_code"=>"K8N5W6",
"to_country"=>"US",
"to_code"=>"90210"}}
)
rocketshipit.request(
{
"carrier": "canada",
"action": "GetAllRates",
"params": {
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5,
"insured_value": 700
}
],
"customs": [],
"ship_city": "BELLEVILLE",
"ship_code": "K8N5W6",
"to_country": "US",
"to_code": "90210"
}
}
)
Canada Post - Tracking
{
"carrier": "canada",
"action": "track",
"params": {
"username": "YOUR_URSERNAME",
"password": "YOUR_PASSWORD",
"tracking_number": "1371134583769923",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'canada',
'action' => 'track',
'params' =>
array (
'username' => 'YOUR_URSERNAME',
'password' => 'YOUR_PASSWORD',
'tracking_number' => '1371134583769923',
'test' => true,
),
)
);
rs.request(
{'action': 'track',
'carrier': 'canada',
'params': {'password': 'YOUR_PASSWORD',
'test': True,
'tracking_number': '1371134583769923',
'username': 'YOUR_URSERNAME'}}
)
rs.request(
{"carrier"=>"canada",
"action"=>"track",
"params"=>
{"username"=>"YOUR_URSERNAME",
"password"=>"YOUR_PASSWORD",
"tracking_number"=>"1371134583769923",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "canada",
"action": "track",
"params": {
"username": "YOUR_URSERNAME",
"password": "YOUR_PASSWORD",
"tracking_number": "1371134583769923",
"test": true
}
}
)
Canada Post - Void
{
"carrier": "canada",
"action": "VoidShipment",
"params": {
"username": "YOUR_URSERNAME",
"password": "YOUR_PASSWORD",
"shipment_id": "GT12345678RT",
"ship_email": "me@mycompany.com",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'canada',
'action' => 'VoidShipment',
'params' =>
array (
'username' => 'YOUR_URSERNAME',
'password' => 'YOUR_PASSWORD',
'shipment_id' => 'GT12345678RT',
'ship_email' => 'me@mycompany.com',
'test' => true,
),
)
);
rs.request(
{'action': 'VoidShipment',
'carrier': 'canada',
'params': {'password': 'YOUR_PASSWORD',
'ship_email': 'me@mycompany.com',
'shipment_id': 'GT12345678RT',
'test': True,
'username': 'YOUR_URSERNAME'}}
)
rs.request(
{"carrier"=>"canada",
"action"=>"VoidShipment",
"params"=>
{"username"=>"YOUR_URSERNAME",
"password"=>"YOUR_PASSWORD",
"shipment_id"=>"GT12345678RT",
"ship_email"=>"me@mycompany.com",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "canada",
"action": "VoidShipment",
"params": {
"username": "YOUR_URSERNAME",
"password": "YOUR_PASSWORD",
"shipment_id": "GT12345678RT",
"ship_email": "me@mycompany.com",
"test": true
}
}
)
DHL - CreateManifest GlobalMail
{
"carrier": "dhl-globalmail",
"action": "CreateManifest",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_CLIENT_ID",
"pickup_location": "5300000",
"shipment_ids": [
"99999999999999999999999999999"
]
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'dhl-globalmail',
'action' => 'CreateManifest',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'key' => 'YOUR_CLIENT_ID',
'pickup_location' => '5300000',
'shipment_ids' =>
array (
0 => '99999999999999999999999999999',
),
),
)
);
rs.request(
{'action': 'CreateManifest',
'carrier': 'dhl-globalmail',
'params': {'key': 'YOUR_CLIENT_ID',
'password': 'YOUR_PASSWORD',
'pickup_location': '5300000',
'shipment_ids': ['99999999999999999999999999999'],
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"dhl-globalmail",
"action"=>"CreateManifest",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"key"=>"YOUR_CLIENT_ID",
"pickup_location"=>"5300000",
"shipment_ids"=>["99999999999999999999999999999"]}}
)
rocketshipit.request(
{
"carrier": "dhl-globalmail",
"action": "CreateManifest",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_CLIENT_ID",
"pickup_location": "5300000",
"shipment_ids": [
"99999999999999999999999999999"
]
}
}
)
DHL - GlobalMail International
{
"carrier": "DHL-GlobalMail",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_CLIENT_ID",
"service": "22",
"account_number": "5337502",
"packages": [
{
"weight": 0.3
}
],
"shipper": "Mr. Returns",
"ship_addr1": "5048 264 St",
"ship_city": "Aldergrove",
"ship_state": "BC",
"ship_code": "V4W1N7",
"ship_phone": "123-123-1234",
"to_name": "Joe Bloggs",
"to_addr1": "1234 Main Street",
"to_state": "GA",
"to_city": "Anytown",
"to_code": "30297",
"to_phone": "123-123-1234",
"customs_value": 10
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL-GlobalMail',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'key' => 'YOUR_CLIENT_ID',
'service' => '22',
'account_number' => '5337502',
'packages' =>
array (
0 =>
array (
'weight' => 0.3,
),
),
'shipper' => 'Mr. Returns',
'ship_addr1' => '5048 264 St',
'ship_city' => 'Aldergrove',
'ship_state' => 'BC',
'ship_code' => 'V4W1N7',
'ship_phone' => '123-123-1234',
'to_name' => 'Joe Bloggs',
'to_addr1' => '1234 Main Street',
'to_state' => 'GA',
'to_city' => 'Anytown',
'to_code' => '30297',
'to_phone' => '123-123-1234',
'customs_value' => 10,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'DHL-GlobalMail',
'params': {'account_number': '5337502',
'customs_value': 10,
'key': 'YOUR_CLIENT_ID',
'packages': [{'weight': 0.3}],
'password': 'YOUR_PASSWORD',
'service': '22',
'ship_addr1': '5048 264 St',
'ship_city': 'Aldergrove',
'ship_code': 'V4W1N7',
'ship_phone': '123-123-1234',
'ship_state': 'BC',
'shipper': 'Mr. Returns',
'to_addr1': '1234 Main Street',
'to_city': 'Anytown',
'to_code': '30297',
'to_name': 'Joe Bloggs',
'to_phone': '123-123-1234',
'to_state': 'GA',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"DHL-GlobalMail",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"key"=>"YOUR_CLIENT_ID",
"service"=>"22",
"account_number"=>"5337502",
"packages"=>[{"weight"=>0.3}],
"shipper"=>"Mr. Returns",
"ship_addr1"=>"5048 264 St",
"ship_city"=>"Aldergrove",
"ship_state"=>"BC",
"ship_code"=>"V4W1N7",
"ship_phone"=>"123-123-1234",
"to_name"=>"Joe Bloggs",
"to_addr1"=>"1234 Main Street",
"to_state"=>"GA",
"to_city"=>"Anytown",
"to_code"=>"30297",
"to_phone"=>"123-123-1234",
"customs_value"=>10}}
)
rocketshipit.request(
{
"carrier": "DHL-GlobalMail",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_CLIENT_ID",
"service": "22",
"account_number": "5337502",
"packages": [
{
"weight": 0.3
}
],
"shipper": "Mr. Returns",
"ship_addr1": "5048 264 St",
"ship_city": "Aldergrove",
"ship_state": "BC",
"ship_code": "V4W1N7",
"ship_phone": "123-123-1234",
"to_name": "Joe Bloggs",
"to_addr1": "1234 Main Street",
"to_state": "GA",
"to_city": "Anytown",
"to_code": "30297",
"to_phone": "123-123-1234",
"customs_value": 10
}
}
)
DHL - Label
{
"carrier": "DHL",
"action": "SubmitShipment",
"params": {
"account_number": "803921577",
"packages": [
{
"weight": 4,
"length": 7,
"width": 4,
"height": 4
}
],
"service": "N",
"shipper": "RocketShipIt",
"ship_addr1": "1401 Park Ave",
"ship_city": "Emeryville",
"ship_state": "CA",
"ship_code": "94608",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "John Doe",
"to_addr1": "940 Presidio Ave",
"to_addr2": "#103",
"to_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PDF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL',
'action' => 'SubmitShipment',
'params' =>
array (
'account_number' => '803921577',
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'width' => 4,
'height' => 4,
),
),
'service' => 'N',
'shipper' => 'RocketShipIt',
'ship_addr1' => '1401 Park Ave',
'ship_city' => 'Emeryville',
'ship_state' => 'CA',
'ship_code' => '94608',
'ship_phone' => '1231231234',
'ship_country' => 'US',
'to_name' => 'John Doe',
'to_addr1' => '940 Presidio Ave',
'to_addr2' => '#103',
'to_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'PDF',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'DHL',
'params': {'account_number': '803921577',
'image_type': 'PDF',
'packages': [{'height': 4, 'length': 7, 'weight': 4, 'width': 4}],
'service': 'N',
'ship_addr1': '1401 Park Ave',
'ship_city': 'Emeryville',
'ship_code': '94608',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'CA',
'shipper': 'RocketShipIt',
'test': True,
'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'}}
)
rs.request(
{"carrier"=>"DHL",
"action"=>"SubmitShipment",
"params"=>
{"account_number"=>"803921577",
"packages"=>[{"weight"=>4, "length"=>7, "width"=>4, "height"=>4}],
"service"=>"N",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"1401 Park Ave",
"ship_city"=>"Emeryville",
"ship_state"=>"CA",
"ship_code"=>"94608",
"ship_phone"=>"1231231234",
"ship_country"=>"US",
"to_name"=>"John Doe",
"to_addr1"=>"940 Presidio Ave",
"to_addr2"=>"#103",
"to_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"PDF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "DHL",
"action": "SubmitShipment",
"params": {
"account_number": "803921577",
"packages": [
{
"weight": 4,
"length": 7,
"width": 4,
"height": 4
}
],
"service": "N",
"shipper": "RocketShipIt",
"ship_addr1": "1401 Park Ave",
"ship_city": "Emeryville",
"ship_state": "CA",
"ship_code": "94608",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "John Doe",
"to_addr1": "940 Presidio Ave",
"to_addr2": "#103",
"to_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PDF",
"test": true
}
}
)
DHL - Label Email Notifications
{
"carrier": "DHL",
"action": "SubmitShipment",
"params": {
"account_number": "803921577",
"notify": [
{
"email": "customer@email.com"
}
],
"packages": [
{
"weight": 4,
"length": 7,
"width": 4,
"height": 4
}
],
"service": "D",
"shipper": "RocketShipIt",
"ship_addr1": "1401 Park Ave",
"ship_city": "Emeryville",
"ship_state": "CA",
"ship_code": "94608",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "John Doe",
"to_addr1": "940 Presidio Ave",
"to_addr2": "#103",
"to_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PDF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL',
'action' => 'SubmitShipment',
'params' =>
array (
'account_number' => '803921577',
'notify' =>
array (
0 =>
array (
'email' => 'customer@email.com',
),
),
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'width' => 4,
'height' => 4,
),
),
'service' => 'D',
'shipper' => 'RocketShipIt',
'ship_addr1' => '1401 Park Ave',
'ship_city' => 'Emeryville',
'ship_state' => 'CA',
'ship_code' => '94608',
'ship_phone' => '1231231234',
'ship_country' => 'US',
'to_name' => 'John Doe',
'to_addr1' => '940 Presidio Ave',
'to_addr2' => '#103',
'to_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'PDF',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'DHL',
'params': {'account_number': '803921577',
'image_type': 'PDF',
'notify': [{'email': 'customer@email.com'}],
'packages': [{'height': 4, 'length': 7, 'weight': 4, 'width': 4}],
'service': 'D',
'ship_addr1': '1401 Park Ave',
'ship_city': 'Emeryville',
'ship_code': '94608',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'CA',
'shipper': 'RocketShipIt',
'test': True,
'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'}}
)
rs.request(
{"carrier"=>"DHL",
"action"=>"SubmitShipment",
"params"=>
{"account_number"=>"803921577",
"notify"=>[{"email"=>"customer@email.com"}],
"packages"=>[{"weight"=>4, "length"=>7, "width"=>4, "height"=>4}],
"service"=>"D",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"1401 Park Ave",
"ship_city"=>"Emeryville",
"ship_state"=>"CA",
"ship_code"=>"94608",
"ship_phone"=>"1231231234",
"ship_country"=>"US",
"to_name"=>"John Doe",
"to_addr1"=>"940 Presidio Ave",
"to_addr2"=>"#103",
"to_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"PDF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "DHL",
"action": "SubmitShipment",
"params": {
"account_number": "803921577",
"notify": [
{
"email": "customer@email.com"
}
],
"packages": [
{
"weight": 4,
"length": 7,
"width": 4,
"height": 4
}
],
"service": "D",
"shipper": "RocketShipIt",
"ship_addr1": "1401 Park Ave",
"ship_city": "Emeryville",
"ship_state": "CA",
"ship_code": "94608",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "John Doe",
"to_addr1": "940 Presidio Ave",
"to_addr2": "#103",
"to_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PDF",
"test": true
}
}
)
DHL - Label GlobalMail
{
"carrier": "DHL-GlobalMail",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_PICKUP_ID",
"key": "YOUR_CLIENT_ID",
"service": "81",
"packages": [
{
"weight": 0.3
}
],
"shipper": "Mr. Returns",
"ship_addr1": "1500 South Point Dr.",
"ship_city": "Forrest Park",
"ship_state": "GA",
"ship_code": "30297",
"ship_phone": "123-123-1234",
"to_name": "Joe Bloggs",
"to_addr1": "1234 Main Street",
"to_state": "GA",
"to_city": "Anytown",
"to_code": "30297",
"to_phone": "123-123-1234"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL-GlobalMail',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'account_number' => 'YOUR_ACCOUNT_PICKUP_ID',
'key' => 'YOUR_CLIENT_ID',
'service' => '81',
'packages' =>
array (
0 =>
array (
'weight' => 0.3,
),
),
'shipper' => 'Mr. Returns',
'ship_addr1' => '1500 South Point Dr.',
'ship_city' => 'Forrest Park',
'ship_state' => 'GA',
'ship_code' => '30297',
'ship_phone' => '123-123-1234',
'to_name' => 'Joe Bloggs',
'to_addr1' => '1234 Main Street',
'to_state' => 'GA',
'to_city' => 'Anytown',
'to_code' => '30297',
'to_phone' => '123-123-1234',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'DHL-GlobalMail',
'params': {'account_number': 'YOUR_ACCOUNT_PICKUP_ID',
'key': 'YOUR_CLIENT_ID',
'packages': [{'weight': 0.3}],
'password': 'YOUR_PASSWORD',
'service': '81',
'ship_addr1': '1500 South Point Dr.',
'ship_city': 'Forrest Park',
'ship_code': '30297',
'ship_phone': '123-123-1234',
'ship_state': 'GA',
'shipper': 'Mr. Returns',
'to_addr1': '1234 Main Street',
'to_city': 'Anytown',
'to_code': '30297',
'to_name': 'Joe Bloggs',
'to_phone': '123-123-1234',
'to_state': 'GA',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"DHL-GlobalMail",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"account_number"=>"YOUR_ACCOUNT_PICKUP_ID",
"key"=>"YOUR_CLIENT_ID",
"service"=>"81",
"packages"=>[{"weight"=>0.3}],
"shipper"=>"Mr. Returns",
"ship_addr1"=>"1500 South Point Dr.",
"ship_city"=>"Forrest Park",
"ship_state"=>"GA",
"ship_code"=>"30297",
"ship_phone"=>"123-123-1234",
"to_name"=>"Joe Bloggs",
"to_addr1"=>"1234 Main Street",
"to_state"=>"GA",
"to_city"=>"Anytown",
"to_code"=>"30297",
"to_phone"=>"123-123-1234"}}
)
rocketshipit.request(
{
"carrier": "DHL-GlobalMail",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_PICKUP_ID",
"key": "YOUR_CLIENT_ID",
"service": "81",
"packages": [
{
"weight": 0.3
}
],
"shipper": "Mr. Returns",
"ship_addr1": "1500 South Point Dr.",
"ship_city": "Forrest Park",
"ship_state": "GA",
"ship_code": "30297",
"ship_phone": "123-123-1234",
"to_name": "Joe Bloggs",
"to_addr1": "1234 Main Street",
"to_state": "GA",
"to_city": "Anytown",
"to_code": "30297",
"to_phone": "123-123-1234"
}
}
)
DHL - Label International
{
"carrier": "DHL",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_NUMBER",
"shipment_description": "Fashion goods",
"customs_value": 45.99,
"currency": "EUR",
"trade_terms": "DAP",
"packages": [
{
"weight": 5,
"length": 6,
"width": 7,
"height": 8,
"reference_value": "asdf"
}
],
"shipper": "RocketShipIt",
"ship_addr1": "5684 Bay St",
"ship_city": "Emeryville",
"ship_state": "CA",
"ship_code": "94608",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "Toronto Zoo",
"to_addr1": "2000 Meadowvale Road",
"to_state": "MB",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_phone": "1231231234",
"to_country": "CA",
"test": true,
"service": "P"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'shipment_description' => 'Fashion goods',
'customs_value' => 45.99,
'currency' => 'EUR',
'trade_terms' => 'DAP',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 6,
'width' => 7,
'height' => 8,
'reference_value' => 'asdf',
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '5684 Bay St',
'ship_city' => 'Emeryville',
'ship_state' => 'CA',
'ship_code' => '94608',
'ship_phone' => '1231231234',
'ship_country' => 'US',
'to_name' => 'Toronto Zoo',
'to_addr1' => '2000 Meadowvale Road',
'to_state' => 'MB',
'to_city' => 'Toronto',
'to_code' => 'M1B5K7',
'to_phone' => '1231231234',
'to_country' => 'CA',
'test' => true,
'service' => 'P',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'DHL',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'currency': 'EUR',
'customs_value': 45.99,
'packages': [{'height': 8,
'length': 6,
'reference_value': 'asdf',
'weight': 5,
'width': 7}],
'password': 'YOUR_PASSWORD',
'service': 'P',
'ship_addr1': '5684 Bay St',
'ship_city': 'Emeryville',
'ship_code': '94608',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'CA',
'shipment_description': 'Fashion goods',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '2000 Meadowvale Road',
'to_city': 'Toronto',
'to_code': 'M1B5K7',
'to_country': 'CA',
'to_name': 'Toronto Zoo',
'to_phone': '1231231234',
'to_state': 'MB',
'trade_terms': 'DAP',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"DHL",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"shipment_description"=>"Fashion goods",
"customs_value"=>45.99,
"currency"=>"EUR",
"trade_terms"=>"DAP",
"packages"=>
[{"weight"=>5,
"length"=>6,
"width"=>7,
"height"=>8,
"reference_value"=>"asdf"}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"5684 Bay St",
"ship_city"=>"Emeryville",
"ship_state"=>"CA",
"ship_code"=>"94608",
"ship_phone"=>"1231231234",
"ship_country"=>"US",
"to_name"=>"Toronto Zoo",
"to_addr1"=>"2000 Meadowvale Road",
"to_state"=>"MB",
"to_city"=>"Toronto",
"to_code"=>"M1B5K7",
"to_phone"=>"1231231234",
"to_country"=>"CA",
"test"=>true,
"service"=>"P"}}
)
rocketshipit.request(
{
"carrier": "DHL",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_NUMBER",
"shipment_description": "Fashion goods",
"customs_value": 45.99,
"currency": "EUR",
"trade_terms": "DAP",
"packages": [
{
"weight": 5,
"length": 6,
"width": 7,
"height": 8,
"reference_value": "asdf"
}
],
"shipper": "RocketShipIt",
"ship_addr1": "5684 Bay St",
"ship_city": "Emeryville",
"ship_state": "CA",
"ship_code": "94608",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "Toronto Zoo",
"to_addr1": "2000 Meadowvale Road",
"to_state": "MB",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_phone": "1231231234",
"to_country": "CA",
"test": true,
"service": "P"
}
}
)
DHL - Label International CI
{
"carrier": "DHL",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_NUMBER",
"customs_forms": "CMI",
"invoice": "123",
"invoice_date": "2019-03-19",
"shipment_description": "Fashion goods",
"customs_value": 45.99,
"currency": "EUR",
"trade_terms": "DAP",
"packages": [
{
"weight": 5,
"length": 6,
"width": 7,
"height": 8
}
],
"shipper": "RocketShipIt",
"ship_addr1": "5684 Bay St",
"ship_city": "Emeryville",
"ship_state": "CA",
"ship_code": "94608",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "Toronto Zoo",
"to_addr1": "2000 Meadowvale Road",
"to_state": "MB",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_phone": "1231231234",
"to_country": "CA",
"test": true,
"service": "P",
"reference_value": "asdf",
"customs": [
{
"commodity_code": "cc",
"commodity_name": "cn",
"invoice_line_number": "1",
"invoice_line_part_number": "123",
"invoice_line_description": "My Description",
"customs_line_amount": 45.99,
"customs_origin_country": "CA",
"customs_quantity_units": "EA",
"customs_quantity": 1,
"customs_weight": 10
}
]
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'customs_forms' => 'CMI',
'invoice' => '123',
'invoice_date' => '2019-03-19',
'shipment_description' => 'Fashion goods',
'customs_value' => 45.99,
'currency' => 'EUR',
'trade_terms' => 'DAP',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 6,
'width' => 7,
'height' => 8,
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '5684 Bay St',
'ship_city' => 'Emeryville',
'ship_state' => 'CA',
'ship_code' => '94608',
'ship_phone' => '1231231234',
'ship_country' => 'US',
'to_name' => 'Toronto Zoo',
'to_addr1' => '2000 Meadowvale Road',
'to_state' => 'MB',
'to_city' => 'Toronto',
'to_code' => 'M1B5K7',
'to_phone' => '1231231234',
'to_country' => 'CA',
'test' => true,
'service' => 'P',
'reference_value' => 'asdf',
'customs' =>
array (
0 =>
array (
'commodity_code' => 'cc',
'commodity_name' => 'cn',
'invoice_line_number' => '1',
'invoice_line_part_number' => '123',
'invoice_line_description' => 'My Description',
'customs_line_amount' => 45.99,
'customs_origin_country' => 'CA',
'customs_quantity_units' => 'EA',
'customs_quantity' => 1,
'customs_weight' => 10,
),
),
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'DHL',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'currency': 'EUR',
'customs': [{'commodity_code': 'cc',
'commodity_name': 'cn',
'customs_line_amount': 45.99,
'customs_origin_country': 'CA',
'customs_quantity': 1,
'customs_quantity_units': 'EA',
'customs_weight': 10,
'invoice_line_description': 'My Description',
'invoice_line_number': '1',
'invoice_line_part_number': '123'}],
'customs_forms': 'CMI',
'customs_value': 45.99,
'invoice': '123',
'invoice_date': '2019-03-19',
'packages': [{'height': 8, 'length': 6, 'weight': 5, 'width': 7}],
'password': 'YOUR_PASSWORD',
'reference_value': 'asdf',
'service': 'P',
'ship_addr1': '5684 Bay St',
'ship_city': 'Emeryville',
'ship_code': '94608',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'CA',
'shipment_description': 'Fashion goods',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '2000 Meadowvale Road',
'to_city': 'Toronto',
'to_code': 'M1B5K7',
'to_country': 'CA',
'to_name': 'Toronto Zoo',
'to_phone': '1231231234',
'to_state': 'MB',
'trade_terms': 'DAP',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"DHL",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"customs_forms"=>"CMI",
"invoice"=>"123",
"invoice_date"=>"2019-03-19",
"shipment_description"=>"Fashion goods",
"customs_value"=>45.99,
"currency"=>"EUR",
"trade_terms"=>"DAP",
"packages"=>[{"weight"=>5, "length"=>6, "width"=>7, "height"=>8}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"5684 Bay St",
"ship_city"=>"Emeryville",
"ship_state"=>"CA",
"ship_code"=>"94608",
"ship_phone"=>"1231231234",
"ship_country"=>"US",
"to_name"=>"Toronto Zoo",
"to_addr1"=>"2000 Meadowvale Road",
"to_state"=>"MB",
"to_city"=>"Toronto",
"to_code"=>"M1B5K7",
"to_phone"=>"1231231234",
"to_country"=>"CA",
"test"=>true,
"service"=>"P",
"reference_value"=>"asdf",
"customs"=>
[{"commodity_code"=>"cc",
"commodity_name"=>"cn",
"invoice_line_number"=>"1",
"invoice_line_part_number"=>"123",
"invoice_line_description"=>"My Description",
"customs_line_amount"=>45.99,
"customs_origin_country"=>"CA",
"customs_quantity_units"=>"EA",
"customs_quantity"=>1,
"customs_weight"=>10}]}}
)
rocketshipit.request(
{
"carrier": "DHL",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_NUMBER",
"customs_forms": "CMI",
"invoice": "123",
"invoice_date": "2019-03-19",
"shipment_description": "Fashion goods",
"customs_value": 45.99,
"currency": "EUR",
"trade_terms": "DAP",
"packages": [
{
"weight": 5,
"length": 6,
"width": 7,
"height": 8
}
],
"shipper": "RocketShipIt",
"ship_addr1": "5684 Bay St",
"ship_city": "Emeryville",
"ship_state": "CA",
"ship_code": "94608",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "Toronto Zoo",
"to_addr1": "2000 Meadowvale Road",
"to_state": "MB",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_phone": "1231231234",
"to_country": "CA",
"test": true,
"service": "P",
"reference_value": "asdf",
"customs": [
{
"commodity_code": "cc",
"commodity_name": "cn",
"invoice_line_number": "1",
"invoice_line_part_number": "123",
"invoice_line_description": "My Description",
"customs_line_amount": 45.99,
"customs_origin_country": "CA",
"customs_quantity_units": "EA",
"customs_quantity": 1,
"customs_weight": 10
}
]
}
}
)
DHL - Label International CI Duties and Taxes Paid
{
"carrier": "DHL",
"action": "SubmitShipment",
"params": {
"customs_payment_type": "SENDER",
"customs_account_number": "1234",
"addons": [
"DD"
],
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_NUMBER",
"customs_forms": "CMI",
"invoice": "123",
"invoice_date": "2019-03-19",
"shipment_description": "Fashion goods",
"customs_value": 45.99,
"currency": "EUR",
"trade_terms": "DAP",
"packages": [
{
"weight": 5,
"length": 6,
"width": 7,
"height": 8
}
],
"shipper": "RocketShipIt",
"ship_addr1": "5684 Bay St",
"ship_city": "Emeryville",
"ship_state": "CA",
"ship_code": "94608",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "Toronto Zoo",
"to_addr1": "2000 Meadowvale Road",
"to_state": "MB",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_phone": "1231231234",
"to_country": "CA",
"test": true,
"service": "P",
"reference_value": "asdf",
"customs": [
{
"commodity_code": "cc",
"commodity_name": "cn",
"invoice_line_number": "1",
"invoice_line_part_number": "123",
"invoice_line_description": "My Description",
"customs_line_amount": 45.99,
"customs_origin_country": "CA",
"customs_quantity_units": "EA",
"customs_quantity": 1,
"customs_weight": 10
}
]
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL',
'action' => 'SubmitShipment',
'params' =>
array (
'customs_payment_type' => 'SENDER',
'customs_account_number' => '1234',
'addons' =>
array (
0 => 'DD',
),
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'customs_forms' => 'CMI',
'invoice' => '123',
'invoice_date' => '2019-03-19',
'shipment_description' => 'Fashion goods',
'customs_value' => 45.99,
'currency' => 'EUR',
'trade_terms' => 'DAP',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 6,
'width' => 7,
'height' => 8,
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '5684 Bay St',
'ship_city' => 'Emeryville',
'ship_state' => 'CA',
'ship_code' => '94608',
'ship_phone' => '1231231234',
'ship_country' => 'US',
'to_name' => 'Toronto Zoo',
'to_addr1' => '2000 Meadowvale Road',
'to_state' => 'MB',
'to_city' => 'Toronto',
'to_code' => 'M1B5K7',
'to_phone' => '1231231234',
'to_country' => 'CA',
'test' => true,
'service' => 'P',
'reference_value' => 'asdf',
'customs' =>
array (
0 =>
array (
'commodity_code' => 'cc',
'commodity_name' => 'cn',
'invoice_line_number' => '1',
'invoice_line_part_number' => '123',
'invoice_line_description' => 'My Description',
'customs_line_amount' => 45.99,
'customs_origin_country' => 'CA',
'customs_quantity_units' => 'EA',
'customs_quantity' => 1,
'customs_weight' => 10,
),
),
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'DHL',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'addons': ['DD'],
'currency': 'EUR',
'customs': [{'commodity_code': 'cc',
'commodity_name': 'cn',
'customs_line_amount': 45.99,
'customs_origin_country': 'CA',
'customs_quantity': 1,
'customs_quantity_units': 'EA',
'customs_weight': 10,
'invoice_line_description': 'My Description',
'invoice_line_number': '1',
'invoice_line_part_number': '123'}],
'customs_account_number': '1234',
'customs_forms': 'CMI',
'customs_payment_type': 'SENDER',
'customs_value': 45.99,
'invoice': '123',
'invoice_date': '2019-03-19',
'packages': [{'height': 8, 'length': 6, 'weight': 5, 'width': 7}],
'password': 'YOUR_PASSWORD',
'reference_value': 'asdf',
'service': 'P',
'ship_addr1': '5684 Bay St',
'ship_city': 'Emeryville',
'ship_code': '94608',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'CA',
'shipment_description': 'Fashion goods',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '2000 Meadowvale Road',
'to_city': 'Toronto',
'to_code': 'M1B5K7',
'to_country': 'CA',
'to_name': 'Toronto Zoo',
'to_phone': '1231231234',
'to_state': 'MB',
'trade_terms': 'DAP',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"DHL",
"action"=>"SubmitShipment",
"params"=>
{"customs_payment_type"=>"SENDER",
"customs_account_number"=>"1234",
"addons"=>["DD"],
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"customs_forms"=>"CMI",
"invoice"=>"123",
"invoice_date"=>"2019-03-19",
"shipment_description"=>"Fashion goods",
"customs_value"=>45.99,
"currency"=>"EUR",
"trade_terms"=>"DAP",
"packages"=>[{"weight"=>5, "length"=>6, "width"=>7, "height"=>8}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"5684 Bay St",
"ship_city"=>"Emeryville",
"ship_state"=>"CA",
"ship_code"=>"94608",
"ship_phone"=>"1231231234",
"ship_country"=>"US",
"to_name"=>"Toronto Zoo",
"to_addr1"=>"2000 Meadowvale Road",
"to_state"=>"MB",
"to_city"=>"Toronto",
"to_code"=>"M1B5K7",
"to_phone"=>"1231231234",
"to_country"=>"CA",
"test"=>true,
"service"=>"P",
"reference_value"=>"asdf",
"customs"=>
[{"commodity_code"=>"cc",
"commodity_name"=>"cn",
"invoice_line_number"=>"1",
"invoice_line_part_number"=>"123",
"invoice_line_description"=>"My Description",
"customs_line_amount"=>45.99,
"customs_origin_country"=>"CA",
"customs_quantity_units"=>"EA",
"customs_quantity"=>1,
"customs_weight"=>10}]}}
)
rocketshipit.request(
{
"carrier": "DHL",
"action": "SubmitShipment",
"params": {
"customs_payment_type": "SENDER",
"customs_account_number": "1234",
"addons": [
"DD"
],
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_NUMBER",
"customs_forms": "CMI",
"invoice": "123",
"invoice_date": "2019-03-19",
"shipment_description": "Fashion goods",
"customs_value": 45.99,
"currency": "EUR",
"trade_terms": "DAP",
"packages": [
{
"weight": 5,
"length": 6,
"width": 7,
"height": 8
}
],
"shipper": "RocketShipIt",
"ship_addr1": "5684 Bay St",
"ship_city": "Emeryville",
"ship_state": "CA",
"ship_code": "94608",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "Toronto Zoo",
"to_addr1": "2000 Meadowvale Road",
"to_state": "MB",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_phone": "1231231234",
"to_country": "CA",
"test": true,
"service": "P",
"reference_value": "asdf",
"customs": [
{
"commodity_code": "cc",
"commodity_name": "cn",
"invoice_line_number": "1",
"invoice_line_part_number": "123",
"invoice_line_description": "My Description",
"customs_line_amount": 45.99,
"customs_origin_country": "CA",
"customs_quantity_units": "EA",
"customs_quantity": 1,
"customs_weight": 10
}
]
}
}
)
DHL - Label International EOR VAT for EU ICS2 and VAT22
{
"carrier": "DHL",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_NUMBER",
"ship_tax_id": "15724854",
"ship_tax_id_type": "EOR",
"ship_tax_id_country": "US",
"ship_tax_id2": "5432523452342",
"ship_tax_id_type2": "VAT",
"ship_tax_id_country2": "US",
"to_tax_id": "15724854",
"to_tax_id_type": "EOR",
"to_tax_id_country": "US",
"to_tax_id2": "5432523452342",
"to_tax_id_type2": "VAT",
"to_tax_id_country2": "US",
"packages": [
{
"length": 17,
"width": 15,
"height": 13,
"weight": 18.0,
"reference_value": "C-8PDMV3"
}
],
"package_description": "C-8PDMV3",
"invoice": "C-8PDMV3",
"customs": [
{
"commodity_code": "000000",
"commodity_name": "cn",
"customs_description": "Acme product 1",
"invoice_line_description": "Acme product 1",
"customs_quantity": 1,
"customs_quantity_units": "PCS",
"customs_weight": 6.0,
"customs_value": 79.99,
"customs_line_amount": 79.99,
"customs_origin_country": "US",
"customs_hs_tariff": "000000",
"country_of_manufacture": "US"
},
{
"commodity_code": "000000",
"commodity_name": "cn",
"customs_description": "Acme Product 1",
"invoice_line_description": "Acme Product 1",
"customs_quantity": 1,
"customs_quantity_units": "PCS",
"customs_weight": 6.0,
"customs_value": 23.99,
"customs_line_amount": 23.99,
"customs_origin_country": "US",
"customs_hs_tariff": "000000",
"country_of_manufacture": "US"
},
{
"commodity_code": "000000",
"commodity_name": "cn",
"customs_description": "Acme Product 1",
"invoice_line_description": "Acme Product 1",
"customs_quantity": 1,
"customs_quantity_units": "PCS",
"customs_weight": 6.0,
"customs_value": 135.99,
"customs_line_amount": 135.99,
"customs_origin_country": "US",
"customs_hs_tariff": "000000",
"country_of_manufacture": "US"
}
],
"customs_forms": "CMI",
"customs_value": 239.97,
"currency": "USD",
"weight_unit": "LB",
"length_unit": "IN",
"request_archive_doc": true,
"shipper": "Acme",
"ship_contact": "John Doe",
"ship_name": "John Doe",
"ship_addr1": "123 Not a Real Address st",
"ship_addr2": "",
"ship_city": "Opa-Locka",
"ship_state": "FL",
"ship_code": "33054",
"ship_country": "US",
"ship_phone": "+12366288450",
"to_country": "KY",
"to_name": "Jane Doe",
"to_code": null,
"to_addr1": "123 West Bay Road",
"to_addr2": "Caribbean Plaza, North Building",
"to_city": "George Town",
"to_phone": "+12359286260",
"shipment_description": "Product description",
"pickup_type": "01",
"customer_classification": "01",
"packaging_type": "02",
"test": true,
"to_state": null,
"label_stock_type": "8X4_thermal",
"bill_country": "XC",
"billing": [
{
"account": "YOUR BILLING ACCOUNT NUMBER"
}
],
"trade_terms": "DDU",
"customs_payment_type": "RECEIVER",
"insured_value": 239.97,
"addons": [
"II"
],
"image_type": "pdf",
"service": "P"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'ship_tax_id' => '15724854',
'ship_tax_id_type' => 'EOR',
'ship_tax_id_country' => 'US',
'ship_tax_id2' => '5432523452342',
'ship_tax_id_type2' => 'VAT',
'ship_tax_id_country2' => 'US',
'to_tax_id' => '15724854',
'to_tax_id_type' => 'EOR',
'to_tax_id_country' => 'US',
'to_tax_id2' => '5432523452342',
'to_tax_id_type2' => 'VAT',
'to_tax_id_country2' => 'US',
'packages' =>
array (
0 =>
array (
'length' => 17,
'width' => 15,
'height' => 13,
'weight' => 18.0,
'reference_value' => 'C-8PDMV3',
),
),
'package_description' => 'C-8PDMV3',
'invoice' => 'C-8PDMV3',
'customs' =>
array (
0 =>
array (
'commodity_code' => '000000',
'commodity_name' => 'cn',
'customs_description' => 'Acme product 1',
'invoice_line_description' => 'Acme product 1',
'customs_quantity' => 1,
'customs_quantity_units' => 'PCS',
'customs_weight' => 6.0,
'customs_value' => 79.99,
'customs_line_amount' => 79.99,
'customs_origin_country' => 'US',
'customs_hs_tariff' => '000000',
'country_of_manufacture' => 'US',
),
1 =>
array (
'commodity_code' => '000000',
'commodity_name' => 'cn',
'customs_description' => 'Acme Product 1',
'invoice_line_description' => 'Acme Product 1',
'customs_quantity' => 1,
'customs_quantity_units' => 'PCS',
'customs_weight' => 6.0,
'customs_value' => 23.99,
'customs_line_amount' => 23.99,
'customs_origin_country' => 'US',
'customs_hs_tariff' => '000000',
'country_of_manufacture' => 'US',
),
2 =>
array (
'commodity_code' => '000000',
'commodity_name' => 'cn',
'customs_description' => 'Acme Product 1',
'invoice_line_description' => 'Acme Product 1',
'customs_quantity' => 1,
'customs_quantity_units' => 'PCS',
'customs_weight' => 6.0,
'customs_value' => 135.99,
'customs_line_amount' => 135.99,
'customs_origin_country' => 'US',
'customs_hs_tariff' => '000000',
'country_of_manufacture' => 'US',
),
),
'customs_forms' => 'CMI',
'customs_value' => 239.97,
'currency' => 'USD',
'weight_unit' => 'LB',
'length_unit' => 'IN',
'request_archive_doc' => true,
'shipper' => 'Acme',
'ship_contact' => 'John Doe',
'ship_name' => 'John Doe',
'ship_addr1' => '123 Not a Real Address st',
'ship_addr2' => '',
'ship_city' => 'Opa-Locka',
'ship_state' => 'FL',
'ship_code' => '33054',
'ship_country' => 'US',
'ship_phone' => '+12366288450',
'to_country' => 'KY',
'to_name' => 'Jane Doe',
'to_code' => NULL,
'to_addr1' => '123 West Bay Road',
'to_addr2' => 'Caribbean Plaza, North Building',
'to_city' => 'George Town',
'to_phone' => '+12359286260',
'shipment_description' => 'Product description',
'pickup_type' => '01',
'customer_classification' => '01',
'packaging_type' => '02',
'test' => true,
'to_state' => NULL,
'label_stock_type' => '8X4_thermal',
'bill_country' => 'XC',
'billing' =>
array (
0 =>
array (
'account' => 'YOUR BILLING ACCOUNT NUMBER',
),
),
'trade_terms' => 'DDU',
'customs_payment_type' => 'RECEIVER',
'insured_value' => 239.97,
'addons' =>
array (
0 => 'II',
),
'image_type' => 'pdf',
'service' => 'P',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'DHL',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'addons': ['II'],
'bill_country': 'XC',
'billing': [{'account': 'YOUR BILLING ACCOUNT NUMBER'}],
'currency': 'USD',
'customer_classification': '01',
'customs': [{'commodity_code': '000000',
'commodity_name': 'cn',
'country_of_manufacture': 'US',
'customs_description': 'Acme product 1',
'customs_hs_tariff': '000000',
'customs_line_amount': 79.99,
'customs_origin_country': 'US',
'customs_quantity': 1,
'customs_quantity_units': 'PCS',
'customs_value': 79.99,
'customs_weight': 6.0,
'invoice_line_description': 'Acme product 1'},
{'commodity_code': '000000',
'commodity_name': 'cn',
'country_of_manufacture': 'US',
'customs_description': 'Acme Product 1',
'customs_hs_tariff': '000000',
'customs_line_amount': 23.99,
'customs_origin_country': 'US',
'customs_quantity': 1,
'customs_quantity_units': 'PCS',
'customs_value': 23.99,
'customs_weight': 6.0,
'invoice_line_description': 'Acme Product 1'},
{'commodity_code': '000000',
'commodity_name': 'cn',
'country_of_manufacture': 'US',
'customs_description': 'Acme Product 1',
'customs_hs_tariff': '000000',
'customs_line_amount': 135.99,
'customs_origin_country': 'US',
'customs_quantity': 1,
'customs_quantity_units': 'PCS',
'customs_value': 135.99,
'customs_weight': 6.0,
'invoice_line_description': 'Acme Product 1'}],
'customs_forms': 'CMI',
'customs_payment_type': 'RECEIVER',
'customs_value': 239.97,
'image_type': 'pdf',
'insured_value': 239.97,
'invoice': 'C-8PDMV3',
'label_stock_type': '8X4_thermal',
'length_unit': 'IN',
'package_description': 'C-8PDMV3',
'packages': [{'height': 13,
'length': 17,
'reference_value': 'C-8PDMV3',
'weight': 18.0,
'width': 15}],
'packaging_type': '02',
'password': 'YOUR_PASSWORD',
'pickup_type': '01',
'request_archive_doc': True,
'service': 'P',
'ship_addr1': '123 Not a Real Address st',
'ship_addr2': '',
'ship_city': 'Opa-Locka',
'ship_code': '33054',
'ship_contact': 'John Doe',
'ship_country': 'US',
'ship_name': 'John Doe',
'ship_phone': '+12366288450',
'ship_state': 'FL',
'ship_tax_id': '15724854',
'ship_tax_id2': '5432523452342',
'ship_tax_id_country': 'US',
'ship_tax_id_country2': 'US',
'ship_tax_id_type': 'EOR',
'ship_tax_id_type2': 'VAT',
'shipment_description': 'Product description',
'shipper': 'Acme',
'test': True,
'to_addr1': '123 West Bay Road',
'to_addr2': 'Caribbean Plaza, North Building',
'to_city': 'George Town',
'to_code': None,
'to_country': 'KY',
'to_name': 'Jane Doe',
'to_phone': '+12359286260',
'to_state': None,
'to_tax_id': '15724854',
'to_tax_id2': '5432523452342',
'to_tax_id_country': 'US',
'to_tax_id_country2': 'US',
'to_tax_id_type': 'EOR',
'to_tax_id_type2': 'VAT',
'trade_terms': 'DDU',
'username': 'YOUR_USERNAME',
'weight_unit': 'LB'}}
)
rs.request(
{"carrier"=>"DHL",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"ship_tax_id"=>"15724854",
"ship_tax_id_type"=>"EOR",
"ship_tax_id_country"=>"US",
"ship_tax_id2"=>"5432523452342",
"ship_tax_id_type2"=>"VAT",
"ship_tax_id_country2"=>"US",
"to_tax_id"=>"15724854",
"to_tax_id_type"=>"EOR",
"to_tax_id_country"=>"US",
"to_tax_id2"=>"5432523452342",
"to_tax_id_type2"=>"VAT",
"to_tax_id_country2"=>"US",
"packages"=>
[{"length"=>17,
"width"=>15,
"height"=>13,
"weight"=>18.0,
"reference_value"=>"C-8PDMV3"}],
"package_description"=>"C-8PDMV3",
"invoice"=>"C-8PDMV3",
"customs"=>
[{"commodity_code"=>"000000",
"commodity_name"=>"cn",
"customs_description"=>"Acme product 1",
"invoice_line_description"=>"Acme product 1",
"customs_quantity"=>1,
"customs_quantity_units"=>"PCS",
"customs_weight"=>6.0,
"customs_value"=>79.99,
"customs_line_amount"=>79.99,
"customs_origin_country"=>"US",
"customs_hs_tariff"=>"000000",
"country_of_manufacture"=>"US"},
{"commodity_code"=>"000000",
"commodity_name"=>"cn",
"customs_description"=>"Acme Product 1",
"invoice_line_description"=>"Acme Product 1",
"customs_quantity"=>1,
"customs_quantity_units"=>"PCS",
"customs_weight"=>6.0,
"customs_value"=>23.99,
"customs_line_amount"=>23.99,
"customs_origin_country"=>"US",
"customs_hs_tariff"=>"000000",
"country_of_manufacture"=>"US"},
{"commodity_code"=>"000000",
"commodity_name"=>"cn",
"customs_description"=>"Acme Product 1",
"invoice_line_description"=>"Acme Product 1",
"customs_quantity"=>1,
"customs_quantity_units"=>"PCS",
"customs_weight"=>6.0,
"customs_value"=>135.99,
"customs_line_amount"=>135.99,
"customs_origin_country"=>"US",
"customs_hs_tariff"=>"000000",
"country_of_manufacture"=>"US"}],
"customs_forms"=>"CMI",
"customs_value"=>239.97,
"currency"=>"USD",
"weight_unit"=>"LB",
"length_unit"=>"IN",
"request_archive_doc"=>true,
"shipper"=>"Acme",
"ship_contact"=>"John Doe",
"ship_name"=>"John Doe",
"ship_addr1"=>"123 Not a Real Address st",
"ship_addr2"=>"",
"ship_city"=>"Opa-Locka",
"ship_state"=>"FL",
"ship_code"=>"33054",
"ship_country"=>"US",
"ship_phone"=>"+12366288450",
"to_country"=>"KY",
"to_name"=>"Jane Doe",
"to_code"=>nil,
"to_addr1"=>"123 West Bay Road",
"to_addr2"=>"Caribbean Plaza, North Building",
"to_city"=>"George Town",
"to_phone"=>"+12359286260",
"shipment_description"=>"Product description",
"pickup_type"=>"01",
"customer_classification"=>"01",
"packaging_type"=>"02",
"test"=>true,
"to_state"=>nil,
"label_stock_type"=>"8X4_thermal",
"bill_country"=>"XC",
"billing"=>[{"account"=>"YOUR BILLING ACCOUNT NUMBER"}],
"trade_terms"=>"DDU",
"customs_payment_type"=>"RECEIVER",
"insured_value"=>239.97,
"addons"=>["II"],
"image_type"=>"pdf",
"service"=>"P"}}
)
rocketshipit.request(
{
"carrier": "DHL",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_NUMBER",
"ship_tax_id": "15724854",
"ship_tax_id_type": "EOR",
"ship_tax_id_country": "US",
"ship_tax_id2": "5432523452342",
"ship_tax_id_type2": "VAT",
"ship_tax_id_country2": "US",
"to_tax_id": "15724854",
"to_tax_id_type": "EOR",
"to_tax_id_country": "US",
"to_tax_id2": "5432523452342",
"to_tax_id_type2": "VAT",
"to_tax_id_country2": "US",
"packages": [
{
"length": 17,
"width": 15,
"height": 13,
"weight": 18.0,
"reference_value": "C-8PDMV3"
}
],
"package_description": "C-8PDMV3",
"invoice": "C-8PDMV3",
"customs": [
{
"commodity_code": "000000",
"commodity_name": "cn",
"customs_description": "Acme product 1",
"invoice_line_description": "Acme product 1",
"customs_quantity": 1,
"customs_quantity_units": "PCS",
"customs_weight": 6.0,
"customs_value": 79.99,
"customs_line_amount": 79.99,
"customs_origin_country": "US",
"customs_hs_tariff": "000000",
"country_of_manufacture": "US"
},
{
"commodity_code": "000000",
"commodity_name": "cn",
"customs_description": "Acme Product 1",
"invoice_line_description": "Acme Product 1",
"customs_quantity": 1,
"customs_quantity_units": "PCS",
"customs_weight": 6.0,
"customs_value": 23.99,
"customs_line_amount": 23.99,
"customs_origin_country": "US",
"customs_hs_tariff": "000000",
"country_of_manufacture": "US"
},
{
"commodity_code": "000000",
"commodity_name": "cn",
"customs_description": "Acme Product 1",
"invoice_line_description": "Acme Product 1",
"customs_quantity": 1,
"customs_quantity_units": "PCS",
"customs_weight": 6.0,
"customs_value": 135.99,
"customs_line_amount": 135.99,
"customs_origin_country": "US",
"customs_hs_tariff": "000000",
"country_of_manufacture": "US"
}
],
"customs_forms": "CMI",
"customs_value": 239.97,
"currency": "USD",
"weight_unit": "LB",
"length_unit": "IN",
"request_archive_doc": true,
"shipper": "Acme",
"ship_contact": "John Doe",
"ship_name": "John Doe",
"ship_addr1": "123 Not a Real Address st",
"ship_addr2": "",
"ship_city": "Opa-Locka",
"ship_state": "FL",
"ship_code": "33054",
"ship_country": "US",
"ship_phone": "+12366288450",
"to_country": "KY",
"to_name": "Jane Doe",
"to_code": null,
"to_addr1": "123 West Bay Road",
"to_addr2": "Caribbean Plaza, North Building",
"to_city": "George Town",
"to_phone": "+12359286260",
"shipment_description": "Product description",
"pickup_type": "01",
"customer_classification": "01",
"packaging_type": "02",
"test": true,
"to_state": null,
"label_stock_type": "8X4_thermal",
"bill_country": "XC",
"billing": [
{
"account": "YOUR BILLING ACCOUNT NUMBER"
}
],
"trade_terms": "DDU",
"customs_payment_type": "RECEIVER",
"insured_value": 239.97,
"addons": [
"II"
],
"image_type": "pdf",
"service": "P"
}
}
)
DHL - Label International Local Product Code
{
"carrier": "DHL",
"action": "SubmitShipment",
"params": {
"username": "",
"password": "",
"account_number": "",
"shipper": "Your Company",
"ship_contact": "Your Name",
"ship_addr1": "Sanhedria Murchevet 102\/8",
"ship_city": "Jerusalem",
"ship_code": "9770602",
"ship_phone": "+9723128183524",
"ship_country": "IL",
"to_name": "John Doe",
"to_addr1": "1415 E 12TH ST",
"to_state": "NY",
"to_city": "BROOKLYN",
"to_code": "11230-6605",
"to_country": "US",
"packages": [
{
"weight": 0.5,
"length": 1,
"width": 1,
"height": 1,
"reference_value": "SYK"
}
],
"local_service": "E",
"service": "X",
"image_type": "PDF",
"currency": "USD",
"documents_only": true,
"request_archive_doc": true,
"packaging_type": "EE",
"shipment_description": "Documents",
"customs_value": 0,
"trade_terms": "DAP"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => '',
'password' => '',
'account_number' => '',
'shipper' => 'Your Company',
'ship_contact' => 'Your Name',
'ship_addr1' => 'Sanhedria Murchevet 102/8',
'ship_city' => 'Jerusalem',
'ship_code' => '9770602',
'ship_phone' => '+9723128183524',
'ship_country' => 'IL',
'to_name' => 'John Doe',
'to_addr1' => '1415 E 12TH ST',
'to_state' => 'NY',
'to_city' => 'BROOKLYN',
'to_code' => '11230-6605',
'to_country' => 'US',
'packages' =>
array (
0 =>
array (
'weight' => 0.5,
'length' => 1,
'width' => 1,
'height' => 1,
'reference_value' => 'SYK',
),
),
'local_service' => 'E',
'service' => 'X',
'image_type' => 'PDF',
'currency' => 'USD',
'documents_only' => true,
'request_archive_doc' => true,
'packaging_type' => 'EE',
'shipment_description' => 'Documents',
'customs_value' => 0,
'trade_terms' => 'DAP',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'DHL',
'params': {'account_number': '',
'currency': 'USD',
'customs_value': 0,
'documents_only': True,
'image_type': 'PDF',
'local_service': 'E',
'packages': [{'height': 1,
'length': 1,
'reference_value': 'SYK',
'weight': 0.5,
'width': 1}],
'packaging_type': 'EE',
'password': '',
'request_archive_doc': True,
'service': 'X',
'ship_addr1': 'Sanhedria Murchevet 102/8',
'ship_city': 'Jerusalem',
'ship_code': '9770602',
'ship_contact': 'Your Name',
'ship_country': 'IL',
'ship_phone': '+9723128183524',
'shipment_description': 'Documents',
'shipper': 'Your Company',
'to_addr1': '1415 E 12TH ST',
'to_city': 'BROOKLYN',
'to_code': '11230-6605',
'to_country': 'US',
'to_name': 'John Doe',
'to_state': 'NY',
'trade_terms': 'DAP',
'username': ''}}
)
rs.request(
{"carrier"=>"DHL",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"",
"password"=>"",
"account_number"=>"",
"shipper"=>"Your Company",
"ship_contact"=>"Your Name",
"ship_addr1"=>"Sanhedria Murchevet 102/8",
"ship_city"=>"Jerusalem",
"ship_code"=>"9770602",
"ship_phone"=>"+9723128183524",
"ship_country"=>"IL",
"to_name"=>"John Doe",
"to_addr1"=>"1415 E 12TH ST",
"to_state"=>"NY",
"to_city"=>"BROOKLYN",
"to_code"=>"11230-6605",
"to_country"=>"US",
"packages"=>
[{"weight"=>0.5,
"length"=>1,
"width"=>1,
"height"=>1,
"reference_value"=>"SYK"}],
"local_service"=>"E",
"service"=>"X",
"image_type"=>"PDF",
"currency"=>"USD",
"documents_only"=>true,
"request_archive_doc"=>true,
"packaging_type"=>"EE",
"shipment_description"=>"Documents",
"customs_value"=>0,
"trade_terms"=>"DAP"}}
)
rocketshipit.request(
{
"carrier": "DHL",
"action": "SubmitShipment",
"params": {
"username": "",
"password": "",
"account_number": "",
"shipper": "Your Company",
"ship_contact": "Your Name",
"ship_addr1": "Sanhedria Murchevet 102\/8",
"ship_city": "Jerusalem",
"ship_code": "9770602",
"ship_phone": "+9723128183524",
"ship_country": "IL",
"to_name": "John Doe",
"to_addr1": "1415 E 12TH ST",
"to_state": "NY",
"to_city": "BROOKLYN",
"to_code": "11230-6605",
"to_country": "US",
"packages": [
{
"weight": 0.5,
"length": 1,
"width": 1,
"height": 1,
"reference_value": "SYK"
}
],
"local_service": "E",
"service": "X",
"image_type": "PDF",
"currency": "USD",
"documents_only": true,
"request_archive_doc": true,
"packaging_type": "EE",
"shipment_description": "Documents",
"customs_value": 0,
"trade_terms": "DAP"
}
}
)
DHL - Label Third Party Billing
{
"carrier": "DHL",
"action": "SubmitShipment",
"params": {
"account_number": "803921577",
"billing": [
{
"type": "transportation",
"payment_type": "third_party",
"account": "abc123"
}
],
"packages": [
{
"weight": 4,
"length": 7,
"width": 4,
"height": 4
}
],
"service": "N",
"shipper": "RocketShipIt",
"ship_addr1": "1401 Park Ave",
"ship_city": "Emeryville",
"ship_state": "CA",
"ship_code": "94608",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "John Doe",
"to_addr1": "940 Presidio Ave",
"to_addr2": "#103",
"to_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PDF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL',
'action' => 'SubmitShipment',
'params' =>
array (
'account_number' => '803921577',
'billing' =>
array (
0 =>
array (
'type' => 'transportation',
'payment_type' => 'third_party',
'account' => 'abc123',
),
),
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'width' => 4,
'height' => 4,
),
),
'service' => 'N',
'shipper' => 'RocketShipIt',
'ship_addr1' => '1401 Park Ave',
'ship_city' => 'Emeryville',
'ship_state' => 'CA',
'ship_code' => '94608',
'ship_phone' => '1231231234',
'ship_country' => 'US',
'to_name' => 'John Doe',
'to_addr1' => '940 Presidio Ave',
'to_addr2' => '#103',
'to_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'PDF',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'DHL',
'params': {'account_number': '803921577',
'billing': [{'account': 'abc123',
'payment_type': 'third_party',
'type': 'transportation'}],
'image_type': 'PDF',
'packages': [{'height': 4, 'length': 7, 'weight': 4, 'width': 4}],
'service': 'N',
'ship_addr1': '1401 Park Ave',
'ship_city': 'Emeryville',
'ship_code': '94608',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'CA',
'shipper': 'RocketShipIt',
'test': True,
'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'}}
)
rs.request(
{"carrier"=>"DHL",
"action"=>"SubmitShipment",
"params"=>
{"account_number"=>"803921577",
"billing"=>
[{"type"=>"transportation",
"payment_type"=>"third_party",
"account"=>"abc123"}],
"packages"=>[{"weight"=>4, "length"=>7, "width"=>4, "height"=>4}],
"service"=>"N",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"1401 Park Ave",
"ship_city"=>"Emeryville",
"ship_state"=>"CA",
"ship_code"=>"94608",
"ship_phone"=>"1231231234",
"ship_country"=>"US",
"to_name"=>"John Doe",
"to_addr1"=>"940 Presidio Ave",
"to_addr2"=>"#103",
"to_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"PDF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "DHL",
"action": "SubmitShipment",
"params": {
"account_number": "803921577",
"billing": [
{
"type": "transportation",
"payment_type": "third_party",
"account": "abc123"
}
],
"packages": [
{
"weight": 4,
"length": 7,
"width": 4,
"height": 4
}
],
"service": "N",
"shipper": "RocketShipIt",
"ship_addr1": "1401 Park Ave",
"ship_city": "Emeryville",
"ship_state": "CA",
"ship_code": "94608",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "John Doe",
"to_addr1": "940 Presidio Ave",
"to_addr2": "#103",
"to_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PDF",
"test": true
}
}
)
DHL - Label with Insurance
{
"carrier": "DHL",
"action": "SubmitShipment",
"params": {
"account_number": "803921577",
"addons": [
"II"
],
"insured_value": 1000.00,
"insured_currenty": "USD",
"packages": [
{
"weight": 4,
"length": 7,
"width": 4,
"height": 4
}
],
"service": "N",
"shipper": "RocketShipIt",
"ship_addr1": "1401 Park Ave",
"ship_city": "Emeryville",
"ship_state": "CA",
"ship_code": "94608",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "John Doe",
"to_addr1": "940 Presidio Ave",
"to_addr2": "#103",
"to_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PDF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL',
'action' => 'SubmitShipment',
'params' =>
array (
'account_number' => '803921577',
'addons' =>
array (
0 => 'II',
),
'insured_value' => 1000.0,
'insured_currenty' => 'USD',
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'width' => 4,
'height' => 4,
),
),
'service' => 'N',
'shipper' => 'RocketShipIt',
'ship_addr1' => '1401 Park Ave',
'ship_city' => 'Emeryville',
'ship_state' => 'CA',
'ship_code' => '94608',
'ship_phone' => '1231231234',
'ship_country' => 'US',
'to_name' => 'John Doe',
'to_addr1' => '940 Presidio Ave',
'to_addr2' => '#103',
'to_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'PDF',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'DHL',
'params': {'account_number': '803921577',
'addons': ['II'],
'image_type': 'PDF',
'insured_currenty': 'USD',
'insured_value': 1000.0,
'packages': [{'height': 4, 'length': 7, 'weight': 4, 'width': 4}],
'service': 'N',
'ship_addr1': '1401 Park Ave',
'ship_city': 'Emeryville',
'ship_code': '94608',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'CA',
'shipper': 'RocketShipIt',
'test': True,
'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'}}
)
rs.request(
{"carrier"=>"DHL",
"action"=>"SubmitShipment",
"params"=>
{"account_number"=>"803921577",
"addons"=>["II"],
"insured_value"=>1000.0,
"insured_currenty"=>"USD",
"packages"=>[{"weight"=>4, "length"=>7, "width"=>4, "height"=>4}],
"service"=>"N",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"1401 Park Ave",
"ship_city"=>"Emeryville",
"ship_state"=>"CA",
"ship_code"=>"94608",
"ship_phone"=>"1231231234",
"ship_country"=>"US",
"to_name"=>"John Doe",
"to_addr1"=>"940 Presidio Ave",
"to_addr2"=>"#103",
"to_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"PDF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "DHL",
"action": "SubmitShipment",
"params": {
"account_number": "803921577",
"addons": [
"II"
],
"insured_value": 1000.00,
"insured_currenty": "USD",
"packages": [
{
"weight": 4,
"length": 7,
"width": 4,
"height": 4
}
],
"service": "N",
"shipper": "RocketShipIt",
"ship_addr1": "1401 Park Ave",
"ship_city": "Emeryville",
"ship_state": "CA",
"ship_code": "94608",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "John Doe",
"to_addr1": "940 Presidio Ave",
"to_addr2": "#103",
"to_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PDF",
"test": true
}
}
)
DHL - Label with Waybill Doc
{
"carrier": "DHL",
"action": "SubmitShipment",
"params": {
"request_archive_doc": true,
"account_number": "803921577",
"packages": [
{
"weight": 4,
"length": 7,
"width": 4,
"height": 4
}
],
"service": "N",
"shipper": "RocketShipIt",
"ship_addr1": "1401 Park Ave",
"ship_city": "Emeryville",
"ship_state": "CA",
"ship_code": "94608",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "John Doe",
"to_addr1": "940 Presidio Ave",
"to_addr2": "#103",
"to_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PDF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL',
'action' => 'SubmitShipment',
'params' =>
array (
'request_archive_doc' => true,
'account_number' => '803921577',
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'width' => 4,
'height' => 4,
),
),
'service' => 'N',
'shipper' => 'RocketShipIt',
'ship_addr1' => '1401 Park Ave',
'ship_city' => 'Emeryville',
'ship_state' => 'CA',
'ship_code' => '94608',
'ship_phone' => '1231231234',
'ship_country' => 'US',
'to_name' => 'John Doe',
'to_addr1' => '940 Presidio Ave',
'to_addr2' => '#103',
'to_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'PDF',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'DHL',
'params': {'account_number': '803921577',
'image_type': 'PDF',
'packages': [{'height': 4, 'length': 7, 'weight': 4, 'width': 4}],
'request_archive_doc': True,
'service': 'N',
'ship_addr1': '1401 Park Ave',
'ship_city': 'Emeryville',
'ship_code': '94608',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'CA',
'shipper': 'RocketShipIt',
'test': True,
'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'}}
)
rs.request(
{"carrier"=>"DHL",
"action"=>"SubmitShipment",
"params"=>
{"request_archive_doc"=>true,
"account_number"=>"803921577",
"packages"=>[{"weight"=>4, "length"=>7, "width"=>4, "height"=>4}],
"service"=>"N",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"1401 Park Ave",
"ship_city"=>"Emeryville",
"ship_state"=>"CA",
"ship_code"=>"94608",
"ship_phone"=>"1231231234",
"ship_country"=>"US",
"to_name"=>"John Doe",
"to_addr1"=>"940 Presidio Ave",
"to_addr2"=>"#103",
"to_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"PDF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "DHL",
"action": "SubmitShipment",
"params": {
"request_archive_doc": true,
"account_number": "803921577",
"packages": [
{
"weight": 4,
"length": 7,
"width": 4,
"height": 4
}
],
"service": "N",
"shipper": "RocketShipIt",
"ship_addr1": "1401 Park Ave",
"ship_city": "Emeryville",
"ship_state": "CA",
"ship_code": "94608",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "John Doe",
"to_addr1": "940 Presidio Ave",
"to_addr2": "#103",
"to_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PDF",
"test": true
}
}
)
DHL - Label with reference
{
"carrier": "DHL",
"action": "SubmitShipment",
"params": {
"packages": [
{
"weight": 4,
"length": 7,
"width": 1,
"height": 1,
"reference_value": "asdf"
}
],
"service": "N",
"shipper": "RocketShipIt",
"ship_addr1": "1401 Park Ave",
"ship_city": "Emeryville",
"ship_state": "CA",
"ship_code": "94608",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "John Doe",
"to_addr1": "940 Presidio Ave",
"to_addr2": "#103",
"to_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PDF",
"account_number": "803921577",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL',
'action' => 'SubmitShipment',
'params' =>
array (
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'width' => 1,
'height' => 1,
'reference_value' => 'asdf',
),
),
'service' => 'N',
'shipper' => 'RocketShipIt',
'ship_addr1' => '1401 Park Ave',
'ship_city' => 'Emeryville',
'ship_state' => 'CA',
'ship_code' => '94608',
'ship_phone' => '1231231234',
'ship_country' => 'US',
'to_name' => 'John Doe',
'to_addr1' => '940 Presidio Ave',
'to_addr2' => '#103',
'to_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'PDF',
'account_number' => '803921577',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'DHL',
'params': {'account_number': '803921577',
'image_type': 'PDF',
'packages': [{'height': 1,
'length': 7,
'reference_value': 'asdf',
'weight': 4,
'width': 1}],
'service': 'N',
'ship_addr1': '1401 Park Ave',
'ship_city': 'Emeryville',
'ship_code': '94608',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'CA',
'shipper': 'RocketShipIt',
'test': True,
'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'}}
)
rs.request(
{"carrier"=>"DHL",
"action"=>"SubmitShipment",
"params"=>
{"packages"=>
[{"weight"=>4,
"length"=>7,
"width"=>1,
"height"=>1,
"reference_value"=>"asdf"}],
"service"=>"N",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"1401 Park Ave",
"ship_city"=>"Emeryville",
"ship_state"=>"CA",
"ship_code"=>"94608",
"ship_phone"=>"1231231234",
"ship_country"=>"US",
"to_name"=>"John Doe",
"to_addr1"=>"940 Presidio Ave",
"to_addr2"=>"#103",
"to_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"PDF",
"account_number"=>"803921577",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "DHL",
"action": "SubmitShipment",
"params": {
"packages": [
{
"weight": 4,
"length": 7,
"width": 1,
"height": 1,
"reference_value": "asdf"
}
],
"service": "N",
"shipper": "RocketShipIt",
"ship_addr1": "1401 Park Ave",
"ship_city": "Emeryville",
"ship_state": "CA",
"ship_code": "94608",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "John Doe",
"to_addr1": "940 Presidio Ave",
"to_addr2": "#103",
"to_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PDF",
"account_number": "803921577",
"test": true
}
}
)
DHL - Pickup Cancel
{
"carrier": "DHL",
"action": "CancelPickup",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"pickup_id": "2929AONCALL",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL',
'action' => 'CancelPickup',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'pickup_id' => '2929AONCALL',
'test' => true,
),
)
);
rs.request(
{'action': 'CancelPickup',
'carrier': 'DHL',
'params': {'password': 'YOUR_PASSWORD',
'pickup_id': '2929AONCALL',
'test': True,
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"DHL",
"action"=>"CancelPickup",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"pickup_id"=>"2929AONCALL",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "DHL",
"action": "CancelPickup",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"pickup_id": "2929AONCALL",
"test": true
}
}
)
DHL - Pickup Schedule
{
"carrier": "DHL",
"action": "CreatePickup",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"account_number": "803921577",
"packages": [
{
"weight": 5,
"width": 10,
"length": 10,
"height": 10
}
],
"shipper": "Acme Inc.",
"ship_contact": "John Doe",
"ship_country": "US",
"ship_phone": "123-123-1234",
"ship_city": "San Francisco",
"ship_code": "94115",
"ship_addr1": "101 Main st",
"to_code": "90210",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL',
'action' => 'CreatePickup',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'account_number' => '803921577',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'width' => 10,
'length' => 10,
'height' => 10,
),
),
'shipper' => 'Acme Inc.',
'ship_contact' => 'John Doe',
'ship_country' => 'US',
'ship_phone' => '123-123-1234',
'ship_city' => 'San Francisco',
'ship_code' => '94115',
'ship_addr1' => '101 Main st',
'to_code' => '90210',
'test' => true,
),
)
);
rs.request(
{'action': 'CreatePickup',
'carrier': 'DHL',
'params': {'account_number': '803921577',
'packages': [{'height': 10,
'length': 10,
'weight': 5,
'width': 10}],
'password': 'YOUR_PASSWORD',
'ship_addr1': '101 Main st',
'ship_city': 'San Francisco',
'ship_code': '94115',
'ship_contact': 'John Doe',
'ship_country': 'US',
'ship_phone': '123-123-1234',
'shipper': 'Acme Inc.',
'test': True,
'to_code': '90210',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"DHL",
"action"=>"CreatePickup",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"account_number"=>"803921577",
"packages"=>[{"weight"=>5, "width"=>10, "length"=>10, "height"=>10}],
"shipper"=>"Acme Inc.",
"ship_contact"=>"John Doe",
"ship_country"=>"US",
"ship_phone"=>"123-123-1234",
"ship_city"=>"San Francisco",
"ship_code"=>"94115",
"ship_addr1"=>"101 Main st",
"to_code"=>"90210",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "DHL",
"action": "CreatePickup",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"account_number": "803921577",
"packages": [
{
"weight": 5,
"width": 10,
"length": 10,
"height": 10
}
],
"shipper": "Acme Inc.",
"ship_contact": "John Doe",
"ship_country": "US",
"ship_phone": "123-123-1234",
"ship_city": "San Francisco",
"ship_code": "94115",
"ship_addr1": "101 Main st",
"to_code": "90210",
"test": true
}
}
)
DHL - Rates
{
"carrier": "DHL",
"action": "GetAllRates",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 5
}
],
"ship_city": "San Francisco",
"ship_code": "94115",
"to_code": "90210",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL',
'action' => 'GetAllRates',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 5,
),
),
'ship_city' => 'San Francisco',
'ship_code' => '94115',
'to_code' => '90210',
'test' => true,
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'DHL',
'params': {'packages': [{'weight': 5}],
'password': 'YOUR_PASSWORD',
'ship_city': 'San Francisco',
'ship_code': '94115',
'test': True,
'to_code': '90210',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"DHL",
"action"=>"GetAllRates",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"packages"=>[{"weight"=>5}],
"ship_city"=>"San Francisco",
"ship_code"=>"94115",
"to_code"=>"90210",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "DHL",
"action": "GetAllRates",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 5
}
],
"ship_city": "San Francisco",
"ship_code": "94115",
"to_code": "90210",
"test": true
}
}
)
DHL - Rates International
{
"carrier": "DHL",
"action": "GetAllRates",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"customs_value": 100.20,
"currency": "EUR",
"packages": [
{
"weight": 0.5,
"length": 15.0,
"width": 10.0,
"height": 4.0
}
],
"weight_unit": "KG",
"length_unit": "CM",
"shipper": "Tom1again SRL",
"ship_addr1": "Dieselstrasse 5B",
"ship_code": "61476",
"ship_city": "Kronberg",
"ship_country": "DE",
"to_country": "RO",
"to_code": "920004",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL',
'action' => 'GetAllRates',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'customs_value' => 100.2,
'currency' => 'EUR',
'packages' =>
array (
0 =>
array (
'weight' => 0.5,
'length' => 15.0,
'width' => 10.0,
'height' => 4.0,
),
),
'weight_unit' => 'KG',
'length_unit' => 'CM',
'shipper' => 'Tom1again SRL',
'ship_addr1' => 'Dieselstrasse 5B',
'ship_code' => '61476',
'ship_city' => 'Kronberg',
'ship_country' => 'DE',
'to_country' => 'RO',
'to_code' => '920004',
'test' => true,
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'DHL',
'params': {'currency': 'EUR',
'customs_value': 100.2,
'length_unit': 'CM',
'packages': [{'height': 4.0,
'length': 15.0,
'weight': 0.5,
'width': 10.0}],
'password': 'YOUR_PASSWORD',
'ship_addr1': 'Dieselstrasse 5B',
'ship_city': 'Kronberg',
'ship_code': '61476',
'ship_country': 'DE',
'shipper': 'Tom1again SRL',
'test': True,
'to_code': '920004',
'to_country': 'RO',
'username': 'YOUR_USERNAME',
'weight_unit': 'KG'}}
)
rs.request(
{"carrier"=>"DHL",
"action"=>"GetAllRates",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"customs_value"=>100.2,
"currency"=>"EUR",
"packages"=>[{"weight"=>0.5, "length"=>15.0, "width"=>10.0, "height"=>4.0}],
"weight_unit"=>"KG",
"length_unit"=>"CM",
"shipper"=>"Tom1again SRL",
"ship_addr1"=>"Dieselstrasse 5B",
"ship_code"=>"61476",
"ship_city"=>"Kronberg",
"ship_country"=>"DE",
"to_country"=>"RO",
"to_code"=>"920004",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "DHL",
"action": "GetAllRates",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"customs_value": 100.20,
"currency": "EUR",
"packages": [
{
"weight": 0.5,
"length": 15.0,
"width": 10.0,
"height": 4.0
}
],
"weight_unit": "KG",
"length_unit": "CM",
"shipper": "Tom1again SRL",
"ship_addr1": "Dieselstrasse 5B",
"ship_code": "61476",
"ship_city": "Kronberg",
"ship_country": "DE",
"to_country": "RO",
"to_code": "920004",
"test": true
}
}
)
DHL - Rates Multi-package
{
"carrier": "DHL",
"action": "GetAllRates",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 5
},
{
"weight": 5
}
],
"ship_city": "San Francisco",
"ship_code": "94115",
"to_code": "90210",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL',
'action' => 'GetAllRates',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 5,
),
1 =>
array (
'weight' => 5,
),
),
'ship_city' => 'San Francisco',
'ship_code' => '94115',
'to_code' => '90210',
'test' => true,
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'DHL',
'params': {'packages': [{'weight': 5}, {'weight': 5}],
'password': 'YOUR_PASSWORD',
'ship_city': 'San Francisco',
'ship_code': '94115',
'test': True,
'to_code': '90210',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"DHL",
"action"=>"GetAllRates",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"packages"=>[{"weight"=>5}, {"weight"=>5}],
"ship_city"=>"San Francisco",
"ship_code"=>"94115",
"to_code"=>"90210",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "DHL",
"action": "GetAllRates",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 5
},
{
"weight": 5
}
],
"ship_city": "San Francisco",
"ship_code": "94115",
"to_code": "90210",
"test": true
}
}
)
DHL - Rates with Insurance
{
"carrier": "DHL",
"action": "GetAllRates",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 5,
"insured_value": 200
}
],
"ship_city": "San Francisco",
"ship_code": "94115",
"to_code": "90210",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL',
'action' => 'GetAllRates',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'insured_value' => 200,
),
),
'ship_city' => 'San Francisco',
'ship_code' => '94115',
'to_code' => '90210',
'test' => true,
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'DHL',
'params': {'packages': [{'insured_value': 200, 'weight': 5}],
'password': 'YOUR_PASSWORD',
'ship_city': 'San Francisco',
'ship_code': '94115',
'test': True,
'to_code': '90210',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"DHL",
"action"=>"GetAllRates",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"packages"=>[{"weight"=>5, "insured_value"=>200}],
"ship_city"=>"San Francisco",
"ship_code"=>"94115",
"to_code"=>"90210",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "DHL",
"action": "GetAllRates",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 5,
"insured_value": 200
}
],
"ship_city": "San Francisco",
"ship_code": "94115",
"to_code": "90210",
"test": true
}
}
)
DHL - Time in Transit
{
"carrier": "DHL",
"action": "timeintransit",
"params": {
"test": true,
"shipper": "RocketShipIt",
"ship_contact": "Mark Sanborn",
"ship_phone": "1231231234",
"ship_state": "CA",
"ship_code": "90210",
"ship_country": "US",
"to_country": "US",
"to_code": "90210",
"pickup_date": "2018-06-25",
"ready_time": "0900",
"currency": "USD",
"customs_value": 5000
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL',
'action' => 'timeintransit',
'params' =>
array (
'test' => true,
'shipper' => 'RocketShipIt',
'ship_contact' => 'Mark Sanborn',
'ship_phone' => '1231231234',
'ship_state' => 'CA',
'ship_code' => '90210',
'ship_country' => 'US',
'to_country' => 'US',
'to_code' => '90210',
'pickup_date' => '2018-06-25',
'ready_time' => '0900',
'currency' => 'USD',
'customs_value' => 5000,
),
)
);
rs.request(
{'action': 'timeintransit',
'carrier': 'DHL',
'params': {'currency': 'USD',
'customs_value': 5000,
'pickup_date': '2018-06-25',
'ready_time': '0900',
'ship_code': '90210',
'ship_contact': 'Mark Sanborn',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'CA',
'shipper': 'RocketShipIt',
'test': True,
'to_code': '90210',
'to_country': 'US'}}
)
rs.request(
{"carrier"=>"DHL",
"action"=>"timeintransit",
"params"=>
{"test"=>true,
"shipper"=>"RocketShipIt",
"ship_contact"=>"Mark Sanborn",
"ship_phone"=>"1231231234",
"ship_state"=>"CA",
"ship_code"=>"90210",
"ship_country"=>"US",
"to_country"=>"US",
"to_code"=>"90210",
"pickup_date"=>"2018-06-25",
"ready_time"=>"0900",
"currency"=>"USD",
"customs_value"=>5000}}
)
rocketshipit.request(
{
"carrier": "DHL",
"action": "timeintransit",
"params": {
"test": true,
"shipper": "RocketShipIt",
"ship_contact": "Mark Sanborn",
"ship_phone": "1231231234",
"ship_state": "CA",
"ship_code": "90210",
"ship_country": "US",
"to_country": "US",
"to_code": "90210",
"pickup_date": "2018-06-25",
"ready_time": "0900",
"currency": "USD",
"customs_value": 5000
}
}
)
DHL - Tracking
{
"carrier": "DHL",
"action": "Track",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"tracking_number": "123456789",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL',
'action' => 'Track',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'tracking_number' => '123456789',
'test' => true,
),
)
);
rs.request(
{'action': 'Track',
'carrier': 'DHL',
'params': {'password': 'YOUR_PASSWORD',
'test': True,
'tracking_number': '123456789',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"DHL",
"action"=>"Track",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"tracking_number"=>"123456789",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "DHL",
"action": "Track",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"tracking_number": "123456789",
"test": true
}
}
)
DHL eCommerce - Create Manifest
{
"carrier": "DHL-ecommerce",
"action": "CreateManifest",
"params": {
"username": "YOUR_DHL_CLIENT_ID",
"password": "YOUR_DHL_CLIENT_SECRET",
"account_number": "YOUR_DHL_PICKUP_ID",
"shipment_ids": [
"PRCDZNRTDDIYKACEBKUMJQ"
],
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL-ecommerce',
'action' => 'CreateManifest',
'params' =>
array (
'username' => 'YOUR_DHL_CLIENT_ID',
'password' => 'YOUR_DHL_CLIENT_SECRET',
'account_number' => 'YOUR_DHL_PICKUP_ID',
'shipment_ids' =>
array (
0 => 'PRCDZNRTDDIYKACEBKUMJQ',
),
'test' => true,
),
)
);
rs.request(
{'action': 'CreateManifest',
'carrier': 'DHL-ecommerce',
'params': {'account_number': 'YOUR_DHL_PICKUP_ID',
'password': 'YOUR_DHL_CLIENT_SECRET',
'shipment_ids': ['PRCDZNRTDDIYKACEBKUMJQ'],
'test': True,
'username': 'YOUR_DHL_CLIENT_ID'}}
)
rs.request(
{"carrier"=>"DHL-ecommerce",
"action"=>"CreateManifest",
"params"=>
{"username"=>"YOUR_DHL_CLIENT_ID",
"password"=>"YOUR_DHL_CLIENT_SECRET",
"account_number"=>"YOUR_DHL_PICKUP_ID",
"shipment_ids"=>["PRCDZNRTDDIYKACEBKUMJQ"],
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "DHL-ecommerce",
"action": "CreateManifest",
"params": {
"username": "YOUR_DHL_CLIENT_ID",
"password": "YOUR_DHL_CLIENT_SECRET",
"account_number": "YOUR_DHL_PICKUP_ID",
"shipment_ids": [
"PRCDZNRTDDIYKACEBKUMJQ"
],
"test": true
}
}
)
DHL eCommerce - International Label
{
"carrier": "DHL-ecommerce",
"action": "SubmitShipment",
"params": {
"username": "YOUR_DHL_CLIENT_ID",
"password": "YOUR_DHL_CLIENT_SECRET",
"account_number": "YOUR_DHL_PICKUP_ID",
"service": "PLT",
"monetary_value": 10.00,
"packages": [
{
"weight": 0.3
}
],
"customs": [
{
"commodity_code": "000000",
"invoice_line_description": "Acme product 1",
"invoice_line_origin_country_code": "US",
"invoice_line_value": "2.00",
"invoice_line_part_number": "abc123"
}
],
"shipper": "Mr. Returns",
"ship_contact": "John Smith",
"ship_addr1": "1500 South Point Dr.",
"ship_city": "Forrest Park",
"ship_state": "GA",
"ship_code": "30297",
"ship_phone": "123-123-1234",
"to_name": "Joe Bloggs",
"to_addr1": "5048 - 264th Street",
"to_state": "BC",
"to_city": "Aldergrove",
"to_code": "V4W1N7",
"to_country": "CA",
"to_phone": "123-123-1234"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL-ecommerce',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_DHL_CLIENT_ID',
'password' => 'YOUR_DHL_CLIENT_SECRET',
'account_number' => 'YOUR_DHL_PICKUP_ID',
'service' => 'PLT',
'monetary_value' => 10.0,
'packages' =>
array (
0 =>
array (
'weight' => 0.3,
),
),
'customs' =>
array (
0 =>
array (
'commodity_code' => '000000',
'invoice_line_description' => 'Acme product 1',
'invoice_line_origin_country_code' => 'US',
'invoice_line_value' => '2.00',
'invoice_line_part_number' => 'abc123',
),
),
'shipper' => 'Mr. Returns',
'ship_contact' => 'John Smith',
'ship_addr1' => '1500 South Point Dr.',
'ship_city' => 'Forrest Park',
'ship_state' => 'GA',
'ship_code' => '30297',
'ship_phone' => '123-123-1234',
'to_name' => 'Joe Bloggs',
'to_addr1' => '5048 - 264th Street',
'to_state' => 'BC',
'to_city' => 'Aldergrove',
'to_code' => 'V4W1N7',
'to_country' => 'CA',
'to_phone' => '123-123-1234',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'DHL-ecommerce',
'params': {'account_number': 'YOUR_DHL_PICKUP_ID',
'customs': [{'commodity_code': '000000',
'invoice_line_description': 'Acme product 1',
'invoice_line_origin_country_code': 'US',
'invoice_line_part_number': 'abc123',
'invoice_line_value': '2.00'}],
'monetary_value': 10.0,
'packages': [{'weight': 0.3}],
'password': 'YOUR_DHL_CLIENT_SECRET',
'service': 'PLT',
'ship_addr1': '1500 South Point Dr.',
'ship_city': 'Forrest Park',
'ship_code': '30297',
'ship_contact': 'John Smith',
'ship_phone': '123-123-1234',
'ship_state': 'GA',
'shipper': 'Mr. Returns',
'to_addr1': '5048 - 264th Street',
'to_city': 'Aldergrove',
'to_code': 'V4W1N7',
'to_country': 'CA',
'to_name': 'Joe Bloggs',
'to_phone': '123-123-1234',
'to_state': 'BC',
'username': 'YOUR_DHL_CLIENT_ID'}}
)
rs.request(
{"carrier"=>"DHL-ecommerce",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_DHL_CLIENT_ID",
"password"=>"YOUR_DHL_CLIENT_SECRET",
"account_number"=>"YOUR_DHL_PICKUP_ID",
"service"=>"PLT",
"monetary_value"=>10.0,
"packages"=>[{"weight"=>0.3}],
"customs"=>
[{"commodity_code"=>"000000",
"invoice_line_description"=>"Acme product 1",
"invoice_line_origin_country_code"=>"US",
"invoice_line_value"=>"2.00",
"invoice_line_part_number"=>"abc123"}],
"shipper"=>"Mr. Returns",
"ship_contact"=>"John Smith",
"ship_addr1"=>"1500 South Point Dr.",
"ship_city"=>"Forrest Park",
"ship_state"=>"GA",
"ship_code"=>"30297",
"ship_phone"=>"123-123-1234",
"to_name"=>"Joe Bloggs",
"to_addr1"=>"5048 - 264th Street",
"to_state"=>"BC",
"to_city"=>"Aldergrove",
"to_code"=>"V4W1N7",
"to_country"=>"CA",
"to_phone"=>"123-123-1234"}}
)
rocketshipit.request(
{
"carrier": "DHL-ecommerce",
"action": "SubmitShipment",
"params": {
"username": "YOUR_DHL_CLIENT_ID",
"password": "YOUR_DHL_CLIENT_SECRET",
"account_number": "YOUR_DHL_PICKUP_ID",
"service": "PLT",
"monetary_value": 10.00,
"packages": [
{
"weight": 0.3
}
],
"customs": [
{
"commodity_code": "000000",
"invoice_line_description": "Acme product 1",
"invoice_line_origin_country_code": "US",
"invoice_line_value": "2.00",
"invoice_line_part_number": "abc123"
}
],
"shipper": "Mr. Returns",
"ship_contact": "John Smith",
"ship_addr1": "1500 South Point Dr.",
"ship_city": "Forrest Park",
"ship_state": "GA",
"ship_code": "30297",
"ship_phone": "123-123-1234",
"to_name": "Joe Bloggs",
"to_addr1": "5048 - 264th Street",
"to_state": "BC",
"to_city": "Aldergrove",
"to_code": "V4W1N7",
"to_country": "CA",
"to_phone": "123-123-1234"
}
}
)
DHL eCommerce - Rates
{
"carrier": "DHL-ecommerce",
"action": "GetAllRates",
"params": {
"username": "YOUR_DHL_CLIENT_ID",
"password": "YOUR_DHL_CLIENT_SECRET",
"account_number": "YOUR_DHL_PICKUP_ID",
"test": true,
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_code": "90210",
"weight_unit": "LBS",
"pickup_type": "01",
"customer_classification": "01",
"length_unit": "IN",
"packaging_type": "02"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL-ecommerce',
'action' => 'GetAllRates',
'params' =>
array (
'username' => 'YOUR_DHL_CLIENT_ID',
'password' => 'YOUR_DHL_CLIENT_SECRET',
'account_number' => 'YOUR_DHL_PICKUP_ID',
'test' => true,
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 5,
'width' => 5,
'height' => 5,
),
),
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_country' => 'US',
'to_code' => '90210',
'weight_unit' => 'LBS',
'pickup_type' => '01',
'customer_classification' => '01',
'length_unit' => 'IN',
'packaging_type' => '02',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'DHL-ecommerce',
'params': {'account_number': 'YOUR_DHL_PICKUP_ID',
'customer_classification': '01',
'customs': [],
'length_unit': 'IN',
'packages': [{'height': 5, 'length': 5, 'weight': 5, 'width': 5}],
'packaging_type': '02',
'password': 'YOUR_DHL_CLIENT_SECRET',
'pickup_type': '01',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_code': '90210',
'to_country': 'US',
'username': 'YOUR_DHL_CLIENT_ID',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"DHL-ecommerce",
"action"=>"GetAllRates",
"params"=>
{"username"=>"YOUR_DHL_CLIENT_ID",
"password"=>"YOUR_DHL_CLIENT_SECRET",
"account_number"=>"YOUR_DHL_PICKUP_ID",
"test"=>true,
"packages"=>[{"weight"=>5, "length"=>5, "width"=>5, "height"=>5}],
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_country"=>"US",
"to_code"=>"90210",
"weight_unit"=>"LBS",
"pickup_type"=>"01",
"customer_classification"=>"01",
"length_unit"=>"IN",
"packaging_type"=>"02"}}
)
rocketshipit.request(
{
"carrier": "DHL-ecommerce",
"action": "GetAllRates",
"params": {
"username": "YOUR_DHL_CLIENT_ID",
"password": "YOUR_DHL_CLIENT_SECRET",
"account_number": "YOUR_DHL_PICKUP_ID",
"test": true,
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_code": "90210",
"weight_unit": "LBS",
"pickup_type": "01",
"customer_classification": "01",
"length_unit": "IN",
"packaging_type": "02"
}
}
)
DHL eCommerce - Tracking
{
"carrier": "DHL-ecommerce",
"action": "Track",
"params": {
"username": "YOUR_DHL_CLIENT_ID",
"password": "YOUR_DHL_CLIENT_SECRET",
"account_number": "YOUR_DHL_PICKUP_ID",
"tracking_number": "RXGNDLFDMJXYGRYOUKQAOW"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL-ecommerce',
'action' => 'Track',
'params' =>
array (
'username' => 'YOUR_DHL_CLIENT_ID',
'password' => 'YOUR_DHL_CLIENT_SECRET',
'account_number' => 'YOUR_DHL_PICKUP_ID',
'tracking_number' => 'RXGNDLFDMJXYGRYOUKQAOW',
),
)
);
rs.request(
{'action': 'Track',
'carrier': 'DHL-ecommerce',
'params': {'account_number': 'YOUR_DHL_PICKUP_ID',
'password': 'YOUR_DHL_CLIENT_SECRET',
'tracking_number': 'RXGNDLFDMJXYGRYOUKQAOW',
'username': 'YOUR_DHL_CLIENT_ID'}}
)
rs.request(
{"carrier"=>"DHL-ecommerce",
"action"=>"Track",
"params"=>
{"username"=>"YOUR_DHL_CLIENT_ID",
"password"=>"YOUR_DHL_CLIENT_SECRET",
"account_number"=>"YOUR_DHL_PICKUP_ID",
"tracking_number"=>"RXGNDLFDMJXYGRYOUKQAOW"}}
)
rocketshipit.request(
{
"carrier": "DHL-ecommerce",
"action": "Track",
"params": {
"username": "YOUR_DHL_CLIENT_ID",
"password": "YOUR_DHL_CLIENT_SECRET",
"account_number": "YOUR_DHL_PICKUP_ID",
"tracking_number": "RXGNDLFDMJXYGRYOUKQAOW"
}
}
)
DHL-PL - Label
{
"carrier": "dhl-pl",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_NUMBER",
"service": "AH",
"shipment_description": "Toys",
"image_type": "LBLP",
"packages": [
{
"weight": 15,
"length": 10,
"width": 10,
"height": 10
}
],
"shipper": "Thomas Test",
"ship_addr1": "Osmanska",
"ship_addr2": "2",
"ship_city": "Warszawa",
"ship_code": "02823",
"ship_phone": "123456789",
"to_name": "John Doe",
"to_addr1": "7 Wroblewskiego",
"to_addr2": "7",
"to_city": "Pulawy",
"to_code": "24100",
"to_phone": "123456789",
"to_country": "PL",
"to_email": "receiver@dhl.com",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'dhl-pl',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'service' => 'AH',
'shipment_description' => 'Toys',
'image_type' => 'LBLP',
'packages' =>
array (
0 =>
array (
'weight' => 15,
'length' => 10,
'width' => 10,
'height' => 10,
),
),
'shipper' => 'Thomas Test',
'ship_addr1' => 'Osmanska',
'ship_addr2' => '2',
'ship_city' => 'Warszawa',
'ship_code' => '02823',
'ship_phone' => '123456789',
'to_name' => 'John Doe',
'to_addr1' => '7 Wroblewskiego',
'to_addr2' => '7',
'to_city' => 'Pulawy',
'to_code' => '24100',
'to_phone' => '123456789',
'to_country' => 'PL',
'to_email' => 'receiver@dhl.com',
'packaging_type' => 'YOUR_PACKAGING',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'dhl-pl',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'image_type': 'LBLP',
'packages': [{'height': 10,
'length': 10,
'weight': 15,
'width': 10}],
'packaging_type': 'YOUR_PACKAGING',
'password': 'YOUR_PASSWORD',
'service': 'AH',
'ship_addr1': 'Osmanska',
'ship_addr2': '2',
'ship_city': 'Warszawa',
'ship_code': '02823',
'ship_phone': '123456789',
'shipment_description': 'Toys',
'shipper': 'Thomas Test',
'test': True,
'to_addr1': '7 Wroblewskiego',
'to_addr2': '7',
'to_city': 'Pulawy',
'to_code': '24100',
'to_country': 'PL',
'to_email': 'receiver@dhl.com',
'to_name': 'John Doe',
'to_phone': '123456789',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"dhl-pl",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"service"=>"AH",
"shipment_description"=>"Toys",
"image_type"=>"LBLP",
"packages"=>[{"weight"=>15, "length"=>10, "width"=>10, "height"=>10}],
"shipper"=>"Thomas Test",
"ship_addr1"=>"Osmanska",
"ship_addr2"=>"2",
"ship_city"=>"Warszawa",
"ship_code"=>"02823",
"ship_phone"=>"123456789",
"to_name"=>"John Doe",
"to_addr1"=>"7 Wroblewskiego",
"to_addr2"=>"7",
"to_city"=>"Pulawy",
"to_code"=>"24100",
"to_phone"=>"123456789",
"to_country"=>"PL",
"to_email"=>"receiver@dhl.com",
"packaging_type"=>"YOUR_PACKAGING",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "dhl-pl",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_NUMBER",
"service": "AH",
"shipment_description": "Toys",
"image_type": "LBLP",
"packages": [
{
"weight": 15,
"length": 10,
"width": 10,
"height": 10
}
],
"shipper": "Thomas Test",
"ship_addr1": "Osmanska",
"ship_addr2": "2",
"ship_city": "Warszawa",
"ship_code": "02823",
"ship_phone": "123456789",
"to_name": "John Doe",
"to_addr1": "7 Wroblewskiego",
"to_addr2": "7",
"to_city": "Pulawy",
"to_code": "24100",
"to_phone": "123456789",
"to_country": "PL",
"to_email": "receiver@dhl.com",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
)
DHL-PL - Pickup
{
"carrier": "DHL-PL",
"action": "CreatePickup",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"special_instructions": "Uwaga, paczki zawieraja szklo",
"shipment_ids": [
"90000019278"
],
"pickup_date": "2017-04-17",
"close_time": "16:00",
"ready_time": "08:00",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL-PL',
'action' => 'CreatePickup',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'special_instructions' => 'Uwaga, paczki zawieraja szklo',
'shipment_ids' =>
array (
0 => '90000019278',
),
'pickup_date' => '2017-04-17',
'close_time' => '16:00',
'ready_time' => '08:00',
'test' => true,
),
)
);
rs.request(
{'action': 'CreatePickup',
'carrier': 'DHL-PL',
'params': {'close_time': '16:00',
'password': 'YOUR_PASSWORD',
'pickup_date': '2017-04-17',
'ready_time': '08:00',
'shipment_ids': ['90000019278'],
'special_instructions': 'Uwaga, paczki zawieraja szklo',
'test': True,
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"DHL-PL",
"action"=>"CreatePickup",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"special_instructions"=>"Uwaga, paczki zawieraja szklo",
"shipment_ids"=>["90000019278"],
"pickup_date"=>"2017-04-17",
"close_time"=>"16:00",
"ready_time"=>"08:00",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "DHL-PL",
"action": "CreatePickup",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"special_instructions": "Uwaga, paczki zawieraja szklo",
"shipment_ids": [
"90000019278"
],
"pickup_date": "2017-04-17",
"close_time": "16:00",
"ready_time": "08:00",
"test": true
}
}
)
DHL-PL - Track
{
"carrier": "DHL-PL",
"action": "Track",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"shipment_id": "11898773100",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL-PL',
'action' => 'Track',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'shipment_id' => '11898773100',
'test' => true,
),
)
);
rs.request(
{'action': 'Track',
'carrier': 'DHL-PL',
'params': {'password': 'YOUR_PASSWORD',
'shipment_id': '11898773100',
'test': True,
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"DHL-PL",
"action"=>"Track",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"shipment_id"=>"11898773100",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "DHL-PL",
"action": "Track",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"shipment_id": "11898773100",
"test": true
}
}
)
DHL-PL - Void
{
"carrier": "DHL-PL",
"action": "VoidShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"shipment_id": "16257008778",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL-PL',
'action' => 'VoidShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'shipment_id' => '16257008778',
'test' => true,
),
)
);
rs.request(
{'action': 'VoidShipment',
'carrier': 'DHL-PL',
'params': {'password': 'YOUR_PASSWORD',
'shipment_id': '16257008778',
'test': True,
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"DHL-PL",
"action"=>"VoidShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"shipment_id"=>"16257008778",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "DHL-PL",
"action": "VoidShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"shipment_id": "16257008778",
"test": true
}
}
)
DHL-REST - Label
{
"carrier": "DHL-REST",
"action": "SubmitShipment",
"params": {
"client_id": "demo-key",
"client_secret": "demo-secret",
"account_number": "803921577",
"packages": [
{
"weight": 4,
"length": 7,
"width": 4,
"height": 4
}
],
"service": "N",
"shipper": "RocketShipIt",
"ship_addr1": "1401 Park Ave",
"ship_city": "Emeryville",
"ship_state": "CA",
"ship_code": "94608",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "John Doe",
"to_addr1": "940 Presidio Ave",
"to_addr2": "#103",
"to_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PDF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'client_id' => 'demo-key',
'client_secret' => 'demo-secret',
'account_number' => '803921577',
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'width' => 4,
'height' => 4,
),
),
'service' => 'N',
'shipper' => 'RocketShipIt',
'ship_addr1' => '1401 Park Ave',
'ship_city' => 'Emeryville',
'ship_state' => 'CA',
'ship_code' => '94608',
'ship_phone' => '1231231234',
'ship_country' => 'US',
'to_name' => 'John Doe',
'to_addr1' => '940 Presidio Ave',
'to_addr2' => '#103',
'to_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'PDF',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'DHL-REST',
'params': {'account_number': '803921577',
'client_id': 'demo-key',
'client_secret': 'demo-secret',
'image_type': 'PDF',
'packages': [{'height': 4, 'length': 7, 'weight': 4, 'width': 4}],
'service': 'N',
'ship_addr1': '1401 Park Ave',
'ship_city': 'Emeryville',
'ship_code': '94608',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'CA',
'shipper': 'RocketShipIt',
'test': True,
'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'}}
)
rs.request(
{"carrier"=>"DHL-REST",
"action"=>"SubmitShipment",
"params"=>
{"client_id"=>"demo-key",
"client_secret"=>"demo-secret",
"account_number"=>"803921577",
"packages"=>[{"weight"=>4, "length"=>7, "width"=>4, "height"=>4}],
"service"=>"N",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"1401 Park Ave",
"ship_city"=>"Emeryville",
"ship_state"=>"CA",
"ship_code"=>"94608",
"ship_phone"=>"1231231234",
"ship_country"=>"US",
"to_name"=>"John Doe",
"to_addr1"=>"940 Presidio Ave",
"to_addr2"=>"#103",
"to_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"PDF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "DHL-REST",
"action": "SubmitShipment",
"params": {
"client_id": "demo-key",
"client_secret": "demo-secret",
"account_number": "803921577",
"packages": [
{
"weight": 4,
"length": 7,
"width": 4,
"height": 4
}
],
"service": "N",
"shipper": "RocketShipIt",
"ship_addr1": "1401 Park Ave",
"ship_city": "Emeryville",
"ship_state": "CA",
"ship_code": "94608",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "John Doe",
"to_addr1": "940 Presidio Ave",
"to_addr2": "#103",
"to_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PDF",
"test": true
}
}
)
DHL-REST - Rates
{
"carrier": "DHL-REST",
"action": "GetAllRates",
"params": {
"client_id": "demo-key",
"client_secret": "demo-secret",
"packages": [
{
"weight": 5
}
],
"ship_city": "San Francisco",
"ship_code": "94115",
"to_code": "90210",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL-REST',
'action' => 'GetAllRates',
'params' =>
array (
'client_id' => 'demo-key',
'client_secret' => 'demo-secret',
'packages' =>
array (
0 =>
array (
'weight' => 5,
),
),
'ship_city' => 'San Francisco',
'ship_code' => '94115',
'to_code' => '90210',
'test' => true,
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'DHL-REST',
'params': {'client_id': 'demo-key',
'client_secret': 'demo-secret',
'packages': [{'weight': 5}],
'ship_city': 'San Francisco',
'ship_code': '94115',
'test': True,
'to_code': '90210'}}
)
rs.request(
{"carrier"=>"DHL-REST",
"action"=>"GetAllRates",
"params"=>
{"client_id"=>"demo-key",
"client_secret"=>"demo-secret",
"packages"=>[{"weight"=>5}],
"ship_city"=>"San Francisco",
"ship_code"=>"94115",
"to_code"=>"90210",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "DHL-REST",
"action": "GetAllRates",
"params": {
"client_id": "demo-key",
"client_secret": "demo-secret",
"packages": [
{
"weight": 5
}
],
"ship_city": "San Francisco",
"ship_code": "94115",
"to_code": "90210",
"test": true
}
}
)
DHL-REST - Tracking
{
"carrier": "DHL-REST",
"action": "Track",
"params": {
"client_id": "demo-key",
"client_secret": "demo-secret",
"tracking_number": "123456789",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL-REST',
'action' => 'Track',
'params' =>
array (
'client_id' => 'demo-key',
'client_secret' => 'demo-secret',
'tracking_number' => '123456789',
'test' => true,
),
)
);
rs.request(
{'action': 'Track',
'carrier': 'DHL-REST',
'params': {'client_id': 'demo-key',
'client_secret': 'demo-secret',
'test': True,
'tracking_number': '123456789'}}
)
rs.request(
{"carrier"=>"DHL-REST",
"action"=>"Track",
"params"=>
{"client_id"=>"demo-key",
"client_secret"=>"demo-secret",
"tracking_number"=>"123456789",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "DHL-REST",
"action": "Track",
"params": {
"client_id": "demo-key",
"client_secret": "demo-secret",
"tracking_number": "123456789",
"test": true
}
}
)
DPD - Tracking
{
"carrier": "dpd",
"action": "track",
"params": {
"username": "GEOTRACK",
"password": "g30tr4ck",
"tracking_number": "1371134583769923",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'dpd',
'action' => 'track',
'params' =>
array (
'username' => 'GEOTRACK',
'password' => 'g30tr4ck',
'tracking_number' => '1371134583769923',
'test' => true,
),
)
);
rs.request(
{'action': 'track',
'carrier': 'dpd',
'params': {'password': 'g30tr4ck',
'test': True,
'tracking_number': '1371134583769923',
'username': 'GEOTRACK'}}
)
rs.request(
{"carrier"=>"dpd",
"action"=>"track",
"params"=>
{"username"=>"GEOTRACK",
"password"=>"g30tr4ck",
"tracking_number"=>"1371134583769923",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "dpd",
"action": "track",
"params": {
"username": "GEOTRACK",
"password": "g30tr4ck",
"tracking_number": "1371134583769923",
"test": true
}
}
)
{
"carrier": "Dicom",
"action": "SubmitShipment",
"params": {
"test": true,
"account_number": "YOUR_ACCOUNT_NUMBER",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_country": "US",
"to_city": "Emeryville",
"to_state": "CA",
"to_code": "90210",
"weight_unit": "LBS",
"length_unit": "IN",
"packaging_type": "BX"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'Dicom',
'action' => 'SubmitShipment',
'params' =>
array (
'test' => true,
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 5,
'width' => 5,
'height' => 5,
),
),
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_country' => 'US',
'to_city' => 'Emeryville',
'to_state' => 'CA',
'to_code' => '90210',
'weight_unit' => 'LBS',
'length_unit' => 'IN',
'packaging_type' => 'BX',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'Dicom',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'customs': [],
'length_unit': 'IN',
'packages': [{'height': 5, 'length': 5, 'weight': 5, 'width': 5}],
'packaging_type': 'BX',
'password': 'YOUR_PASSWORD',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Emeryville',
'to_code': '90210',
'to_country': 'US',
'to_name': 'John Doe',
'to_state': 'CA',
'username': 'YOUR_USERNAME',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"Dicom",
"action"=>"SubmitShipment",
"params"=>
{"test"=>true,
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"packages"=>[{"weight"=>5, "length"=>5, "width"=>5, "height"=>5}],
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_country"=>"US",
"to_city"=>"Emeryville",
"to_state"=>"CA",
"to_code"=>"90210",
"weight_unit"=>"LBS",
"length_unit"=>"IN",
"packaging_type"=>"BX"}}
)
rocketshipit.request(
{
"carrier": "Dicom",
"action": "SubmitShipment",
"params": {
"test": true,
"account_number": "YOUR_ACCOUNT_NUMBER",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_country": "US",
"to_city": "Emeryville",
"to_state": "CA",
"to_code": "90210",
"weight_unit": "LBS",
"length_unit": "IN",
"packaging_type": "BX"
}
}
)
{
"carrier": "Dicom",
"action": "GetAllRates",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_NUMBER",
"packages": [
{
"packaging_type": "Box",
"weight": 50,
"length": 5,
"width": 5,
"height": 5
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "CA",
"to_state": "BC",
"to_code": "V4W1N7",
"division": "express"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'Dicom',
'action' => 'GetAllRates',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'packages' =>
array (
0 =>
array (
'packaging_type' => 'Box',
'weight' => 50,
'length' => 5,
'width' => 5,
'height' => 5,
),
),
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_country' => 'CA',
'to_state' => 'BC',
'to_code' => 'V4W1N7',
'division' => 'express',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'Dicom',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'customs': [],
'division': 'express',
'packages': [{'height': 5,
'length': 5,
'packaging_type': 'Box',
'weight': 50,
'width': 5}],
'password': 'YOUR_PASSWORD',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'to_code': 'V4W1N7',
'to_country': 'CA',
'to_state': 'BC',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"Dicom",
"action"=>"GetAllRates",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"packages"=>
[{"packaging_type"=>"Box",
"weight"=>50,
"length"=>5,
"width"=>5,
"height"=>5}],
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_country"=>"CA",
"to_state"=>"BC",
"to_code"=>"V4W1N7",
"division"=>"express"}}
)
rocketshipit.request(
{
"carrier": "Dicom",
"action": "GetAllRates",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_NUMBER",
"packages": [
{
"packaging_type": "Box",
"weight": 50,
"length": 5,
"width": 5,
"height": 5
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "CA",
"to_state": "BC",
"to_code": "V4W1N7",
"division": "express"
}
}
)
{
"carrier": "Dicom",
"action": "Track",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"tracking_number": "W1234567"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'Dicom',
'action' => 'Track',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'tracking_number' => 'W1234567',
),
)
);
rs.request(
{'action': 'Track',
'carrier': 'Dicom',
'params': {'password': 'YOUR_PASSWORD',
'tracking_number': 'W1234567',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"Dicom",
"action"=>"Track",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"tracking_number"=>"W1234567"}}
)
rocketshipit.request(
{
"carrier": "Dicom",
"action": "Track",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"tracking_number": "W1234567"
}
}
)
FedEx - Address Validation
{
"carrier": "FedEx",
"action": "AddressValidate",
"params": {
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'AddressValidate',
'params' =>
array (
'to_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'test' => true,
),
)
);
rs.request(
{'action': 'AddressValidate',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'password': 'YOUR_PASSWORD',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"AddressValidate",
"params"=>
{"to_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "AddressValidate",
"params": {
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"test": true
}
}
)
FedEx - Create Manifest
{
"carrier": "FedEx",
"action": "CreateManifest",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'CreateManifest',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'test' => true,
),
)
);
rs.request(
{'action': 'CreateManifest',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'password': 'YOUR_PASSWORD',
'test': True}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"CreateManifest",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "CreateManifest",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"test": true
}
}
)
FedEx - Create Manifest Smart Post
{
"carrier": "FedEx",
"action": "CreateManifest",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"smart_post_hub_id": "5552",
"carrier_code": "FXSP",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'CreateManifest',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'smart_post_hub_id' => '5552',
'carrier_code' => 'FXSP',
'test' => true,
),
)
);
rs.request(
{'action': 'CreateManifest',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'carrier_code': 'FXSP',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'password': 'YOUR_PASSWORD',
'smart_post_hub_id': '5552',
'test': True}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"CreateManifest",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"smart_post_hub_id"=>"5552",
"carrier_code"=>"FXSP",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "CreateManifest",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"smart_post_hub_id": "5552",
"carrier_code": "FXSP",
"test": true
}
}
)
FedEx - Email notification on delivery
{
"action": "Notify",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"shipper": "Acme",
"ship_email": "acme@company.com",
"to_email": "john.doe@email.com",
"tracking_number": "123311385959"
},
"carrier": "fedex"
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'action' => 'Notify',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'shipper' => 'Acme',
'ship_email' => 'acme@company.com',
'to_email' => 'john.doe@email.com',
'tracking_number' => '123311385959',
),
'carrier' => 'fedex',
)
);
rs.request(
{'action': 'Notify',
'carrier': 'fedex',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'password': 'YOUR_PASSWORD',
'ship_email': 'acme@company.com',
'shipper': 'Acme',
'to_email': 'john.doe@email.com',
'tracking_number': '123311385959'}}
)
rs.request(
{"action"=>"Notify",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"shipper"=>"Acme",
"ship_email"=>"acme@company.com",
"to_email"=>"john.doe@email.com",
"tracking_number"=>"123311385959"},
"carrier"=>"fedex"}
)
rocketshipit.request(
{
"action": "Notify",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"shipper": "Acme",
"ship_email": "acme@company.com",
"to_email": "john.doe@email.com",
"tracking_number": "123311385959"
},
"carrier": "fedex"
}
)
FedEx - Freight Label International
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"freight_account_number": "510087020",
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"service": "FEDEX_FREIGHT_ECONOMY",
"lift_gate_required": false,
"packages": [
{
"description": "Bailing wire",
"weight": 200,
"length": 119,
"width": 80,
"height": 70,
"freight_class": "50",
"packaging_type": "PALLET",
"pieces": 10
}
],
"shipper": "WS1 LLC",
"ship_addr1": "298 CHERRY LN",
"ship_city": "New Castle",
"ship_state": "DE",
"ship_code": "19720",
"ship_country": "US",
"ship_phone": "4403392600",
"to_name": "Ahmed",
"to_addr1": "4815 Dakhnah",
"to_city": "JEDDAH",
"to_state": "Makkah",
"to_country": "SA",
"to_code": "23344",
"to_phone": "0561290777",
"customs_value": 200,
"currency": "USD",
"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"
}
],
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'SubmitShipment',
'params' =>
array (
'freight_account_number' => '510087020',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'service' => 'FEDEX_FREIGHT_ECONOMY',
'lift_gate_required' => false,
'packages' =>
array (
0 =>
array (
'description' => 'Bailing wire',
'weight' => 200,
'length' => 119,
'width' => 80,
'height' => 70,
'freight_class' => '50',
'packaging_type' => 'PALLET',
'pieces' => 10,
),
),
'shipper' => 'WS1 LLC',
'ship_addr1' => '298 CHERRY LN',
'ship_city' => 'New Castle',
'ship_state' => 'DE',
'ship_code' => '19720',
'ship_country' => 'US',
'ship_phone' => '4403392600',
'to_name' => 'Ahmed',
'to_addr1' => '4815 Dakhnah',
'to_city' => 'JEDDAH',
'to_state' => 'Makkah',
'to_country' => 'SA',
'to_code' => '23344',
'to_phone' => '0561290777',
'customs_value' => 200,
'currency' => 'USD',
'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',
),
),
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'currency': 'USD',
'customs': [{'country_of_manufacture': 'US',
'customs_description': 'My Description',
'customs_line_amount': 50.0,
'customs_quantity': 1,
'customs_quantity_units': 'EA',
'customs_weight': 2.5}],
'customs_value': 200,
'freight_account_number': '510087020',
'key': 'YOUR_KEY',
'lift_gate_required': False,
'meter_number': 'YOUR_METER_NUMBER',
'packages': [{'description': 'Bailing wire',
'freight_class': '50',
'height': 70,
'length': 119,
'packaging_type': 'PALLET',
'pieces': 10,
'weight': 200,
'width': 80}],
'password': 'YOUR_PASSWORD',
'service': 'FEDEX_FREIGHT_ECONOMY',
'ship_addr1': '298 CHERRY LN',
'ship_city': 'New Castle',
'ship_code': '19720',
'ship_country': 'US',
'ship_phone': '4403392600',
'ship_state': 'DE',
'shipper': 'WS1 LLC',
'test': True,
'to_addr1': '4815 Dakhnah',
'to_city': 'JEDDAH',
'to_code': '23344',
'to_country': 'SA',
'to_name': 'Ahmed',
'to_phone': '0561290777',
'to_state': 'Makkah'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"SubmitShipment",
"params"=>
{"freight_account_number"=>"510087020",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"service"=>"FEDEX_FREIGHT_ECONOMY",
"lift_gate_required"=>false,
"packages"=>
[{"description"=>"Bailing wire",
"weight"=>200,
"length"=>119,
"width"=>80,
"height"=>70,
"freight_class"=>"50",
"packaging_type"=>"PALLET",
"pieces"=>10}],
"shipper"=>"WS1 LLC",
"ship_addr1"=>"298 CHERRY LN",
"ship_city"=>"New Castle",
"ship_state"=>"DE",
"ship_code"=>"19720",
"ship_country"=>"US",
"ship_phone"=>"4403392600",
"to_name"=>"Ahmed",
"to_addr1"=>"4815 Dakhnah",
"to_city"=>"JEDDAH",
"to_state"=>"Makkah",
"to_country"=>"SA",
"to_code"=>"23344",
"to_phone"=>"0561290777",
"customs_value"=>200,
"currency"=>"USD",
"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"}],
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"freight_account_number": "510087020",
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"service": "FEDEX_FREIGHT_ECONOMY",
"lift_gate_required": false,
"packages": [
{
"description": "Bailing wire",
"weight": 200,
"length": 119,
"width": 80,
"height": 70,
"freight_class": "50",
"packaging_type": "PALLET",
"pieces": 10
}
],
"shipper": "WS1 LLC",
"ship_addr1": "298 CHERRY LN",
"ship_city": "New Castle",
"ship_state": "DE",
"ship_code": "19720",
"ship_country": "US",
"ship_phone": "4403392600",
"to_name": "Ahmed",
"to_addr1": "4815 Dakhnah",
"to_city": "JEDDAH",
"to_state": "Makkah",
"to_country": "SA",
"to_code": "23344",
"to_phone": "0561290777",
"customs_value": 200,
"currency": "USD",
"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"
}
],
"test": true
}
}
)
FedEx - Freight Label Third Party Billing
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"freight_account_number": "YOUR_FREIGHT_ACCOUNT_NUMBER",
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 155.0,
"length": 1,
"width": 1,
"height": 1,
"freight_class": "CLASS_070",
"description": "B48-48-16",
"packaging_type": "PALLET",
"pieces": 1
}
],
"customs": [],
"addons": [],
"package_count": 1,
"packageCount": 1,
"service": "FEDEX_FREIGHT_PRIORITY",
"lift_gate_required": false,
"residential": false,
"shipper": "Vendor - Harrison, AR",
"ship_addr1": "1202 Chalet Ln",
"ship_phone": "+1 844-763-0135",
"ship_city": "Harrison",
"ship_state": "AR",
"ship_code": "72601",
"ship_country": "US",
"to_city": "Harrison",
"to_addr1": "2000 Freight LTL Testing",
"to_country": "US",
"to_code": "72601",
"to_state": "AR",
"to_name": "Test Qa",
"to_phone": "+1 844-763-0131",
"weight_unit": "LBS",
"customer_classification": "01",
"packaging_type": "YOUR_PACKAGING",
"special_instructions": "",
"image_type": "PDF",
"test": true,
"billing": [
{
"type": "transportation",
"payment_type": "third_party",
"company": "Acme Inc.",
"account": "805222441",
"postal_code": "72601",
"country_code": "US",
"phone": "+18447630131",
"city": "Harrison",
"state": "AR",
"addr1": "2000 Freight LTL Testing"
}
]
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'SubmitShipment',
'params' =>
array (
'freight_account_number' => 'YOUR_FREIGHT_ACCOUNT_NUMBER',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 155.0,
'length' => 1,
'width' => 1,
'height' => 1,
'freight_class' => 'CLASS_070',
'description' => 'B48-48-16',
'packaging_type' => 'PALLET',
'pieces' => 1,
),
),
'customs' =>
array (
),
'addons' =>
array (
),
'package_count' => 1,
'packageCount' => 1,
'service' => 'FEDEX_FREIGHT_PRIORITY',
'lift_gate_required' => false,
'residential' => false,
'shipper' => 'Vendor - Harrison, AR',
'ship_addr1' => '1202 Chalet Ln',
'ship_phone' => '+1 844-763-0135',
'ship_city' => 'Harrison',
'ship_state' => 'AR',
'ship_code' => '72601',
'ship_country' => 'US',
'to_city' => 'Harrison',
'to_addr1' => '2000 Freight LTL Testing',
'to_country' => 'US',
'to_code' => '72601',
'to_state' => 'AR',
'to_name' => 'Test Qa',
'to_phone' => '+1 844-763-0131',
'weight_unit' => 'LBS',
'customer_classification' => '01',
'packaging_type' => 'YOUR_PACKAGING',
'special_instructions' => '',
'image_type' => 'PDF',
'test' => true,
'billing' =>
array (
0 =>
array (
'type' => 'transportation',
'payment_type' => 'third_party',
'company' => 'Acme Inc.',
'account' => '805222441',
'postal_code' => '72601',
'country_code' => 'US',
'phone' => '+18447630131',
'city' => 'Harrison',
'state' => 'AR',
'addr1' => '2000 Freight LTL Testing',
),
),
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'addons': [],
'billing': [{'account': '805222441',
'addr1': '2000 Freight LTL Testing',
'city': 'Harrison',
'company': 'Acme Inc.',
'country_code': 'US',
'payment_type': 'third_party',
'phone': '+18447630131',
'postal_code': '72601',
'state': 'AR',
'type': 'transportation'}],
'customer_classification': '01',
'customs': [],
'freight_account_number': 'YOUR_FREIGHT_ACCOUNT_NUMBER',
'image_type': 'PDF',
'key': 'YOUR_KEY',
'lift_gate_required': False,
'meter_number': 'YOUR_METER_NUMBER',
'packageCount': 1,
'package_count': 1,
'packages': [{'description': 'B48-48-16',
'freight_class': 'CLASS_070',
'height': 1,
'length': 1,
'packaging_type': 'PALLET',
'pieces': 1,
'weight': 155.0,
'width': 1}],
'packaging_type': 'YOUR_PACKAGING',
'password': 'YOUR_PASSWORD',
'residential': False,
'service': 'FEDEX_FREIGHT_PRIORITY',
'ship_addr1': '1202 Chalet Ln',
'ship_city': 'Harrison',
'ship_code': '72601',
'ship_country': 'US',
'ship_phone': '+1 844-763-0135',
'ship_state': 'AR',
'shipper': 'Vendor - Harrison, AR',
'special_instructions': '',
'test': True,
'to_addr1': '2000 Freight LTL Testing',
'to_city': 'Harrison',
'to_code': '72601',
'to_country': 'US',
'to_name': 'Test Qa',
'to_phone': '+1 844-763-0131',
'to_state': 'AR',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"SubmitShipment",
"params"=>
{"freight_account_number"=>"YOUR_FREIGHT_ACCOUNT_NUMBER",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"packages"=>
[{"weight"=>155.0,
"length"=>1,
"width"=>1,
"height"=>1,
"freight_class"=>"CLASS_070",
"description"=>"B48-48-16",
"packaging_type"=>"PALLET",
"pieces"=>1}],
"customs"=>[],
"addons"=>[],
"package_count"=>1,
"packageCount"=>1,
"service"=>"FEDEX_FREIGHT_PRIORITY",
"lift_gate_required"=>false,
"residential"=>false,
"shipper"=>"Vendor - Harrison, AR",
"ship_addr1"=>"1202 Chalet Ln",
"ship_phone"=>"+1 844-763-0135",
"ship_city"=>"Harrison",
"ship_state"=>"AR",
"ship_code"=>"72601",
"ship_country"=>"US",
"to_city"=>"Harrison",
"to_addr1"=>"2000 Freight LTL Testing",
"to_country"=>"US",
"to_code"=>"72601",
"to_state"=>"AR",
"to_name"=>"Test Qa",
"to_phone"=>"+1 844-763-0131",
"weight_unit"=>"LBS",
"customer_classification"=>"01",
"packaging_type"=>"YOUR_PACKAGING",
"special_instructions"=>"",
"image_type"=>"PDF",
"test"=>true,
"billing"=>
[{"type"=>"transportation",
"payment_type"=>"third_party",
"company"=>"Acme Inc.",
"account"=>"805222441",
"postal_code"=>"72601",
"country_code"=>"US",
"phone"=>"+18447630131",
"city"=>"Harrison",
"state"=>"AR",
"addr1"=>"2000 Freight LTL Testing"}]}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"freight_account_number": "YOUR_FREIGHT_ACCOUNT_NUMBER",
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 155.0,
"length": 1,
"width": 1,
"height": 1,
"freight_class": "CLASS_070",
"description": "B48-48-16",
"packaging_type": "PALLET",
"pieces": 1
}
],
"customs": [],
"addons": [],
"package_count": 1,
"packageCount": 1,
"service": "FEDEX_FREIGHT_PRIORITY",
"lift_gate_required": false,
"residential": false,
"shipper": "Vendor - Harrison, AR",
"ship_addr1": "1202 Chalet Ln",
"ship_phone": "+1 844-763-0135",
"ship_city": "Harrison",
"ship_state": "AR",
"ship_code": "72601",
"ship_country": "US",
"to_city": "Harrison",
"to_addr1": "2000 Freight LTL Testing",
"to_country": "US",
"to_code": "72601",
"to_state": "AR",
"to_name": "Test Qa",
"to_phone": "+1 844-763-0131",
"weight_unit": "LBS",
"customer_classification": "01",
"packaging_type": "YOUR_PACKAGING",
"special_instructions": "",
"image_type": "PDF",
"test": true,
"billing": [
{
"type": "transportation",
"payment_type": "third_party",
"company": "Acme Inc.",
"account": "805222441",
"postal_code": "72601",
"country_code": "US",
"phone": "+18447630131",
"city": "Harrison",
"state": "AR",
"addr1": "2000 Freight LTL Testing"
}
]
}
}
)
FedEx - Freight Label w/ BOL
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"freight_account_number": "YOUR_FREIGHT_ACCOUNT_NUMBER",
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"service": "FEDEX_FREIGHT_ECONOMY",
"lift_gate_required": true,
"packages": [
{
"description": "Bailing wire",
"weight": 200.00,
"length": 150,
"width": 90,
"height": 100,
"packaging_type": "PALLET",
"freight_class": "50",
"pieces": 10
}
],
"shipper": "FedEx",
"ship_addr1": "1202 Chalet Ln",
"ship_addr2": "Do Not Delete - Test Account",
"ship_city": "Harrison",
"ship_state": "AR",
"ship_code": "72601",
"ship_phone": "8705551234",
"to_name": "ABC Widget Co",
"to_addr1": "1234 Main St",
"to_addr2": "Suite 200",
"to_state": "OH",
"to_city": "Akron",
"to_code": "44333",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'SubmitShipment',
'params' =>
array (
'freight_account_number' => 'YOUR_FREIGHT_ACCOUNT_NUMBER',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'service' => 'FEDEX_FREIGHT_ECONOMY',
'lift_gate_required' => true,
'packages' =>
array (
0 =>
array (
'description' => 'Bailing wire',
'weight' => 200.0,
'length' => 150,
'width' => 90,
'height' => 100,
'packaging_type' => 'PALLET',
'freight_class' => '50',
'pieces' => 10,
),
),
'shipper' => 'FedEx',
'ship_addr1' => '1202 Chalet Ln',
'ship_addr2' => 'Do Not Delete - Test Account',
'ship_city' => 'Harrison',
'ship_state' => 'AR',
'ship_code' => '72601',
'ship_phone' => '8705551234',
'to_name' => 'ABC Widget Co',
'to_addr1' => '1234 Main St',
'to_addr2' => 'Suite 200',
'to_state' => 'OH',
'to_city' => 'Akron',
'to_code' => '44333',
'to_phone' => '1231231234',
'packaging_type' => 'YOUR_PACKAGING',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'freight_account_number': 'YOUR_FREIGHT_ACCOUNT_NUMBER',
'key': 'YOUR_KEY',
'lift_gate_required': True,
'meter_number': 'YOUR_METER_NUMBER',
'packages': [{'description': 'Bailing wire',
'freight_class': '50',
'height': 100,
'length': 150,
'packaging_type': 'PALLET',
'pieces': 10,
'weight': 200.0,
'width': 90}],
'packaging_type': 'YOUR_PACKAGING',
'password': 'YOUR_PASSWORD',
'service': 'FEDEX_FREIGHT_ECONOMY',
'ship_addr1': '1202 Chalet Ln',
'ship_addr2': 'Do Not Delete - Test Account',
'ship_city': 'Harrison',
'ship_code': '72601',
'ship_phone': '8705551234',
'ship_state': 'AR',
'shipper': 'FedEx',
'test': True,
'to_addr1': '1234 Main St',
'to_addr2': 'Suite 200',
'to_city': 'Akron',
'to_code': '44333',
'to_name': 'ABC Widget Co',
'to_phone': '1231231234',
'to_state': 'OH'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"SubmitShipment",
"params"=>
{"freight_account_number"=>"YOUR_FREIGHT_ACCOUNT_NUMBER",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"service"=>"FEDEX_FREIGHT_ECONOMY",
"lift_gate_required"=>true,
"packages"=>
[{"description"=>"Bailing wire",
"weight"=>200.0,
"length"=>150,
"width"=>90,
"height"=>100,
"packaging_type"=>"PALLET",
"freight_class"=>"50",
"pieces"=>10}],
"shipper"=>"FedEx",
"ship_addr1"=>"1202 Chalet Ln",
"ship_addr2"=>"Do Not Delete - Test Account",
"ship_city"=>"Harrison",
"ship_state"=>"AR",
"ship_code"=>"72601",
"ship_phone"=>"8705551234",
"to_name"=>"ABC Widget Co",
"to_addr1"=>"1234 Main St",
"to_addr2"=>"Suite 200",
"to_state"=>"OH",
"to_city"=>"Akron",
"to_code"=>"44333",
"to_phone"=>"1231231234",
"packaging_type"=>"YOUR_PACKAGING",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"freight_account_number": "YOUR_FREIGHT_ACCOUNT_NUMBER",
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"service": "FEDEX_FREIGHT_ECONOMY",
"lift_gate_required": true,
"packages": [
{
"description": "Bailing wire",
"weight": 200.00,
"length": 150,
"width": 90,
"height": 100,
"packaging_type": "PALLET",
"freight_class": "50",
"pieces": 10
}
],
"shipper": "FedEx",
"ship_addr1": "1202 Chalet Ln",
"ship_addr2": "Do Not Delete - Test Account",
"ship_city": "Harrison",
"ship_state": "AR",
"ship_code": "72601",
"ship_phone": "8705551234",
"to_name": "ABC Widget Co",
"to_addr1": "1234 Main St",
"to_addr2": "Suite 200",
"to_state": "OH",
"to_city": "Akron",
"to_code": "44333",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
)
FedEx - Freight Label w/ BOL multi-pallet
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"freight_account_number": "YOUR_FREIGHT_ACCOUNT_NUMBER",
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"service": "FEDEX_FREIGHT_ECONOMY",
"lift_gate_required": true,
"packages": [
{
"description": "Bailing wire",
"weight": 200.00,
"length": 150,
"width": 90,
"height": 100,
"packaging_type": "PALLET",
"freight_class": "50",
"pieces": 10
},
{
"description": "Bailing wire",
"weight": 200.00,
"length": 150,
"width": 90,
"height": 100,
"packaging_type": "PALLET",
"freight_class": "50",
"pieces": 10
}
],
"shipper": "FedEx",
"ship_addr1": "1202 Chalet Ln",
"ship_addr2": "Do Not Delete - Test Account",
"ship_city": "Harrison",
"ship_state": "AR",
"ship_code": "72601",
"ship_phone": "8705551234",
"to_name": "ABC Widget Co",
"to_addr1": "1234 Main St",
"to_addr2": "Suite 200",
"to_state": "OH",
"to_city": "Akron",
"to_code": "44333",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'SubmitShipment',
'params' =>
array (
'freight_account_number' => 'YOUR_FREIGHT_ACCOUNT_NUMBER',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'service' => 'FEDEX_FREIGHT_ECONOMY',
'lift_gate_required' => true,
'packages' =>
array (
0 =>
array (
'description' => 'Bailing wire',
'weight' => 200.0,
'length' => 150,
'width' => 90,
'height' => 100,
'packaging_type' => 'PALLET',
'freight_class' => '50',
'pieces' => 10,
),
1 =>
array (
'description' => 'Bailing wire',
'weight' => 200.0,
'length' => 150,
'width' => 90,
'height' => 100,
'packaging_type' => 'PALLET',
'freight_class' => '50',
'pieces' => 10,
),
),
'shipper' => 'FedEx',
'ship_addr1' => '1202 Chalet Ln',
'ship_addr2' => 'Do Not Delete - Test Account',
'ship_city' => 'Harrison',
'ship_state' => 'AR',
'ship_code' => '72601',
'ship_phone' => '8705551234',
'to_name' => 'ABC Widget Co',
'to_addr1' => '1234 Main St',
'to_addr2' => 'Suite 200',
'to_state' => 'OH',
'to_city' => 'Akron',
'to_code' => '44333',
'to_phone' => '1231231234',
'packaging_type' => 'YOUR_PACKAGING',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'freight_account_number': 'YOUR_FREIGHT_ACCOUNT_NUMBER',
'key': 'YOUR_KEY',
'lift_gate_required': True,
'meter_number': 'YOUR_METER_NUMBER',
'packages': [{'description': 'Bailing wire',
'freight_class': '50',
'height': 100,
'length': 150,
'packaging_type': 'PALLET',
'pieces': 10,
'weight': 200.0,
'width': 90},
{'description': 'Bailing wire',
'freight_class': '50',
'height': 100,
'length': 150,
'packaging_type': 'PALLET',
'pieces': 10,
'weight': 200.0,
'width': 90}],
'packaging_type': 'YOUR_PACKAGING',
'password': 'YOUR_PASSWORD',
'service': 'FEDEX_FREIGHT_ECONOMY',
'ship_addr1': '1202 Chalet Ln',
'ship_addr2': 'Do Not Delete - Test Account',
'ship_city': 'Harrison',
'ship_code': '72601',
'ship_phone': '8705551234',
'ship_state': 'AR',
'shipper': 'FedEx',
'test': True,
'to_addr1': '1234 Main St',
'to_addr2': 'Suite 200',
'to_city': 'Akron',
'to_code': '44333',
'to_name': 'ABC Widget Co',
'to_phone': '1231231234',
'to_state': 'OH'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"SubmitShipment",
"params"=>
{"freight_account_number"=>"YOUR_FREIGHT_ACCOUNT_NUMBER",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"service"=>"FEDEX_FREIGHT_ECONOMY",
"lift_gate_required"=>true,
"packages"=>
[{"description"=>"Bailing wire",
"weight"=>200.0,
"length"=>150,
"width"=>90,
"height"=>100,
"packaging_type"=>"PALLET",
"freight_class"=>"50",
"pieces"=>10},
{"description"=>"Bailing wire",
"weight"=>200.0,
"length"=>150,
"width"=>90,
"height"=>100,
"packaging_type"=>"PALLET",
"freight_class"=>"50",
"pieces"=>10}],
"shipper"=>"FedEx",
"ship_addr1"=>"1202 Chalet Ln",
"ship_addr2"=>"Do Not Delete - Test Account",
"ship_city"=>"Harrison",
"ship_state"=>"AR",
"ship_code"=>"72601",
"ship_phone"=>"8705551234",
"to_name"=>"ABC Widget Co",
"to_addr1"=>"1234 Main St",
"to_addr2"=>"Suite 200",
"to_state"=>"OH",
"to_city"=>"Akron",
"to_code"=>"44333",
"to_phone"=>"1231231234",
"packaging_type"=>"YOUR_PACKAGING",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"freight_account_number": "YOUR_FREIGHT_ACCOUNT_NUMBER",
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"service": "FEDEX_FREIGHT_ECONOMY",
"lift_gate_required": true,
"packages": [
{
"description": "Bailing wire",
"weight": 200.00,
"length": 150,
"width": 90,
"height": 100,
"packaging_type": "PALLET",
"freight_class": "50",
"pieces": 10
},
{
"description": "Bailing wire",
"weight": 200.00,
"length": 150,
"width": 90,
"height": 100,
"packaging_type": "PALLET",
"freight_class": "50",
"pieces": 10
}
],
"shipper": "FedEx",
"ship_addr1": "1202 Chalet Ln",
"ship_addr2": "Do Not Delete - Test Account",
"ship_city": "Harrison",
"ship_state": "AR",
"ship_code": "72601",
"ship_phone": "8705551234",
"to_name": "ABC Widget Co",
"to_addr1": "1234 Main St",
"to_addr2": "Suite 200",
"to_state": "OH",
"to_city": "Akron",
"to_code": "44333",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
)
FedEx - Freight Rating
{
"carrier": "FedEx",
"action": "GetAllRates",
"params": {
"freight_account_number": "YOUR_FREIGHT_ACCOUNT_NUMBER",
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 200,
"freight_class": "50"
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "1202 Chalet Ln",
"ship_addr2": "Do Not Delete - Test Account",
"ship_city": "Harrison",
"ship_state": "AR",
"ship_code": "72601",
"ship_country": "US",
"to_country": "US",
"to_city": "Akron",
"to_state": "OH",
"to_code": "44333",
"weight_unit": "LB",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'GetAllRates',
'params' =>
array (
'freight_account_number' => 'YOUR_FREIGHT_ACCOUNT_NUMBER',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 200,
'freight_class' => '50',
),
),
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '1202 Chalet Ln',
'ship_addr2' => 'Do Not Delete - Test Account',
'ship_city' => 'Harrison',
'ship_state' => 'AR',
'ship_code' => '72601',
'ship_country' => 'US',
'to_country' => 'US',
'to_city' => 'Akron',
'to_state' => 'OH',
'to_code' => '44333',
'weight_unit' => 'LB',
'test' => true,
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'customs': [],
'freight_account_number': 'YOUR_FREIGHT_ACCOUNT_NUMBER',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'packages': [{'freight_class': '50', 'weight': 200}],
'password': 'YOUR_PASSWORD',
'ship_addr1': '1202 Chalet Ln',
'ship_addr2': 'Do Not Delete - Test Account',
'ship_city': 'Harrison',
'ship_code': '72601',
'ship_country': 'US',
'ship_state': 'AR',
'shipper': 'RocketShipIt',
'test': True,
'to_city': 'Akron',
'to_code': '44333',
'to_country': 'US',
'to_state': 'OH',
'weight_unit': 'LB'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"GetAllRates",
"params"=>
{"freight_account_number"=>"YOUR_FREIGHT_ACCOUNT_NUMBER",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"packages"=>[{"weight"=>200, "freight_class"=>"50"}],
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"1202 Chalet Ln",
"ship_addr2"=>"Do Not Delete - Test Account",
"ship_city"=>"Harrison",
"ship_state"=>"AR",
"ship_code"=>"72601",
"ship_country"=>"US",
"to_country"=>"US",
"to_city"=>"Akron",
"to_state"=>"OH",
"to_code"=>"44333",
"weight_unit"=>"LB",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "GetAllRates",
"params": {
"freight_account_number": "YOUR_FREIGHT_ACCOUNT_NUMBER",
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 200,
"freight_class": "50"
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "1202 Chalet Ln",
"ship_addr2": "Do Not Delete - Test Account",
"ship_city": "Harrison",
"ship_state": "AR",
"ship_code": "72601",
"ship_country": "US",
"to_country": "US",
"to_city": "Akron",
"to_state": "OH",
"to_code": "44333",
"weight_unit": "LB",
"test": true
}
}
)
FedEx - Freight Rating w/ liftgate
{
"carrier": "FedEx",
"action": "GetAllRates",
"params": {
"freight_account_number": "YOUR_FREIGHT_ACCOUNT_NUMBER",
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 200,
"freight_class": "50"
}
],
"customs": [],
"lift_gate_required": true,
"shipper": "RocketShipIt",
"ship_addr1": "1202 Chalet Ln",
"ship_addr2": "Do Not Delete - Test Account",
"ship_city": "Harrison",
"ship_state": "AR",
"ship_code": "72601",
"ship_country": "US",
"to_country": "US",
"to_city": "Akron",
"to_state": "OH",
"to_code": "44333",
"weight_unit": "LB",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'GetAllRates',
'params' =>
array (
'freight_account_number' => 'YOUR_FREIGHT_ACCOUNT_NUMBER',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 200,
'freight_class' => '50',
),
),
'customs' =>
array (
),
'lift_gate_required' => true,
'shipper' => 'RocketShipIt',
'ship_addr1' => '1202 Chalet Ln',
'ship_addr2' => 'Do Not Delete - Test Account',
'ship_city' => 'Harrison',
'ship_state' => 'AR',
'ship_code' => '72601',
'ship_country' => 'US',
'to_country' => 'US',
'to_city' => 'Akron',
'to_state' => 'OH',
'to_code' => '44333',
'weight_unit' => 'LB',
'test' => true,
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'customs': [],
'freight_account_number': 'YOUR_FREIGHT_ACCOUNT_NUMBER',
'key': 'YOUR_KEY',
'lift_gate_required': True,
'meter_number': 'YOUR_METER_NUMBER',
'packages': [{'freight_class': '50', 'weight': 200}],
'password': 'YOUR_PASSWORD',
'ship_addr1': '1202 Chalet Ln',
'ship_addr2': 'Do Not Delete - Test Account',
'ship_city': 'Harrison',
'ship_code': '72601',
'ship_country': 'US',
'ship_state': 'AR',
'shipper': 'RocketShipIt',
'test': True,
'to_city': 'Akron',
'to_code': '44333',
'to_country': 'US',
'to_state': 'OH',
'weight_unit': 'LB'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"GetAllRates",
"params"=>
{"freight_account_number"=>"YOUR_FREIGHT_ACCOUNT_NUMBER",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"packages"=>[{"weight"=>200, "freight_class"=>"50"}],
"customs"=>[],
"lift_gate_required"=>true,
"shipper"=>"RocketShipIt",
"ship_addr1"=>"1202 Chalet Ln",
"ship_addr2"=>"Do Not Delete - Test Account",
"ship_city"=>"Harrison",
"ship_state"=>"AR",
"ship_code"=>"72601",
"ship_country"=>"US",
"to_country"=>"US",
"to_city"=>"Akron",
"to_state"=>"OH",
"to_code"=>"44333",
"weight_unit"=>"LB",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "GetAllRates",
"params": {
"freight_account_number": "YOUR_FREIGHT_ACCOUNT_NUMBER",
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 200,
"freight_class": "50"
}
],
"customs": [],
"lift_gate_required": true,
"shipper": "RocketShipIt",
"ship_addr1": "1202 Chalet Ln",
"ship_addr2": "Do Not Delete - Test Account",
"ship_city": "Harrison",
"ship_state": "AR",
"ship_code": "72601",
"ship_country": "US",
"to_country": "US",
"to_city": "Akron",
"to_state": "OH",
"to_code": "44333",
"weight_unit": "LB",
"test": true
}
}
)
FedEx - Freight Rating with Addons
{
"carrier": "FedEx",
"action": "GetAllRates",
"params": {
"freight_account_number": "YOUR_FREIGHT_ACCOUNT_NUMBER",
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 200,
"freight_class": "50"
}
],
"addons": [
"INSIDE_DELIVERY",
"LIMITED_ACCESS_DELIVERY",
"CALL_BEFORE_DELIVERY"
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "1202 Chalet Ln",
"ship_addr2": "Do Not Delete - Test Account",
"ship_city": "Harrison",
"ship_state": "AR",
"ship_code": "72601",
"ship_country": "US",
"to_country": "US",
"to_city": "Akron",
"to_state": "OH",
"to_code": "44333",
"weight_unit": "LB",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'GetAllRates',
'params' =>
array (
'freight_account_number' => 'YOUR_FREIGHT_ACCOUNT_NUMBER',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 200,
'freight_class' => '50',
),
),
'addons' =>
array (
0 => 'INSIDE_DELIVERY',
1 => 'LIMITED_ACCESS_DELIVERY',
2 => 'CALL_BEFORE_DELIVERY',
),
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '1202 Chalet Ln',
'ship_addr2' => 'Do Not Delete - Test Account',
'ship_city' => 'Harrison',
'ship_state' => 'AR',
'ship_code' => '72601',
'ship_country' => 'US',
'to_country' => 'US',
'to_city' => 'Akron',
'to_state' => 'OH',
'to_code' => '44333',
'weight_unit' => 'LB',
'test' => true,
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'addons': ['INSIDE_DELIVERY',
'LIMITED_ACCESS_DELIVERY',
'CALL_BEFORE_DELIVERY'],
'customs': [],
'freight_account_number': 'YOUR_FREIGHT_ACCOUNT_NUMBER',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'packages': [{'freight_class': '50', 'weight': 200}],
'password': 'YOUR_PASSWORD',
'ship_addr1': '1202 Chalet Ln',
'ship_addr2': 'Do Not Delete - Test Account',
'ship_city': 'Harrison',
'ship_code': '72601',
'ship_country': 'US',
'ship_state': 'AR',
'shipper': 'RocketShipIt',
'test': True,
'to_city': 'Akron',
'to_code': '44333',
'to_country': 'US',
'to_state': 'OH',
'weight_unit': 'LB'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"GetAllRates",
"params"=>
{"freight_account_number"=>"YOUR_FREIGHT_ACCOUNT_NUMBER",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"packages"=>[{"weight"=>200, "freight_class"=>"50"}],
"addons"=>
["INSIDE_DELIVERY", "LIMITED_ACCESS_DELIVERY", "CALL_BEFORE_DELIVERY"],
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"1202 Chalet Ln",
"ship_addr2"=>"Do Not Delete - Test Account",
"ship_city"=>"Harrison",
"ship_state"=>"AR",
"ship_code"=>"72601",
"ship_country"=>"US",
"to_country"=>"US",
"to_city"=>"Akron",
"to_state"=>"OH",
"to_code"=>"44333",
"weight_unit"=>"LB",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "GetAllRates",
"params": {
"freight_account_number": "YOUR_FREIGHT_ACCOUNT_NUMBER",
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 200,
"freight_class": "50"
}
],
"addons": [
"INSIDE_DELIVERY",
"LIMITED_ACCESS_DELIVERY",
"CALL_BEFORE_DELIVERY"
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "1202 Chalet Ln",
"ship_addr2": "Do Not Delete - Test Account",
"ship_city": "Harrison",
"ship_state": "AR",
"ship_code": "72601",
"ship_country": "US",
"to_country": "US",
"to_city": "Akron",
"to_state": "OH",
"to_code": "44333",
"weight_unit": "LB",
"test": true
}
}
)
FedEx - Get BOL Freight Document
{
"carrier": "FedEx",
"action": "GetTrackingDocuments",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"secure_spod_account": "82073541",
"tracking_number": "4875453004"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'GetTrackingDocuments',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'secure_spod_account' => '82073541',
'tracking_number' => '4875453004',
),
)
);
rs.request(
{'action': 'GetTrackingDocuments',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'password': 'YOUR_PASSWORD',
'secure_spod_account': '82073541',
'tracking_number': '4875453004'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"GetTrackingDocuments",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"secure_spod_account"=>"82073541",
"tracking_number"=>"4875453004"}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "GetTrackingDocuments",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"secure_spod_account": "82073541",
"tracking_number": "4875453004"
}
}
)
FedEx - Label
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 15
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'SubmitShipment',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 15,
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'to_phone' => '1231231234',
'packaging_type' => 'YOUR_PACKAGING',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'packages': [{'weight': 15}],
'packaging_type': 'YOUR_PACKAGING',
'password': 'YOUR_PASSWORD',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"SubmitShipment",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"packages"=>[{"weight"=>15}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"to_phone"=>"1231231234",
"packaging_type"=>"YOUR_PACKAGING",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 15
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
)
FedEx - Label Alcohol
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 15,
"alcohol": true
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'SubmitShipment',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 15,
'alcohol' => true,
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'to_phone' => '1231231234',
'packaging_type' => 'YOUR_PACKAGING',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'packages': [{'alcohol': True, 'weight': 15}],
'packaging_type': 'YOUR_PACKAGING',
'password': 'YOUR_PASSWORD',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"SubmitShipment",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"packages"=>[{"weight"=>15, "alcohol"=>true}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"to_phone"=>"1231231234",
"packaging_type"=>"YOUR_PACKAGING",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 15,
"alcohol": true
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
)
FedEx - Label Alcohol to Licensee
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"recipient_type": "LICENSEE",
"packages": [
{
"weight": 15,
"alcohol": true
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'SubmitShipment',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'recipient_type' => 'LICENSEE',
'packages' =>
array (
0 =>
array (
'weight' => 15,
'alcohol' => true,
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'to_phone' => '1231231234',
'packaging_type' => 'YOUR_PACKAGING',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'packages': [{'alcohol': True, 'weight': 15}],
'packaging_type': 'YOUR_PACKAGING',
'password': 'YOUR_PASSWORD',
'recipient_type': 'LICENSEE',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"SubmitShipment",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"recipient_type"=>"LICENSEE",
"packages"=>[{"weight"=>15, "alcohol"=>true}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"to_phone"=>"1231231234",
"packaging_type"=>"YOUR_PACKAGING",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"recipient_type": "LICENSEE",
"packages": [
{
"weight": 15,
"alcohol": true
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
)
FedEx - Label Alternate Return Address
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 15
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"label": {
"printed_origin": {
"phone": "123-123-1234",
"name": "John Doe",
"addr1": "940 Presidio Ave",
"state": "CA",
"city": "San Francisco",
"code": "94112",
"country": "US"
}
},
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'SubmitShipment',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 15,
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'to_phone' => '1231231234',
'packaging_type' => 'YOUR_PACKAGING',
'label' =>
array (
'printed_origin' =>
array (
'phone' => '123-123-1234',
'name' => 'John Doe',
'addr1' => '940 Presidio Ave',
'state' => 'CA',
'city' => 'San Francisco',
'code' => '94112',
'country' => 'US',
),
),
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'key': 'YOUR_KEY',
'label': {'printed_origin': {'addr1': '940 Presidio Ave',
'city': 'San Francisco',
'code': '94112',
'country': 'US',
'name': 'John Doe',
'phone': '123-123-1234',
'state': 'CA'}},
'meter_number': 'YOUR_METER_NUMBER',
'packages': [{'weight': 15}],
'packaging_type': 'YOUR_PACKAGING',
'password': 'YOUR_PASSWORD',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"SubmitShipment",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"packages"=>[{"weight"=>15}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"to_phone"=>"1231231234",
"packaging_type"=>"YOUR_PACKAGING",
"label"=>
{"printed_origin"=>
{"phone"=>"123-123-1234",
"name"=>"John Doe",
"addr1"=>"940 Presidio Ave",
"state"=>"CA",
"city"=>"San Francisco",
"code"=>"94112",
"country"=>"US"}},
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 15
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"label": {
"printed_origin": {
"phone": "123-123-1234",
"name": "John Doe",
"addr1": "940 Presidio Ave",
"state": "CA",
"city": "San Francisco",
"code": "94112",
"country": "US"
}
},
"test": true
}
}
)
FedEx - Label Bill Recipient
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"key": "YOUR_FEDEX_API_KEY",
"account_number": "YOUR_ACCOUNT_NUMBER",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"billing": [
{
"type": "transportation",
"payment_type": "recipient",
"account": "abc123",
"postal_code": "94608",
"country_code": "US"
}
],
"packages": [
{
"weight": 4,
"length": 7
}
],
"service": "FEDEX_GROUND",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "GIF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'YOUR_FEDEX_API_KEY',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'billing' =>
array (
0 =>
array (
'type' => 'transportation',
'payment_type' => 'recipient',
'account' => 'abc123',
'postal_code' => '94608',
'country_code' => 'US',
),
),
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
),
),
'service' => 'FEDEX_GROUND',
'shipper' => '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_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'GIF',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'billing': [{'account': 'abc123',
'country_code': 'US',
'payment_type': 'recipient',
'postal_code': '94608',
'type': 'transportation'}],
'image_type': 'GIF',
'key': 'YOUR_FEDEX_API_KEY',
'packages': [{'length': 7, 'weight': 4}],
'password': 'YOUR_PASSWORD',
'service': 'FEDEX_GROUND',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'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',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"YOUR_FEDEX_API_KEY",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"billing"=>
[{"type"=>"transportation",
"payment_type"=>"recipient",
"account"=>"abc123",
"postal_code"=>"94608",
"country_code"=>"US"}],
"packages"=>[{"weight"=>4, "length"=>7}],
"service"=>"FEDEX_GROUND",
"shipper"=>"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_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"GIF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"key": "YOUR_FEDEX_API_KEY",
"account_number": "YOUR_ACCOUNT_NUMBER",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"billing": [
{
"type": "transportation",
"payment_type": "recipient",
"account": "abc123",
"postal_code": "94608",
"country_code": "US"
}
],
"packages": [
{
"weight": 4,
"length": 7
}
],
"service": "FEDEX_GROUND",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "GIF",
"test": true
}
}
)
FedEx - Label Dry Ice
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 15,
"dry_ice": {
"weight": 2
}
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'SubmitShipment',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 15,
'dry_ice' =>
array (
'weight' => 2,
),
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'to_phone' => '1231231234',
'packaging_type' => 'YOUR_PACKAGING',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'packages': [{'dry_ice': {'weight': 2}, 'weight': 15}],
'packaging_type': 'YOUR_PACKAGING',
'password': 'YOUR_PASSWORD',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"SubmitShipment",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"packages"=>[{"weight"=>15, "dry_ice"=>{"weight"=>2}}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"to_phone"=>"1231231234",
"packaging_type"=>"YOUR_PACKAGING",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 15,
"dry_ice": {
"weight": 2
}
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
)
FedEx - Label Email Notifications
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"notify": [
{
"email": "customer@email.com",
"type": "ON_SHIPMENT,ON_TENDER,ON_EXCEPTION,ON_DELIVERY"
}
],
"packages": [
{
"weight": 15
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'SubmitShipment',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'notify' =>
array (
0 =>
array (
'email' => 'customer@email.com',
'type' => 'ON_SHIPMENT,ON_TENDER,ON_EXCEPTION,ON_DELIVERY',
),
),
'packages' =>
array (
0 =>
array (
'weight' => 15,
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'to_phone' => '1231231234',
'packaging_type' => 'YOUR_PACKAGING',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'notify': [{'email': 'customer@email.com',
'type': 'ON_SHIPMENT,ON_TENDER,ON_EXCEPTION,ON_DELIVERY'}],
'packages': [{'weight': 15}],
'packaging_type': 'YOUR_PACKAGING',
'password': 'YOUR_PASSWORD',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"SubmitShipment",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"notify"=>
[{"email"=>"customer@email.com",
"type"=>"ON_SHIPMENT,ON_TENDER,ON_EXCEPTION,ON_DELIVERY"}],
"packages"=>[{"weight"=>15}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"to_phone"=>"1231231234",
"packaging_type"=>"YOUR_PACKAGING",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"notify": [
{
"email": "customer@email.com",
"type": "ON_SHIPMENT,ON_TENDER,ON_EXCEPTION,ON_DELIVERY"
}
],
"packages": [
{
"weight": 15
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
)
FedEx - Label Ground Collect (Not COD)
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"billing": [
{
"type": "transportation",
"payment_type": "collect",
"account": "abc123"
}
],
"packages": [
{
"width": 14,
"length": 11,
"height": 8,
"weight": 5,
"reference_code": "P_O_NUMBER",
"reference_value": "abc123",
"reference_code2": "CUSTOMER_REFERENCE",
"reference_value2": "123456"
}
],
"shipper": "Acme Inc",
"ship_addr1": "123 Main St.",
"ship_city": "Vancouver",
"ship_state": "WA",
"ship_code": "98685",
"ship_phone": "123-123-1234",
"ship_country": "US",
"to_country": "US",
"to_code": "11040",
"to_name": "Big Box Store",
"to_addr1": "123 Fake St.",
"to_state": "NY",
"to_city": "New Hyde Park",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'SubmitShipment',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'billing' =>
array (
0 =>
array (
'type' => 'transportation',
'payment_type' => 'collect',
'account' => 'abc123',
),
),
'packages' =>
array (
0 =>
array (
'width' => 14,
'length' => 11,
'height' => 8,
'weight' => 5,
'reference_code' => 'P_O_NUMBER',
'reference_value' => 'abc123',
'reference_code2' => 'CUSTOMER_REFERENCE',
'reference_value2' => '123456',
),
),
'shipper' => 'Acme Inc',
'ship_addr1' => '123 Main St.',
'ship_city' => 'Vancouver',
'ship_state' => 'WA',
'ship_code' => '98685',
'ship_phone' => '123-123-1234',
'ship_country' => 'US',
'to_country' => 'US',
'to_code' => '11040',
'to_name' => 'Big Box Store',
'to_addr1' => '123 Fake St.',
'to_state' => 'NY',
'to_city' => 'New Hyde Park',
'packaging_type' => 'YOUR_PACKAGING',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'billing': [{'account': 'abc123',
'payment_type': 'collect',
'type': 'transportation'}],
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'packages': [{'height': 8,
'length': 11,
'reference_code': 'P_O_NUMBER',
'reference_code2': 'CUSTOMER_REFERENCE',
'reference_value': 'abc123',
'reference_value2': '123456',
'weight': 5,
'width': 14}],
'packaging_type': 'YOUR_PACKAGING',
'password': 'YOUR_PASSWORD',
'ship_addr1': '123 Main St.',
'ship_city': 'Vancouver',
'ship_code': '98685',
'ship_country': 'US',
'ship_phone': '123-123-1234',
'ship_state': 'WA',
'shipper': 'Acme Inc',
'test': True,
'to_addr1': '123 Fake St.',
'to_city': 'New Hyde Park',
'to_code': '11040',
'to_country': 'US',
'to_name': 'Big Box Store',
'to_state': 'NY'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"SubmitShipment",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"billing"=>
[{"type"=>"transportation",
"payment_type"=>"collect",
"account"=>"abc123"}],
"packages"=>
[{"width"=>14,
"length"=>11,
"height"=>8,
"weight"=>5,
"reference_code"=>"P_O_NUMBER",
"reference_value"=>"abc123",
"reference_code2"=>"CUSTOMER_REFERENCE",
"reference_value2"=>"123456"}],
"shipper"=>"Acme Inc",
"ship_addr1"=>"123 Main St.",
"ship_city"=>"Vancouver",
"ship_state"=>"WA",
"ship_code"=>"98685",
"ship_phone"=>"123-123-1234",
"ship_country"=>"US",
"to_country"=>"US",
"to_code"=>"11040",
"to_name"=>"Big Box Store",
"to_addr1"=>"123 Fake St.",
"to_state"=>"NY",
"to_city"=>"New Hyde Park",
"packaging_type"=>"YOUR_PACKAGING",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"billing": [
{
"type": "transportation",
"payment_type": "collect",
"account": "abc123"
}
],
"packages": [
{
"width": 14,
"length": 11,
"height": 8,
"weight": 5,
"reference_code": "P_O_NUMBER",
"reference_value": "abc123",
"reference_code2": "CUSTOMER_REFERENCE",
"reference_value2": "123456"
}
],
"shipper": "Acme Inc",
"ship_addr1": "123 Main St.",
"ship_city": "Vancouver",
"ship_state": "WA",
"ship_code": "98685",
"ship_phone": "123-123-1234",
"ship_country": "US",
"to_country": "US",
"to_code": "11040",
"to_name": "Big Box Store",
"to_addr1": "123 Fake St.",
"to_state": "NY",
"to_city": "New Hyde Park",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
)
FedEx - Label Hidden Account Number
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"label": {
"masked_data": [
"SHIPPER_ACCOUNT_NUMBER"
]
},
"packages": [
{
"weight": 15
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'SubmitShipment',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'label' =>
array (
'masked_data' =>
array (
0 => 'SHIPPER_ACCOUNT_NUMBER',
),
),
'packages' =>
array (
0 =>
array (
'weight' => 15,
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'to_phone' => '1231231234',
'packaging_type' => 'YOUR_PACKAGING',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'key': 'YOUR_KEY',
'label': {'masked_data': ['SHIPPER_ACCOUNT_NUMBER']},
'meter_number': 'YOUR_METER_NUMBER',
'packages': [{'weight': 15}],
'packaging_type': 'YOUR_PACKAGING',
'password': 'YOUR_PASSWORD',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"SubmitShipment",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"label"=>{"masked_data"=>["SHIPPER_ACCOUNT_NUMBER"]},
"packages"=>[{"weight"=>15}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"to_phone"=>"1231231234",
"packaging_type"=>"YOUR_PACKAGING",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"label": {
"masked_data": [
"SHIPPER_ACCOUNT_NUMBER"
]
},
"packages": [
{
"weight": 15
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
)
FedEx - Label Hold at Location
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"packages": [
{
"weight": 15
}
],
"hold_at_location": true,
"hold_phone": "1231231234",
"hold_addr1": "8549 Wilshire Blvd",
"hold_city": "Beverly Hills",
"hold_state": "CA",
"hold_code": "90211",
"hold_country": "US",
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'SubmitShipment',
'params' =>
array (
'packages' =>
array (
0 =>
array (
'weight' => 15,
),
),
'hold_at_location' => true,
'hold_phone' => '1231231234',
'hold_addr1' => '8549 Wilshire Blvd',
'hold_city' => 'Beverly Hills',
'hold_state' => 'CA',
'hold_code' => '90211',
'hold_country' => 'US',
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'to_phone' => '1231231234',
'packaging_type' => 'YOUR_PACKAGING',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx',
'params': {'hold_addr1': '8549 Wilshire Blvd',
'hold_at_location': True,
'hold_city': 'Beverly Hills',
'hold_code': '90211',
'hold_country': 'US',
'hold_phone': '1231231234',
'hold_state': 'CA',
'packages': [{'weight': 15}],
'packaging_type': 'YOUR_PACKAGING',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"SubmitShipment",
"params"=>
{"packages"=>[{"weight"=>15}],
"hold_at_location"=>true,
"hold_phone"=>"1231231234",
"hold_addr1"=>"8549 Wilshire Blvd",
"hold_city"=>"Beverly Hills",
"hold_state"=>"CA",
"hold_code"=>"90211",
"hold_country"=>"US",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"to_phone"=>"1231231234",
"packaging_type"=>"YOUR_PACKAGING",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"packages": [
{
"weight": 15
}
],
"hold_at_location": true,
"hold_phone": "1231231234",
"hold_addr1": "8549 Wilshire Blvd",
"hold_city": "Beverly Hills",
"hold_state": "CA",
"hold_code": "90211",
"hold_country": "US",
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
)
FedEx - Label Home Delivery No Signature
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 15,
"signature_type": "NO_SIGNATURE_REQUIRED"
}
],
"service": "GROUND_HOME_DELIVERY",
"residential": true,
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'SubmitShipment',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 15,
'signature_type' => 'NO_SIGNATURE_REQUIRED',
),
),
'service' => 'GROUND_HOME_DELIVERY',
'residential' => true,
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'to_phone' => '1231231234',
'packaging_type' => 'YOUR_PACKAGING',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'packages': [{'signature_type': 'NO_SIGNATURE_REQUIRED',
'weight': 15}],
'packaging_type': 'YOUR_PACKAGING',
'password': 'YOUR_PASSWORD',
'residential': True,
'service': 'GROUND_HOME_DELIVERY',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"SubmitShipment",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"packages"=>[{"weight"=>15, "signature_type"=>"NO_SIGNATURE_REQUIRED"}],
"service"=>"GROUND_HOME_DELIVERY",
"residential"=>true,
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"to_phone"=>"1231231234",
"packaging_type"=>"YOUR_PACKAGING",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 15,
"signature_type": "NO_SIGNATURE_REQUIRED"
}
],
"service": "GROUND_HOME_DELIVERY",
"residential": true,
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
)
FedEx - Label IN -> IN with COD
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"test": true,
"purpose": "SOLD",
"currency": "INR",
"cod_amount": 100,
"cod_fund_type": "CASH",
"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"
}
],
"service": "STANDARD_OVERNIGHT",
"shipper": "John Doe",
"ship_contact": "John Doe",
"ship_addr1": "2000 Meadowvale Rd",
"ship_city": "mumbai",
"ship_state": "MH",
"ship_code": "400037",
"ship_country": "IN",
"ship_phone": "1231231234",
"to_attention_name": "John Doe",
"to_name": "John Doe",
"to_addr1": "2300 Southern Blvd",
"to_state": "MH",
"to_city": "Mumbai",
"to_code": "400037",
"to_country": "IN",
"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 (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'test' => true,
'purpose' => 'SOLD',
'currency' => 'INR',
'cod_amount' => 100,
'cod_fund_type' => 'CASH',
'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',
),
),
'service' => 'STANDARD_OVERNIGHT',
'shipper' => 'John Doe',
'ship_contact' => 'John Doe',
'ship_addr1' => '2000 Meadowvale Rd',
'ship_city' => 'mumbai',
'ship_state' => 'MH',
'ship_code' => '400037',
'ship_country' => 'IN',
'ship_phone' => '1231231234',
'to_attention_name' => 'John Doe',
'to_name' => 'John Doe',
'to_addr1' => '2300 Southern Blvd',
'to_state' => 'MH',
'to_city' => 'Mumbai',
'to_code' => '400037',
'to_country' => 'IN',
'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': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'cod_amount': 100,
'cod_fund_type': 'CASH',
'currency': 'INR',
'customs': [{'country_of_manufacture': 'US',
'customs_description': 'My Description',
'customs_line_amount': 50.0,
'customs_quantity': 1,
'customs_quantity_units': 'EA',
'customs_weight': 2.5}],
'image_type': 'PNG',
'key': 'YOUR_KEY',
'length_unit': 'IN',
'meter_number': 'YOUR_METER_NUMBER',
'packages': [{'height': 1, 'length': 1, 'weight': 5, 'width': 1}],
'packaging_type': 'YOUR_PACKAGING',
'password': 'YOUR_PASSWORD',
'pickup_type': '02',
'purpose': 'SOLD',
'service': 'STANDARD_OVERNIGHT',
'ship_addr1': '2000 Meadowvale Rd',
'ship_city': 'mumbai',
'ship_code': '400037',
'ship_contact': 'John Doe',
'ship_country': 'IN',
'ship_phone': '1231231234',
'ship_state': 'MH',
'shipment_description': 'xxx',
'shipper': 'John Doe',
'test': True,
'to_addr1': '2300 Southern Blvd',
'to_attention_name': 'John Doe',
'to_city': 'Mumbai',
'to_code': '400037',
'to_country': 'IN',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'MH',
'weight_unit': 'LB'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"SubmitShipment",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"test"=>true,
"purpose"=>"SOLD",
"currency"=>"INR",
"cod_amount"=>100,
"cod_fund_type"=>"CASH",
"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"}],
"service"=>"STANDARD_OVERNIGHT",
"shipper"=>"John Doe",
"ship_contact"=>"John Doe",
"ship_addr1"=>"2000 Meadowvale Rd",
"ship_city"=>"mumbai",
"ship_state"=>"MH",
"ship_code"=>"400037",
"ship_country"=>"IN",
"ship_phone"=>"1231231234",
"to_attention_name"=>"John Doe",
"to_name"=>"John Doe",
"to_addr1"=>"2300 Southern Blvd",
"to_state"=>"MH",
"to_city"=>"Mumbai",
"to_code"=>"400037",
"to_country"=>"IN",
"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": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"test": true,
"purpose": "SOLD",
"currency": "INR",
"cod_amount": 100,
"cod_fund_type": "CASH",
"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"
}
],
"service": "STANDARD_OVERNIGHT",
"shipper": "John Doe",
"ship_contact": "John Doe",
"ship_addr1": "2000 Meadowvale Rd",
"ship_city": "mumbai",
"ship_state": "MH",
"ship_code": "400037",
"ship_country": "IN",
"ship_phone": "1231231234",
"to_attention_name": "John Doe",
"to_name": "John Doe",
"to_addr1": "2300 Southern Blvd",
"to_state": "MH",
"to_city": "Mumbai",
"to_code": "400037",
"to_country": "IN",
"to_phone": "1231231234",
"image_type": "PNG",
"shipment_description": "xxx",
"packaging_type": "YOUR_PACKAGING",
"pickup_type": "02",
"weight_unit": "LB",
"length_unit": "IN"
}
}
)
FedEx - Label International
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"test": true,
"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"
}
],
"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,
'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',
),
),
'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',
'customs': [{'country_of_manufacture': 'US',
'customs_description': 'My Description',
'customs_line_amount': 50.0,
'customs_quantity': 1,
'customs_quantity_units': 'EA',
'customs_weight': 2.5}],
'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,
"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"}],
"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,
"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"
}
],
"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"
}
}
)
FedEx - Label International Documents Only
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"test": true,
"currency": "CAD",
"packages": [
{
"weight": 1
}
],
"customs": [
{
"customs_quantity_units": "EA",
"customs_quantity": 1,
"customs_line_amount": 0.00,
"country_of_manufacture": "US",
"customs_weight": 1,
"customs_description": "Legal Documents"
}
],
"customs_value": 0.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": "FEDEX_ENVELOPE",
"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,
'currency' => 'CAD',
'packages' =>
array (
0 =>
array (
'weight' => 1,
),
),
'customs' =>
array (
0 =>
array (
'customs_quantity_units' => 'EA',
'customs_quantity' => 1,
'customs_line_amount' => 0.0,
'country_of_manufacture' => 'US',
'customs_weight' => 1,
'customs_description' => 'Legal Documents',
),
),
'customs_value' => 0.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' => 'FEDEX_ENVELOPE',
'pickup_type' => '02',
'weight_unit' => 'LB',
'length_unit' => 'IN',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx',
'params': {'currency': 'CAD',
'customs': [{'country_of_manufacture': 'US',
'customs_description': 'Legal Documents',
'customs_line_amount': 0.0,
'customs_quantity': 1,
'customs_quantity_units': 'EA',
'customs_weight': 1}],
'customs_value': 0.0,
'image_type': 'PNG',
'length_unit': 'IN',
'packages': [{'weight': 1}],
'packaging_type': 'FEDEX_ENVELOPE',
'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,
"currency"=>"CAD",
"packages"=>[{"weight"=>1}],
"customs"=>
[{"customs_quantity_units"=>"EA",
"customs_quantity"=>1,
"customs_line_amount"=>0.0,
"country_of_manufacture"=>"US",
"customs_weight"=>1,
"customs_description"=>"Legal Documents"}],
"customs_value"=>0.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"=>"FEDEX_ENVELOPE",
"pickup_type"=>"02",
"weight_unit"=>"LB",
"length_unit"=>"IN"}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"test": true,
"currency": "CAD",
"packages": [
{
"weight": 1
}
],
"customs": [
{
"customs_quantity_units": "EA",
"customs_quantity": 1,
"customs_line_amount": 0.00,
"country_of_manufacture": "US",
"customs_weight": 1,
"customs_description": "Legal Documents"
}
],
"customs_value": 0.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": "FEDEX_ENVELOPE",
"pickup_type": "02",
"weight_unit": "LB",
"length_unit": "IN"
}
}
)
FedEx - Label International NO EEI Exemption
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"b13a_filing_option": "NOT_REQUIRED",
"export_compliance_statement": "NO EEI 30.37(f)",
"packages": [
{
"weight": 12,
"length": 0,
"width": 0,
"height": 0,
"reference_code": "INVOICE_NUMBER",
"reference_value": "79631"
}
],
"shipper": "Acme, Inc.",
"ship_addr1": "273 Cahaba Valley Pkwy",
"ship_city": "Pelham",
"ship_state": "AL",
"ship_code": "35124",
"ship_country": "US",
"ship_phone": "(123) 123.6183",
"to_name": "John Doe",
"to_company": "Bogota DC",
"to_addr1": "Calle 151",
"to_attention_name": "John Doe",
"to_phone": "1113444356",
"to_country": "CO",
"to_city": "Bogota",
"to_state": null,
"to_code": "110131",
"weight_unit": "LBS",
"length_unit": "IN",
"packaging_type": "YOUR_PACKAGING",
"fedex_one_rate": false,
"service": "INTERNATIONAL_PRIORITY",
"negotiated_rates": true,
"currency": "USD",
"sold_company": "Acme, Inc.",
"sold_name": "John Doe",
"sold_tax_id": "",
"sold_phone": "1113444356",
"sold_addr1": "Calle 151",
"sold_city": "Bogota",
"sold_state": null,
"sold_code": "110131",
"sold_country": "CO",
"customs_value": 262.89,
"customs": [
{
"customs_quantity_units": "EA",
"customs_quantity": 500,
"customs_line_amount": 55,
"country_of_manufacture": "US",
"customs_weight": 10,
"customs_description": "Cards"
}
],
"ship_contact": "Sales Person2",
"shipment_description": "PRINTED MATERIALS",
"generate_docs": [
"COMMERCIAL_INVOICE"
]
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'SubmitShipment',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'b13a_filing_option' => 'NOT_REQUIRED',
'export_compliance_statement' => 'NO EEI 30.37(f)',
'packages' =>
array (
0 =>
array (
'weight' => 12,
'length' => 0,
'width' => 0,
'height' => 0,
'reference_code' => 'INVOICE_NUMBER',
'reference_value' => '79631',
),
),
'shipper' => 'Acme, Inc.',
'ship_addr1' => '273 Cahaba Valley Pkwy',
'ship_city' => 'Pelham',
'ship_state' => 'AL',
'ship_code' => '35124',
'ship_country' => 'US',
'ship_phone' => '(123) 123.6183',
'to_name' => 'John Doe',
'to_company' => 'Bogota DC',
'to_addr1' => 'Calle 151',
'to_attention_name' => 'John Doe',
'to_phone' => '1113444356',
'to_country' => 'CO',
'to_city' => 'Bogota',
'to_state' => NULL,
'to_code' => '110131',
'weight_unit' => 'LBS',
'length_unit' => 'IN',
'packaging_type' => 'YOUR_PACKAGING',
'fedex_one_rate' => false,
'service' => 'INTERNATIONAL_PRIORITY',
'negotiated_rates' => true,
'currency' => 'USD',
'sold_company' => 'Acme, Inc.',
'sold_name' => 'John Doe',
'sold_tax_id' => '',
'sold_phone' => '1113444356',
'sold_addr1' => 'Calle 151',
'sold_city' => 'Bogota',
'sold_state' => NULL,
'sold_code' => '110131',
'sold_country' => 'CO',
'customs_value' => 262.89,
'customs' =>
array (
0 =>
array (
'customs_quantity_units' => 'EA',
'customs_quantity' => 500,
'customs_line_amount' => 55,
'country_of_manufacture' => 'US',
'customs_weight' => 10,
'customs_description' => 'Cards',
),
),
'ship_contact' => 'Sales Person2',
'shipment_description' => 'PRINTED MATERIALS',
'generate_docs' =>
array (
0 => 'COMMERCIAL_INVOICE',
),
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'b13a_filing_option': 'NOT_REQUIRED',
'currency': 'USD',
'customs': [{'country_of_manufacture': 'US',
'customs_description': 'Cards',
'customs_line_amount': 55,
'customs_quantity': 500,
'customs_quantity_units': 'EA',
'customs_weight': 10}],
'customs_value': 262.89,
'export_compliance_statement': 'NO EEI 30.37(f)',
'fedex_one_rate': False,
'generate_docs': ['COMMERCIAL_INVOICE'],
'key': 'YOUR_KEY',
'length_unit': 'IN',
'meter_number': 'YOUR_METER_NUMBER',
'negotiated_rates': True,
'packages': [{'height': 0,
'length': 0,
'reference_code': 'INVOICE_NUMBER',
'reference_value': '79631',
'weight': 12,
'width': 0}],
'packaging_type': 'YOUR_PACKAGING',
'password': 'YOUR_PASSWORD',
'service': 'INTERNATIONAL_PRIORITY',
'ship_addr1': '273 Cahaba Valley Pkwy',
'ship_city': 'Pelham',
'ship_code': '35124',
'ship_contact': 'Sales Person2',
'ship_country': 'US',
'ship_phone': '(123) 123.6183',
'ship_state': 'AL',
'shipment_description': 'PRINTED MATERIALS',
'shipper': 'Acme, Inc.',
'sold_addr1': 'Calle 151',
'sold_city': 'Bogota',
'sold_code': '110131',
'sold_company': 'Acme, Inc.',
'sold_country': 'CO',
'sold_name': 'John Doe',
'sold_phone': '1113444356',
'sold_state': None,
'sold_tax_id': '',
'to_addr1': 'Calle 151',
'to_attention_name': 'John Doe',
'to_city': 'Bogota',
'to_code': '110131',
'to_company': 'Bogota DC',
'to_country': 'CO',
'to_name': 'John Doe',
'to_phone': '1113444356',
'to_state': None,
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"SubmitShipment",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"b13a_filing_option"=>"NOT_REQUIRED",
"export_compliance_statement"=>"NO EEI 30.37(f)",
"packages"=>
[{"weight"=>12,
"length"=>0,
"width"=>0,
"height"=>0,
"reference_code"=>"INVOICE_NUMBER",
"reference_value"=>"79631"}],
"shipper"=>"Acme, Inc.",
"ship_addr1"=>"273 Cahaba Valley Pkwy",
"ship_city"=>"Pelham",
"ship_state"=>"AL",
"ship_code"=>"35124",
"ship_country"=>"US",
"ship_phone"=>"(123) 123.6183",
"to_name"=>"John Doe",
"to_company"=>"Bogota DC",
"to_addr1"=>"Calle 151",
"to_attention_name"=>"John Doe",
"to_phone"=>"1113444356",
"to_country"=>"CO",
"to_city"=>"Bogota",
"to_state"=>nil,
"to_code"=>"110131",
"weight_unit"=>"LBS",
"length_unit"=>"IN",
"packaging_type"=>"YOUR_PACKAGING",
"fedex_one_rate"=>false,
"service"=>"INTERNATIONAL_PRIORITY",
"negotiated_rates"=>true,
"currency"=>"USD",
"sold_company"=>"Acme, Inc.",
"sold_name"=>"John Doe",
"sold_tax_id"=>"",
"sold_phone"=>"1113444356",
"sold_addr1"=>"Calle 151",
"sold_city"=>"Bogota",
"sold_state"=>nil,
"sold_code"=>"110131",
"sold_country"=>"CO",
"customs_value"=>262.89,
"customs"=>
[{"customs_quantity_units"=>"EA",
"customs_quantity"=>500,
"customs_line_amount"=>55,
"country_of_manufacture"=>"US",
"customs_weight"=>10,
"customs_description"=>"Cards"}],
"ship_contact"=>"Sales Person2",
"shipment_description"=>"PRINTED MATERIALS",
"generate_docs"=>["COMMERCIAL_INVOICE"]}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"b13a_filing_option": "NOT_REQUIRED",
"export_compliance_statement": "NO EEI 30.37(f)",
"packages": [
{
"weight": 12,
"length": 0,
"width": 0,
"height": 0,
"reference_code": "INVOICE_NUMBER",
"reference_value": "79631"
}
],
"shipper": "Acme, Inc.",
"ship_addr1": "273 Cahaba Valley Pkwy",
"ship_city": "Pelham",
"ship_state": "AL",
"ship_code": "35124",
"ship_country": "US",
"ship_phone": "(123) 123.6183",
"to_name": "John Doe",
"to_company": "Bogota DC",
"to_addr1": "Calle 151",
"to_attention_name": "John Doe",
"to_phone": "1113444356",
"to_country": "CO",
"to_city": "Bogota",
"to_state": null,
"to_code": "110131",
"weight_unit": "LBS",
"length_unit": "IN",
"packaging_type": "YOUR_PACKAGING",
"fedex_one_rate": false,
"service": "INTERNATIONAL_PRIORITY",
"negotiated_rates": true,
"currency": "USD",
"sold_company": "Acme, Inc.",
"sold_name": "John Doe",
"sold_tax_id": "",
"sold_phone": "1113444356",
"sold_addr1": "Calle 151",
"sold_city": "Bogota",
"sold_state": null,
"sold_code": "110131",
"sold_country": "CO",
"customs_value": 262.89,
"customs": [
{
"customs_quantity_units": "EA",
"customs_quantity": 500,
"customs_line_amount": 55,
"country_of_manufacture": "US",
"customs_weight": 10,
"customs_description": "Cards"
}
],
"ship_contact": "Sales Person2",
"shipment_description": "PRINTED MATERIALS",
"generate_docs": [
"COMMERCIAL_INVOICE"
]
}
}
)
FedEx - Label International Paperless Customs (ETD)
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"test": true,
"paperless_customs": true,
"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,
"customs_misc_charge_type": "OTHER",
"customs_misc_charge": 10.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,
'paperless_customs' => true,
'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,
'customs_misc_charge_type' => 'OTHER',
'customs_misc_charge' => 10.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',
'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_misc_charge': 10.0,
'customs_misc_charge_type': 'OTHER',
'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',
'paperless_customs': True,
'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,
"paperless_customs"=>true,
"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,
"customs_misc_charge_type"=>"OTHER",
"customs_misc_charge"=>10.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,
"paperless_customs": true,
"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,
"customs_misc_charge_type": "OTHER",
"customs_misc_charge": 10.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"
}
}
)
FedEx - Label International Sender Pays Duties
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"billing": [
{
"type": "duties",
"payment_type": "SENDER"
}
],
"packages": [
{
"weight": 15
}
],
"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"
}
],
"currency": "USD",
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "2000 Meadowvale Rd",
"to_city": "Toronto",
"to_state": "ON",
"to_code": "M1B5K7",
"to_country": "CA",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'SubmitShipment',
'params' =>
array (
'billing' =>
array (
0 =>
array (
'type' => 'duties',
'payment_type' => 'SENDER',
),
),
'packages' =>
array (
0 =>
array (
'weight' => 15,
),
),
'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',
),
),
'currency' => 'USD',
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '2000 Meadowvale Rd',
'to_city' => 'Toronto',
'to_state' => 'ON',
'to_code' => 'M1B5K7',
'to_country' => 'CA',
'to_phone' => '1231231234',
'packaging_type' => 'YOUR_PACKAGING',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx',
'params': {'billing': [{'payment_type': 'SENDER', 'type': 'duties'}],
'currency': 'USD',
'customs': [{'country_of_manufacture': 'US',
'customs_description': 'My Description',
'customs_line_amount': 50.0,
'customs_quantity': 1,
'customs_quantity_units': 'EA',
'customs_weight': 2.5}],
'packages': [{'weight': 15}],
'packaging_type': 'YOUR_PACKAGING',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '2000 Meadowvale Rd',
'to_city': 'Toronto',
'to_code': 'M1B5K7',
'to_country': 'CA',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'ON'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"SubmitShipment",
"params"=>
{"billing"=>[{"type"=>"duties", "payment_type"=>"SENDER"}],
"packages"=>[{"weight"=>15}],
"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"}],
"currency"=>"USD",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"2000 Meadowvale Rd",
"to_city"=>"Toronto",
"to_state"=>"ON",
"to_code"=>"M1B5K7",
"to_country"=>"CA",
"to_phone"=>"1231231234",
"packaging_type"=>"YOUR_PACKAGING",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"billing": [
{
"type": "duties",
"payment_type": "SENDER"
}
],
"packages": [
{
"weight": 15
}
],
"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"
}
],
"currency": "USD",
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "2000 Meadowvale Rd",
"to_city": "Toronto",
"to_state": "ON",
"to_code": "M1B5K7",
"to_country": "CA",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
)
FedEx - Label International w/ CI and NAFTA
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"test": true,
"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,
"customs_misc_charge_type": "OTHER",
"customs_misc_charge": 10.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,
'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,
'customs_misc_charge_type' => 'OTHER',
'customs_misc_charge' => 10.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',
'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_misc_charge': 10.0,
'customs_misc_charge_type': 'OTHER',
'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,
"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,
"customs_misc_charge_type"=>"OTHER",
"customs_misc_charge"=>10.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,
"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,
"customs_misc_charge_type": "OTHER",
"customs_misc_charge": 10.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"
}
}
)
FedEx - Label International w/ CI and NAFTA Custom Images
{
"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"
}
}
)
FedEx - Label Multi-package
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"packages": [
{
"weight": 5
},
{
"weight": 10
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'SubmitShipment',
'params' =>
array (
'packages' =>
array (
0 =>
array (
'weight' => 5,
),
1 =>
array (
'weight' => 10,
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'to_phone' => '1231231234',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'packaging_type' => 'YOUR_PACKAGING',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'packages': [{'weight': 5}, {'weight': 10}],
'packaging_type': 'YOUR_PACKAGING',
'password': 'YOUR_PASSWORD',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"SubmitShipment",
"params"=>
{"packages"=>[{"weight"=>5}, {"weight"=>10}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"to_phone"=>"1231231234",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"packaging_type"=>"YOUR_PACKAGING",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"packages": [
{
"weight": 5
},
{
"weight": 10
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
)
FedEx - Label Multi-package International
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"test": true,
"currency": "CAD",
"packages": [
{
"weight": 5,
"length": 1,
"width": 1,
"height": 1
},
{
"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"
}
],
"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,
'currency' => 'CAD',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 1,
'width' => 1,
'height' => 1,
),
1 =>
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',
),
),
'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',
'customs': [{'country_of_manufacture': 'US',
'customs_description': 'My Description',
'customs_line_amount': 50.0,
'customs_quantity': 1,
'customs_quantity_units': 'EA',
'customs_weight': 2.5}],
'image_type': 'PNG',
'length_unit': 'IN',
'packages': [{'height': 1, 'length': 1, 'weight': 5, 'width': 1},
{'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,
"currency"=>"CAD",
"packages"=>
[{"weight"=>5, "length"=>1, "width"=>1, "height"=>1},
{"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"}],
"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,
"currency": "CAD",
"packages": [
{
"weight": 5,
"length": 1,
"width": 1,
"height": 1
},
{
"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"
}
],
"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"
}
}
)
FedEx - Label Reference Values
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 15,
"reference_code": "INVOICE_NUMBER",
"reference_value": "#123",
"reference_code2": "P_O_NUMBER",
"reference_value2": "B2C"
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'SubmitShipment',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 15,
'reference_code' => 'INVOICE_NUMBER',
'reference_value' => '#123',
'reference_code2' => 'P_O_NUMBER',
'reference_value2' => 'B2C',
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'to_phone' => '1231231234',
'packaging_type' => 'YOUR_PACKAGING',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'packages': [{'reference_code': 'INVOICE_NUMBER',
'reference_code2': 'P_O_NUMBER',
'reference_value': '#123',
'reference_value2': 'B2C',
'weight': 15}],
'packaging_type': 'YOUR_PACKAGING',
'password': 'YOUR_PASSWORD',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"SubmitShipment",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"packages"=>
[{"weight"=>15,
"reference_code"=>"INVOICE_NUMBER",
"reference_value"=>"#123",
"reference_code2"=>"P_O_NUMBER",
"reference_value2"=>"B2C"}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"to_phone"=>"1231231234",
"packaging_type"=>"YOUR_PACKAGING",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 15,
"reference_code": "INVOICE_NUMBER",
"reference_value": "#123",
"reference_code2": "P_O_NUMBER",
"reference_value2": "B2C"
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
)
FedEx - Label Residential
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"residential": true,
"packages": [
{
"weight": 15
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'SubmitShipment',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'residential' => true,
'packages' =>
array (
0 =>
array (
'weight' => 15,
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'to_phone' => '1231231234',
'packaging_type' => 'YOUR_PACKAGING',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'packages': [{'weight': 15}],
'packaging_type': 'YOUR_PACKAGING',
'password': 'YOUR_PASSWORD',
'residential': True,
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"SubmitShipment",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"residential"=>true,
"packages"=>[{"weight"=>15}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"to_phone"=>"1231231234",
"packaging_type"=>"YOUR_PACKAGING",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"residential": true,
"packages": [
{
"weight": 15
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
)
FedEx - Label Return Email label
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"notify": [
{
"type": "RETURN",
"email": "bob@email.com"
}
],
"packages": [
{
"weight": 2
}
],
"packaging_type": "YOUR_PACKAGING",
"return_code": "PRINT_RETURN_LABEL",
"shipper": "RocketShipIt",
"ship_addr1": "940 Presidio Ave",
"ship_addr2": "#103",
"ship_city": "San Francisco",
"ship_state": "CA",
"ship_code": "94115",
"ship_phone": "1231231234",
"to_name": "John Doe Schmoe",
"to_addr1": "124 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'SubmitShipment',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'notify' =>
array (
0 =>
array (
'type' => 'RETURN',
'email' => 'bob@email.com',
),
),
'packages' =>
array (
0 =>
array (
'weight' => 2,
),
),
'packaging_type' => 'YOUR_PACKAGING',
'return_code' => 'PRINT_RETURN_LABEL',
'shipper' => 'RocketShipIt',
'ship_addr1' => '940 Presidio Ave',
'ship_addr2' => '#103',
'ship_city' => 'San Francisco',
'ship_state' => 'CA',
'ship_code' => '94115',
'ship_phone' => '1231231234',
'to_name' => 'John Doe Schmoe',
'to_addr1' => '124 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'notify': [{'email': 'bob@email.com', 'type': 'RETURN'}],
'packages': [{'weight': 2}],
'packaging_type': 'YOUR_PACKAGING',
'password': 'YOUR_PASSWORD',
'return_code': 'PRINT_RETURN_LABEL',
'ship_addr1': '940 Presidio Ave',
'ship_addr2': '#103',
'ship_city': 'San Francisco',
'ship_code': '94115',
'ship_phone': '1231231234',
'ship_state': 'CA',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '124 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe Schmoe',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"SubmitShipment",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"notify"=>[{"type"=>"RETURN", "email"=>"bob@email.com"}],
"packages"=>[{"weight"=>2}],
"packaging_type"=>"YOUR_PACKAGING",
"return_code"=>"PRINT_RETURN_LABEL",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"940 Presidio Ave",
"ship_addr2"=>"#103",
"ship_city"=>"San Francisco",
"ship_state"=>"CA",
"ship_code"=>"94115",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe Schmoe",
"to_addr1"=>"124 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"notify": [
{
"type": "RETURN",
"email": "bob@email.com"
}
],
"packages": [
{
"weight": 2
}
],
"packaging_type": "YOUR_PACKAGING",
"return_code": "PRINT_RETURN_LABEL",
"shipper": "RocketShipIt",
"ship_addr1": "940 Presidio Ave",
"ship_addr2": "#103",
"ship_city": "San Francisco",
"ship_state": "CA",
"ship_code": "94115",
"ship_phone": "1231231234",
"to_name": "John Doe Schmoe",
"to_addr1": "124 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"test": true
}
}
)
FedEx - Label Return label
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 2
}
],
"packaging_type": "YOUR_PACKAGING",
"return_code": "PRINT_RETURN_LABEL",
"shipper": "RocketShipIt",
"ship_addr1": "940 Presidio Ave",
"ship_addr2": "#103",
"ship_city": "San Francisco",
"ship_state": "CA",
"ship_code": "94115",
"ship_phone": "1231231234",
"to_name": "John Doe Schmoe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'SubmitShipment',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 2,
),
),
'packaging_type' => 'YOUR_PACKAGING',
'return_code' => 'PRINT_RETURN_LABEL',
'shipper' => 'RocketShipIt',
'ship_addr1' => '940 Presidio Ave',
'ship_addr2' => '#103',
'ship_city' => 'San Francisco',
'ship_state' => 'CA',
'ship_code' => '94115',
'ship_phone' => '1231231234',
'to_name' => 'John Doe Schmoe',
'to_addr1' => '123 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'packages': [{'weight': 2}],
'packaging_type': 'YOUR_PACKAGING',
'password': 'YOUR_PASSWORD',
'return_code': 'PRINT_RETURN_LABEL',
'ship_addr1': '940 Presidio Ave',
'ship_addr2': '#103',
'ship_city': 'San Francisco',
'ship_code': '94115',
'ship_phone': '1231231234',
'ship_state': 'CA',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe Schmoe',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"SubmitShipment",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"packages"=>[{"weight"=>2}],
"packaging_type"=>"YOUR_PACKAGING",
"return_code"=>"PRINT_RETURN_LABEL",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"940 Presidio Ave",
"ship_addr2"=>"#103",
"ship_city"=>"San Francisco",
"ship_state"=>"CA",
"ship_code"=>"94115",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe Schmoe",
"to_addr1"=>"123 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 2
}
],
"packaging_type": "YOUR_PACKAGING",
"return_code": "PRINT_RETURN_LABEL",
"shipper": "RocketShipIt",
"ship_addr1": "940 Presidio Ave",
"ship_addr2": "#103",
"ship_city": "San Francisco",
"ship_state": "CA",
"ship_code": "94115",
"ship_phone": "1231231234",
"to_name": "John Doe Schmoe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"test": true
}
}
)
FedEx - Label Return label International
{
"params": {
"return_reason": "REJECTED",
"packages": [
{
"weight": 4,
"length": 40,
"width": 4,
"height": 4,
"reference_code": "P_O_NUMBER",
"reference_value": "12345",
"reference_code2": "INVOICE_NUMBER",
"reference_value2": "56789",
"insured_value": 29.99,
"insured_currency": "USD"
}
],
"customs": [
{
"customs_quantity_units": "EA",
"customs_quantity": 1,
"customs_line_amount": 29.99,
"country_of_manufacture": "CA",
"customs_weight": 4,
"customs_description": "Acme Product",
"customs_hs_tariff": "9506.31.00.10"
}
],
"test": true,
"weight_unit": "LBS",
"length_unit": "IN",
"packaging_type": "02",
"negotiated_rates": true,
"saturday_delivery": false,
"shipper": "Acme Inc",
"ship_name": "Acme Inc",
"ship_addr1": "9500 Meilleur",
"ship_city": "Montreal",
"ship_state": "QC",
"ship_code": "H2N2B7",
"ship_country": "CA",
"ship_phone": "1-888-123-1234",
"to_attention_name": "FedEx Services",
"to_name": "FedEx Services",
"to_addr1": "10 FedEx Parkway",
"to_addr2": "2nd Floor Horizontal",
"to_city": "Collierville",
"to_state": "TN",
"to_code": "38017",
"to_country": "US",
"to_phone": "1-888-123-1234",
"service": "INTERNATIONAL_ECONOMY",
"currency": "USD",
"invoice": "372348",
"invoice_date": "20200519",
"invoice_line_total": 29.99,
"image_type": "ZPL",
"return_code": "PRINT_RETURN_LABEL",
"generate_docs": [
"COMMERCIAL_INVOICE"
],
"paperless_customs": false,
"customs_value": 29.99,
"billing": [
{
"type": "transportation",
"payment_type": "SENDER"
},
{
"type": "duties",
"payment_type": "SENDER"
}
],
"customs_account_number": "1234567",
"sold_name": "FedEx Services",
"sold_company": "FedEx Services",
"sold_addr1": "10 FedEx Parkway",
"sold_addr2": "2nd Floor Horizontal",
"sold_city": "Collierville",
"sold_state": "TN",
"sold_code": "38017",
"sold_country": "US",
"sold_phone": "18889085994"
},
"carrier": "FedEx",
"action": "SubmitShipment"
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'params' =>
array (
'return_reason' => 'REJECTED',
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 40,
'width' => 4,
'height' => 4,
'reference_code' => 'P_O_NUMBER',
'reference_value' => '12345',
'reference_code2' => 'INVOICE_NUMBER',
'reference_value2' => '56789',
'insured_value' => 29.99,
'insured_currency' => 'USD',
),
),
'customs' =>
array (
0 =>
array (
'customs_quantity_units' => 'EA',
'customs_quantity' => 1,
'customs_line_amount' => 29.99,
'country_of_manufacture' => 'CA',
'customs_weight' => 4,
'customs_description' => 'Acme Product',
'customs_hs_tariff' => '9506.31.00.10',
),
),
'test' => true,
'weight_unit' => 'LBS',
'length_unit' => 'IN',
'packaging_type' => '02',
'negotiated_rates' => true,
'saturday_delivery' => false,
'shipper' => 'Acme Inc',
'ship_name' => 'Acme Inc',
'ship_addr1' => '9500 Meilleur',
'ship_city' => 'Montreal',
'ship_state' => 'QC',
'ship_code' => 'H2N2B7',
'ship_country' => 'CA',
'ship_phone' => '1-888-123-1234',
'to_attention_name' => 'FedEx Services',
'to_name' => 'FedEx Services',
'to_addr1' => '10 FedEx Parkway',
'to_addr2' => '2nd Floor Horizontal',
'to_city' => 'Collierville',
'to_state' => 'TN',
'to_code' => '38017',
'to_country' => 'US',
'to_phone' => '1-888-123-1234',
'service' => 'INTERNATIONAL_ECONOMY',
'currency' => 'USD',
'invoice' => '372348',
'invoice_date' => '20200519',
'invoice_line_total' => 29.99,
'image_type' => 'ZPL',
'return_code' => 'PRINT_RETURN_LABEL',
'generate_docs' =>
array (
0 => 'COMMERCIAL_INVOICE',
),
'paperless_customs' => false,
'customs_value' => 29.99,
'billing' =>
array (
0 =>
array (
'type' => 'transportation',
'payment_type' => 'SENDER',
),
1 =>
array (
'type' => 'duties',
'payment_type' => 'SENDER',
),
),
'customs_account_number' => '1234567',
'sold_name' => 'FedEx Services',
'sold_company' => 'FedEx Services',
'sold_addr1' => '10 FedEx Parkway',
'sold_addr2' => '2nd Floor Horizontal',
'sold_city' => 'Collierville',
'sold_state' => 'TN',
'sold_code' => '38017',
'sold_country' => 'US',
'sold_phone' => '18889085994',
),
'carrier' => 'FedEx',
'action' => 'SubmitShipment',
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx',
'params': {'billing': [{'payment_type': 'SENDER', 'type': 'transportation'},
{'payment_type': 'SENDER', 'type': 'duties'}],
'currency': 'USD',
'customs': [{'country_of_manufacture': 'CA',
'customs_description': 'Acme Product',
'customs_hs_tariff': '9506.31.00.10',
'customs_line_amount': 29.99,
'customs_quantity': 1,
'customs_quantity_units': 'EA',
'customs_weight': 4}],
'customs_account_number': '1234567',
'customs_value': 29.99,
'generate_docs': ['COMMERCIAL_INVOICE'],
'image_type': 'ZPL',
'invoice': '372348',
'invoice_date': '20200519',
'invoice_line_total': 29.99,
'length_unit': 'IN',
'negotiated_rates': True,
'packages': [{'height': 4,
'insured_currency': 'USD',
'insured_value': 29.99,
'length': 40,
'reference_code': 'P_O_NUMBER',
'reference_code2': 'INVOICE_NUMBER',
'reference_value': '12345',
'reference_value2': '56789',
'weight': 4,
'width': 4}],
'packaging_type': '02',
'paperless_customs': False,
'return_code': 'PRINT_RETURN_LABEL',
'return_reason': 'REJECTED',
'saturday_delivery': False,
'service': 'INTERNATIONAL_ECONOMY',
'ship_addr1': '9500 Meilleur',
'ship_city': 'Montreal',
'ship_code': 'H2N2B7',
'ship_country': 'CA',
'ship_name': 'Acme Inc',
'ship_phone': '1-888-123-1234',
'ship_state': 'QC',
'shipper': 'Acme Inc',
'sold_addr1': '10 FedEx Parkway',
'sold_addr2': '2nd Floor Horizontal',
'sold_city': 'Collierville',
'sold_code': '38017',
'sold_company': 'FedEx Services',
'sold_country': 'US',
'sold_name': 'FedEx Services',
'sold_phone': '18889085994',
'sold_state': 'TN',
'test': True,
'to_addr1': '10 FedEx Parkway',
'to_addr2': '2nd Floor Horizontal',
'to_attention_name': 'FedEx Services',
'to_city': 'Collierville',
'to_code': '38017',
'to_country': 'US',
'to_name': 'FedEx Services',
'to_phone': '1-888-123-1234',
'to_state': 'TN',
'weight_unit': 'LBS'}}
)
rs.request(
{"params"=>
{"return_reason"=>"REJECTED",
"packages"=>
[{"weight"=>4,
"length"=>40,
"width"=>4,
"height"=>4,
"reference_code"=>"P_O_NUMBER",
"reference_value"=>"12345",
"reference_code2"=>"INVOICE_NUMBER",
"reference_value2"=>"56789",
"insured_value"=>29.99,
"insured_currency"=>"USD"}],
"customs"=>
[{"customs_quantity_units"=>"EA",
"customs_quantity"=>1,
"customs_line_amount"=>29.99,
"country_of_manufacture"=>"CA",
"customs_weight"=>4,
"customs_description"=>"Acme Product",
"customs_hs_tariff"=>"9506.31.00.10"}],
"test"=>true,
"weight_unit"=>"LBS",
"length_unit"=>"IN",
"packaging_type"=>"02",
"negotiated_rates"=>true,
"saturday_delivery"=>false,
"shipper"=>"Acme Inc",
"ship_name"=>"Acme Inc",
"ship_addr1"=>"9500 Meilleur",
"ship_city"=>"Montreal",
"ship_state"=>"QC",
"ship_code"=>"H2N2B7",
"ship_country"=>"CA",
"ship_phone"=>"1-888-123-1234",
"to_attention_name"=>"FedEx Services",
"to_name"=>"FedEx Services",
"to_addr1"=>"10 FedEx Parkway",
"to_addr2"=>"2nd Floor Horizontal",
"to_city"=>"Collierville",
"to_state"=>"TN",
"to_code"=>"38017",
"to_country"=>"US",
"to_phone"=>"1-888-123-1234",
"service"=>"INTERNATIONAL_ECONOMY",
"currency"=>"USD",
"invoice"=>"372348",
"invoice_date"=>"20200519",
"invoice_line_total"=>29.99,
"image_type"=>"ZPL",
"return_code"=>"PRINT_RETURN_LABEL",
"generate_docs"=>["COMMERCIAL_INVOICE"],
"paperless_customs"=>false,
"customs_value"=>29.99,
"billing"=>
[{"type"=>"transportation", "payment_type"=>"SENDER"},
{"type"=>"duties", "payment_type"=>"SENDER"}],
"customs_account_number"=>"1234567",
"sold_name"=>"FedEx Services",
"sold_company"=>"FedEx Services",
"sold_addr1"=>"10 FedEx Parkway",
"sold_addr2"=>"2nd Floor Horizontal",
"sold_city"=>"Collierville",
"sold_state"=>"TN",
"sold_code"=>"38017",
"sold_country"=>"US",
"sold_phone"=>"18889085994"},
"carrier"=>"FedEx",
"action"=>"SubmitShipment"}
)
rocketshipit.request(
{
"params": {
"return_reason": "REJECTED",
"packages": [
{
"weight": 4,
"length": 40,
"width": 4,
"height": 4,
"reference_code": "P_O_NUMBER",
"reference_value": "12345",
"reference_code2": "INVOICE_NUMBER",
"reference_value2": "56789",
"insured_value": 29.99,
"insured_currency": "USD"
}
],
"customs": [
{
"customs_quantity_units": "EA",
"customs_quantity": 1,
"customs_line_amount": 29.99,
"country_of_manufacture": "CA",
"customs_weight": 4,
"customs_description": "Acme Product",
"customs_hs_tariff": "9506.31.00.10"
}
],
"test": true,
"weight_unit": "LBS",
"length_unit": "IN",
"packaging_type": "02",
"negotiated_rates": true,
"saturday_delivery": false,
"shipper": "Acme Inc",
"ship_name": "Acme Inc",
"ship_addr1": "9500 Meilleur",
"ship_city": "Montreal",
"ship_state": "QC",
"ship_code": "H2N2B7",
"ship_country": "CA",
"ship_phone": "1-888-123-1234",
"to_attention_name": "FedEx Services",
"to_name": "FedEx Services",
"to_addr1": "10 FedEx Parkway",
"to_addr2": "2nd Floor Horizontal",
"to_city": "Collierville",
"to_state": "TN",
"to_code": "38017",
"to_country": "US",
"to_phone": "1-888-123-1234",
"service": "INTERNATIONAL_ECONOMY",
"currency": "USD",
"invoice": "372348",
"invoice_date": "20200519",
"invoice_line_total": 29.99,
"image_type": "ZPL",
"return_code": "PRINT_RETURN_LABEL",
"generate_docs": [
"COMMERCIAL_INVOICE"
],
"paperless_customs": false,
"customs_value": 29.99,
"billing": [
{
"type": "transportation",
"payment_type": "SENDER"
},
{
"type": "duties",
"payment_type": "SENDER"
}
],
"customs_account_number": "1234567",
"sold_name": "FedEx Services",
"sold_company": "FedEx Services",
"sold_addr1": "10 FedEx Parkway",
"sold_addr2": "2nd Floor Horizontal",
"sold_city": "Collierville",
"sold_state": "TN",
"sold_code": "38017",
"sold_country": "US",
"sold_phone": "18889085994"
},
"carrier": "FedEx",
"action": "SubmitShipment"
}
)
FedEx - Label SmartPost
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"test": true,
"packages": [
{
"weight": 5
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"service": "SMART_POST",
"smart_post_indicia": "PARCEL_SELECT",
"smart_post_hub_id": "5552"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'SubmitShipment',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'test' => true,
'packages' =>
array (
0 =>
array (
'weight' => 5,
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'to_phone' => '1231231234',
'packaging_type' => 'YOUR_PACKAGING',
'service' => 'SMART_POST',
'smart_post_indicia' => 'PARCEL_SELECT',
'smart_post_hub_id' => '5552',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'packages': [{'weight': 5}],
'packaging_type': 'YOUR_PACKAGING',
'password': 'YOUR_PASSWORD',
'service': 'SMART_POST',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'smart_post_hub_id': '5552',
'smart_post_indicia': 'PARCEL_SELECT',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"SubmitShipment",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"test"=>true,
"packages"=>[{"weight"=>5}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"to_phone"=>"1231231234",
"packaging_type"=>"YOUR_PACKAGING",
"service"=>"SMART_POST",
"smart_post_indicia"=>"PARCEL_SELECT",
"smart_post_hub_id"=>"5552"}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"test": true,
"packages": [
{
"weight": 5
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"service": "SMART_POST",
"smart_post_indicia": "PARCEL_SELECT",
"smart_post_hub_id": "5552"
}
}
)
FedEx - Label Third Party Billing
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"billing": [
{
"type": "transportation",
"payment_type": "third_party",
"company": "Acme Inc.",
"account": "abc123",
"postal_code": "94608",
"country_code": "US"
}
],
"packages": [
{
"weight": 15
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'SubmitShipment',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'billing' =>
array (
0 =>
array (
'type' => 'transportation',
'payment_type' => 'third_party',
'company' => 'Acme Inc.',
'account' => 'abc123',
'postal_code' => '94608',
'country_code' => 'US',
),
),
'packages' =>
array (
0 =>
array (
'weight' => 15,
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'to_phone' => '1231231234',
'packaging_type' => 'YOUR_PACKAGING',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'billing': [{'account': 'abc123',
'company': 'Acme Inc.',
'country_code': 'US',
'payment_type': 'third_party',
'postal_code': '94608',
'type': 'transportation'}],
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'packages': [{'weight': 15}],
'packaging_type': 'YOUR_PACKAGING',
'password': 'YOUR_PASSWORD',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"SubmitShipment",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"billing"=>
[{"type"=>"transportation",
"payment_type"=>"third_party",
"company"=>"Acme Inc.",
"account"=>"abc123",
"postal_code"=>"94608",
"country_code"=>"US"}],
"packages"=>[{"weight"=>15}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"to_phone"=>"1231231234",
"packaging_type"=>"YOUR_PACKAGING",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"billing": [
{
"type": "transportation",
"payment_type": "third_party",
"company": "Acme Inc.",
"account": "abc123",
"postal_code": "94608",
"country_code": "US"
}
],
"packages": [
{
"weight": 15
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
)
FedEx - Label with Insurance
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"packages": [
{
"weight": 5,
"insured_value": 899.00,
"insured_currency": "USD"
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'SubmitShipment',
'params' =>
array (
'packages' =>
array (
0 =>
array (
'weight' => 5,
'insured_value' => 899.0,
'insured_currency' => 'USD',
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'to_phone' => '1231231234',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'packaging_type' => 'YOUR_PACKAGING',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'packages': [{'insured_currency': 'USD',
'insured_value': 899.0,
'weight': 5}],
'packaging_type': 'YOUR_PACKAGING',
'password': 'YOUR_PASSWORD',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"SubmitShipment",
"params"=>
{"packages"=>
[{"weight"=>5, "insured_value"=>899.0, "insured_currency"=>"USD"}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"to_phone"=>"1231231234",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"packaging_type"=>"YOUR_PACKAGING",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"packages": [
{
"weight": 5,
"insured_value": 899.00,
"insured_currency": "USD"
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
)
FedEx - Locator
{
"carrier": "FedEx",
"action": "FindLocations",
"params": {
"attributes": [
"SATURDAY_DROPOFFS"
],
"locations": [
"FEDEX_OFFICE"
],
"results_requested": 4,
"radius": 50,
"ship_city": "Briggs",
"ship_state": "TX",
"ship_code": "78608-0001",
"ship_country": "US",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'FindLocations',
'params' =>
array (
'attributes' =>
array (
0 => 'SATURDAY_DROPOFFS',
),
'locations' =>
array (
0 => 'FEDEX_OFFICE',
),
'results_requested' => 4,
'radius' => 50,
'ship_city' => 'Briggs',
'ship_state' => 'TX',
'ship_code' => '78608-0001',
'ship_country' => 'US',
'test' => true,
),
)
);
rs.request(
{'action': 'FindLocations',
'carrier': 'FedEx',
'params': {'attributes': ['SATURDAY_DROPOFFS'],
'locations': ['FEDEX_OFFICE'],
'radius': 50,
'results_requested': 4,
'ship_city': 'Briggs',
'ship_code': '78608-0001',
'ship_country': 'US',
'ship_state': 'TX',
'test': True}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"FindLocations",
"params"=>
{"attributes"=>["SATURDAY_DROPOFFS"],
"locations"=>["FEDEX_OFFICE"],
"results_requested"=>4,
"radius"=>50,
"ship_city"=>"Briggs",
"ship_state"=>"TX",
"ship_code"=>"78608-0001",
"ship_country"=>"US",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "FindLocations",
"params": {
"attributes": [
"SATURDAY_DROPOFFS"
],
"locations": [
"FEDEX_OFFICE"
],
"results_requested": 4,
"radius": 50,
"ship_city": "Briggs",
"ship_state": "TX",
"ship_code": "78608-0001",
"ship_country": "US",
"test": true
}
}
)
FedEx - Pickup Cancel
{
"carrier": "FedEx",
"action": "CancelPickup",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"pickup_id": "CPU663460",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'CancelPickup',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'pickup_id' => 'CPU663460',
'test' => true,
),
)
);
rs.request(
{'action': 'CancelPickup',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'password': 'YOUR_PASSWORD',
'pickup_id': 'CPU663460',
'test': True}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"CancelPickup",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"pickup_id"=>"CPU663460",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "CancelPickup",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"pickup_id": "CPU663460",
"test": true
}
}
)
FedEx - Pickup Express
{
"carrier": "FedEx",
"action": "CreatePickup",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"carrier_code": "FDXE",
"weight": 10,
"pickup_company_name": "Acme Inc",
"pickup_contact_name": "John Doe",
"pickup_addr1": "123 Main St",
"pickup_addr2": "123",
"pickup_city": "Emeryville",
"pickup_state": "CA",
"pickup_code": "94608",
"pickup_country": "US",
"pickup_phone": "123-123-1234",
"pickup_date": "20161212",
"close_time": "1600",
"ready_time": "0800",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'CreatePickup',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'carrier_code' => 'FDXE',
'weight' => 10,
'pickup_company_name' => 'Acme Inc',
'pickup_contact_name' => 'John Doe',
'pickup_addr1' => '123 Main St',
'pickup_addr2' => '123',
'pickup_city' => 'Emeryville',
'pickup_state' => 'CA',
'pickup_code' => '94608',
'pickup_country' => 'US',
'pickup_phone' => '123-123-1234',
'pickup_date' => '20161212',
'close_time' => '1600',
'ready_time' => '0800',
'test' => true,
),
)
);
rs.request(
{'action': 'CreatePickup',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'carrier_code': 'FDXE',
'close_time': '1600',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'password': 'YOUR_PASSWORD',
'pickup_addr1': '123 Main St',
'pickup_addr2': '123',
'pickup_city': 'Emeryville',
'pickup_code': '94608',
'pickup_company_name': 'Acme Inc',
'pickup_contact_name': 'John Doe',
'pickup_country': 'US',
'pickup_date': '20161212',
'pickup_phone': '123-123-1234',
'pickup_state': 'CA',
'ready_time': '0800',
'test': True,
'weight': 10}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"CreatePickup",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"carrier_code"=>"FDXE",
"weight"=>10,
"pickup_company_name"=>"Acme Inc",
"pickup_contact_name"=>"John Doe",
"pickup_addr1"=>"123 Main St",
"pickup_addr2"=>"123",
"pickup_city"=>"Emeryville",
"pickup_state"=>"CA",
"pickup_code"=>"94608",
"pickup_country"=>"US",
"pickup_phone"=>"123-123-1234",
"pickup_date"=>"20161212",
"close_time"=>"1600",
"ready_time"=>"0800",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "CreatePickup",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"carrier_code": "FDXE",
"weight": 10,
"pickup_company_name": "Acme Inc",
"pickup_contact_name": "John Doe",
"pickup_addr1": "123 Main St",
"pickup_addr2": "123",
"pickup_city": "Emeryville",
"pickup_state": "CA",
"pickup_code": "94608",
"pickup_country": "US",
"pickup_phone": "123-123-1234",
"pickup_date": "20161212",
"close_time": "1600",
"ready_time": "0800",
"test": true
}
}
)
FedEx - Pickup Freight LTL
{
"carrier": "FedEx",
"action": "CreatePickup",
"params": {
"test": true,
"freight_account_number": "YOUR_FREIGHT_ACCOUNT_NUMBER",
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"service": "FEDEX_FREIGHT_ECONOMY",
"packages": [
{
"weight": 200.00,
"packaging_type": "PALLET",
"freight_class": "50",
"pieces": 10
}
],
"pickup_company_name": "Acme Inc",
"pickup_contact_name": "John Doe",
"pickup_addr1": "1202 Chalet Ln",
"pickup_addr2": "Do Not Delete - Test Account",
"pickup_city": "Harrison",
"pickup_state": "AR",
"pickup_code": "72601",
"pickup_country": "US",
"pickup_phone": "123-123-1234",
"pickup_date": "20161212",
"close_time": "1600",
"ready_time": "0800",
"to_addr1": "123 Main st",
"to_city": "PITTSBURGH",
"to_state": "PA",
"to_code": "15220",
"to_country": "US"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'CreatePickup',
'params' =>
array (
'test' => true,
'freight_account_number' => 'YOUR_FREIGHT_ACCOUNT_NUMBER',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'service' => 'FEDEX_FREIGHT_ECONOMY',
'packages' =>
array (
0 =>
array (
'weight' => 200.0,
'packaging_type' => 'PALLET',
'freight_class' => '50',
'pieces' => 10,
),
),
'pickup_company_name' => 'Acme Inc',
'pickup_contact_name' => 'John Doe',
'pickup_addr1' => '1202 Chalet Ln',
'pickup_addr2' => 'Do Not Delete - Test Account',
'pickup_city' => 'Harrison',
'pickup_state' => 'AR',
'pickup_code' => '72601',
'pickup_country' => 'US',
'pickup_phone' => '123-123-1234',
'pickup_date' => '20161212',
'close_time' => '1600',
'ready_time' => '0800',
'to_addr1' => '123 Main st',
'to_city' => 'PITTSBURGH',
'to_state' => 'PA',
'to_code' => '15220',
'to_country' => 'US',
),
)
);
rs.request(
{'action': 'CreatePickup',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'close_time': '1600',
'freight_account_number': 'YOUR_FREIGHT_ACCOUNT_NUMBER',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'packages': [{'freight_class': '50',
'packaging_type': 'PALLET',
'pieces': 10,
'weight': 200.0}],
'password': 'YOUR_PASSWORD',
'pickup_addr1': '1202 Chalet Ln',
'pickup_addr2': 'Do Not Delete - Test Account',
'pickup_city': 'Harrison',
'pickup_code': '72601',
'pickup_company_name': 'Acme Inc',
'pickup_contact_name': 'John Doe',
'pickup_country': 'US',
'pickup_date': '20161212',
'pickup_phone': '123-123-1234',
'pickup_state': 'AR',
'ready_time': '0800',
'service': 'FEDEX_FREIGHT_ECONOMY',
'test': True,
'to_addr1': '123 Main st',
'to_city': 'PITTSBURGH',
'to_code': '15220',
'to_country': 'US',
'to_state': 'PA'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"CreatePickup",
"params"=>
{"test"=>true,
"freight_account_number"=>"YOUR_FREIGHT_ACCOUNT_NUMBER",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"service"=>"FEDEX_FREIGHT_ECONOMY",
"packages"=>
[{"weight"=>200.0,
"packaging_type"=>"PALLET",
"freight_class"=>"50",
"pieces"=>10}],
"pickup_company_name"=>"Acme Inc",
"pickup_contact_name"=>"John Doe",
"pickup_addr1"=>"1202 Chalet Ln",
"pickup_addr2"=>"Do Not Delete - Test Account",
"pickup_city"=>"Harrison",
"pickup_state"=>"AR",
"pickup_code"=>"72601",
"pickup_country"=>"US",
"pickup_phone"=>"123-123-1234",
"pickup_date"=>"20161212",
"close_time"=>"1600",
"ready_time"=>"0800",
"to_addr1"=>"123 Main st",
"to_city"=>"PITTSBURGH",
"to_state"=>"PA",
"to_code"=>"15220",
"to_country"=>"US"}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "CreatePickup",
"params": {
"test": true,
"freight_account_number": "YOUR_FREIGHT_ACCOUNT_NUMBER",
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"service": "FEDEX_FREIGHT_ECONOMY",
"packages": [
{
"weight": 200.00,
"packaging_type": "PALLET",
"freight_class": "50",
"pieces": 10
}
],
"pickup_company_name": "Acme Inc",
"pickup_contact_name": "John Doe",
"pickup_addr1": "1202 Chalet Ln",
"pickup_addr2": "Do Not Delete - Test Account",
"pickup_city": "Harrison",
"pickup_state": "AR",
"pickup_code": "72601",
"pickup_country": "US",
"pickup_phone": "123-123-1234",
"pickup_date": "20161212",
"close_time": "1600",
"ready_time": "0800",
"to_addr1": "123 Main st",
"to_city": "PITTSBURGH",
"to_state": "PA",
"to_code": "15220",
"to_country": "US"
}
}
)
FedEx - Pickup Ground
{
"carrier": "FedEx",
"action": "CreatePickup",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"weight": 10,
"pickup_company_name": "Acme Inc",
"pickup_contact_name": "John Doe",
"pickup_addr1": "123 Main St",
"pickup_addr2": "123",
"pickup_city": "Emeryville",
"pickup_state": "CA",
"pickup_code": "94608",
"pickup_country": "US",
"pickup_phone": "123-123-1234",
"pickup_date": "20161212",
"close_time": "1600",
"ready_time": "0800",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'CreatePickup',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'weight' => 10,
'pickup_company_name' => 'Acme Inc',
'pickup_contact_name' => 'John Doe',
'pickup_addr1' => '123 Main St',
'pickup_addr2' => '123',
'pickup_city' => 'Emeryville',
'pickup_state' => 'CA',
'pickup_code' => '94608',
'pickup_country' => 'US',
'pickup_phone' => '123-123-1234',
'pickup_date' => '20161212',
'close_time' => '1600',
'ready_time' => '0800',
'test' => true,
),
)
);
rs.request(
{'action': 'CreatePickup',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'close_time': '1600',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'password': 'YOUR_PASSWORD',
'pickup_addr1': '123 Main St',
'pickup_addr2': '123',
'pickup_city': 'Emeryville',
'pickup_code': '94608',
'pickup_company_name': 'Acme Inc',
'pickup_contact_name': 'John Doe',
'pickup_country': 'US',
'pickup_date': '20161212',
'pickup_phone': '123-123-1234',
'pickup_state': 'CA',
'ready_time': '0800',
'test': True,
'weight': 10}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"CreatePickup",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"weight"=>10,
"pickup_company_name"=>"Acme Inc",
"pickup_contact_name"=>"John Doe",
"pickup_addr1"=>"123 Main St",
"pickup_addr2"=>"123",
"pickup_city"=>"Emeryville",
"pickup_state"=>"CA",
"pickup_code"=>"94608",
"pickup_country"=>"US",
"pickup_phone"=>"123-123-1234",
"pickup_date"=>"20161212",
"close_time"=>"1600",
"ready_time"=>"0800",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "CreatePickup",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"weight": 10,
"pickup_company_name": "Acme Inc",
"pickup_contact_name": "John Doe",
"pickup_addr1": "123 Main St",
"pickup_addr2": "123",
"pickup_city": "Emeryville",
"pickup_state": "CA",
"pickup_code": "94608",
"pickup_country": "US",
"pickup_phone": "123-123-1234",
"pickup_date": "20161212",
"close_time": "1600",
"ready_time": "0800",
"test": true
}
}
)
FedEx - Rate COD
{
"carrier": "FedEx",
"action": "GetAllRates",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"cod_fund_type": "PERSONAL_CHECK",
"cod_amount": 774.60,
"currency": "USD",
"packages": [
{
"weight": 9,
"width": 20,
"height": 6,
"length": 30
}
],
"customs": [],
"shipper": "My Company",
"ship_city": "Vancouver",
"ship_state": "WA",
"ship_code": "98685",
"ship_country": "US",
"to_state": "CA",
"to_country": "US",
"to_code": "90210",
"weight_unit": "LB",
"packaging_type": "YOUR_PACKAGING",
"dropoff_type": "REGULAR_PICKUP",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'GetAllRates',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'cod_fund_type' => 'PERSONAL_CHECK',
'cod_amount' => 774.6,
'currency' => 'USD',
'packages' =>
array (
0 =>
array (
'weight' => 9,
'width' => 20,
'height' => 6,
'length' => 30,
),
),
'customs' =>
array (
),
'shipper' => 'My Company',
'ship_city' => 'Vancouver',
'ship_state' => 'WA',
'ship_code' => '98685',
'ship_country' => 'US',
'to_state' => 'CA',
'to_country' => 'US',
'to_code' => '90210',
'weight_unit' => 'LB',
'packaging_type' => 'YOUR_PACKAGING',
'dropoff_type' => 'REGULAR_PICKUP',
'test' => true,
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'cod_amount': 774.6,
'cod_fund_type': 'PERSONAL_CHECK',
'currency': 'USD',
'customs': [],
'dropoff_type': 'REGULAR_PICKUP',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'packages': [{'height': 6, 'length': 30, 'weight': 9, 'width': 20}],
'packaging_type': 'YOUR_PACKAGING',
'password': 'YOUR_PASSWORD',
'ship_city': 'Vancouver',
'ship_code': '98685',
'ship_country': 'US',
'ship_state': 'WA',
'shipper': 'My Company',
'test': True,
'to_code': '90210',
'to_country': 'US',
'to_state': 'CA',
'weight_unit': 'LB'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"GetAllRates",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"cod_fund_type"=>"PERSONAL_CHECK",
"cod_amount"=>774.6,
"currency"=>"USD",
"packages"=>[{"weight"=>9, "width"=>20, "height"=>6, "length"=>30}],
"customs"=>[],
"shipper"=>"My Company",
"ship_city"=>"Vancouver",
"ship_state"=>"WA",
"ship_code"=>"98685",
"ship_country"=>"US",
"to_state"=>"CA",
"to_country"=>"US",
"to_code"=>"90210",
"weight_unit"=>"LB",
"packaging_type"=>"YOUR_PACKAGING",
"dropoff_type"=>"REGULAR_PICKUP",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "GetAllRates",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"cod_fund_type": "PERSONAL_CHECK",
"cod_amount": 774.60,
"currency": "USD",
"packages": [
{
"weight": 9,
"width": 20,
"height": 6,
"length": 30
}
],
"customs": [],
"shipper": "My Company",
"ship_city": "Vancouver",
"ship_state": "WA",
"ship_code": "98685",
"ship_country": "US",
"to_state": "CA",
"to_country": "US",
"to_code": "90210",
"weight_unit": "LB",
"packaging_type": "YOUR_PACKAGING",
"dropoff_type": "REGULAR_PICKUP",
"test": true
}
}
)
FedEx - Rate Future Date
{
"carrier": "FedEx",
"action": "GetAllRates",
"params": {
"packages": [
{
"weight": 2,
"insured_value": 200
}
],
"ship_date": "2042-09-15T08:00:00-00:00",
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_state": "CA",
"to_code": "90210",
"weight_unit": "LB",
"length_unit": "IN",
"packaging_type": "YOUR_PACKAGING",
"dropoff_type": "REGULAR_PICKUP",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'GetAllRates',
'params' =>
array (
'packages' =>
array (
0 =>
array (
'weight' => 2,
'insured_value' => 200,
),
),
'ship_date' => '2042-09-15T08:00:00-00:00',
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_country' => 'US',
'to_state' => 'CA',
'to_code' => '90210',
'weight_unit' => 'LB',
'length_unit' => 'IN',
'packaging_type' => 'YOUR_PACKAGING',
'dropoff_type' => 'REGULAR_PICKUP',
'test' => true,
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'FedEx',
'params': {'customs': [],
'dropoff_type': 'REGULAR_PICKUP',
'length_unit': 'IN',
'packages': [{'insured_value': 200, 'weight': 2}],
'packaging_type': 'YOUR_PACKAGING',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_date': '2042-09-15T08:00:00-00:00',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_code': '90210',
'to_country': 'US',
'to_state': 'CA',
'weight_unit': 'LB'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"GetAllRates",
"params"=>
{"packages"=>[{"weight"=>2, "insured_value"=>200}],
"ship_date"=>"2042-09-15T08:00:00-00:00",
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_country"=>"US",
"to_state"=>"CA",
"to_code"=>"90210",
"weight_unit"=>"LB",
"length_unit"=>"IN",
"packaging_type"=>"YOUR_PACKAGING",
"dropoff_type"=>"REGULAR_PICKUP",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "GetAllRates",
"params": {
"packages": [
{
"weight": 2,
"insured_value": 200
}
],
"ship_date": "2042-09-15T08:00:00-00:00",
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_state": "CA",
"to_code": "90210",
"weight_unit": "LB",
"length_unit": "IN",
"packaging_type": "YOUR_PACKAGING",
"dropoff_type": "REGULAR_PICKUP",
"test": true
}
}
)
FedEx - Rates COD
{
"carrier": "FedEx",
"action": "GetAllRates",
"params": {
"cod_fund_type": "GUARANTEED_FUNDS",
"cod_amount": 15,
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 4,
"length": 5,
"width": 5,
"height": 5
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_state": "CA",
"to_code": "90210",
"weight_unit": "LB",
"packaging_type": "YOUR_PACKAGING",
"dropoff_type": "REGULAR_PICKUP"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'GetAllRates',
'params' =>
array (
'cod_fund_type' => 'GUARANTEED_FUNDS',
'cod_amount' => 15,
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 5,
'width' => 5,
'height' => 5,
),
),
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_country' => 'US',
'to_state' => 'CA',
'to_code' => '90210',
'weight_unit' => 'LB',
'packaging_type' => 'YOUR_PACKAGING',
'dropoff_type' => 'REGULAR_PICKUP',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'cod_amount': 15,
'cod_fund_type': 'GUARANTEED_FUNDS',
'customs': [],
'dropoff_type': 'REGULAR_PICKUP',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'packages': [{'height': 5, 'length': 5, 'weight': 4, 'width': 5}],
'packaging_type': 'YOUR_PACKAGING',
'password': 'YOUR_PASSWORD',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'to_code': '90210',
'to_country': 'US',
'to_state': 'CA',
'weight_unit': 'LB'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"GetAllRates",
"params"=>
{"cod_fund_type"=>"GUARANTEED_FUNDS",
"cod_amount"=>15,
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"packages"=>[{"weight"=>4, "length"=>5, "width"=>5, "height"=>5}],
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_country"=>"US",
"to_state"=>"CA",
"to_code"=>"90210",
"weight_unit"=>"LB",
"packaging_type"=>"YOUR_PACKAGING",
"dropoff_type"=>"REGULAR_PICKUP"}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "GetAllRates",
"params": {
"cod_fund_type": "GUARANTEED_FUNDS",
"cod_amount": 15,
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 4,
"length": 5,
"width": 5,
"height": 5
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_state": "CA",
"to_code": "90210",
"weight_unit": "LB",
"packaging_type": "YOUR_PACKAGING",
"dropoff_type": "REGULAR_PICKUP"
}
}
)
FedEx - Rates Dry Ice with Insurance
{
"carrier": "FedEx",
"action": "GetAllRates",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"test": true,
"shipper": "d",
"ship_addr1": "1452 56TH ST",
"ship_city": "BROOKLYN",
"ship_state": "NY",
"ship_code": "11219-4682",
"ship_phone": "1212121212",
"ship_country": "US",
"to_code": "28365",
"to_country": "US",
"packages": [
{
"weight": 10,
"length": 5,
"width": 5,
"height": 5,
"insured_value": 450,
"insured_currency": "USD",
"dry_ice": {
"weight": 1,
"medical_use": false
},
"signature_type": "DIRECT"
}
],
"debug": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'GetAllRates',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'test' => true,
'shipper' => 'd',
'ship_addr1' => '1452 56TH ST',
'ship_city' => 'BROOKLYN',
'ship_state' => 'NY',
'ship_code' => '11219-4682',
'ship_phone' => '1212121212',
'ship_country' => 'US',
'to_code' => '28365',
'to_country' => 'US',
'packages' =>
array (
0 =>
array (
'weight' => 10,
'length' => 5,
'width' => 5,
'height' => 5,
'insured_value' => 450,
'insured_currency' => 'USD',
'dry_ice' =>
array (
'weight' => 1,
'medical_use' => false,
),
'signature_type' => 'DIRECT',
),
),
'debug' => true,
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'debug': True,
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'packages': [{'dry_ice': {'medical_use': False, 'weight': 1},
'height': 5,
'insured_currency': 'USD',
'insured_value': 450,
'length': 5,
'signature_type': 'DIRECT',
'weight': 10,
'width': 5}],
'password': 'YOUR_PASSWORD',
'ship_addr1': '1452 56TH ST',
'ship_city': 'BROOKLYN',
'ship_code': '11219-4682',
'ship_country': 'US',
'ship_phone': '1212121212',
'ship_state': 'NY',
'shipper': 'd',
'test': True,
'to_code': '28365',
'to_country': 'US'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"GetAllRates",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"test"=>true,
"shipper"=>"d",
"ship_addr1"=>"1452 56TH ST",
"ship_city"=>"BROOKLYN",
"ship_state"=>"NY",
"ship_code"=>"11219-4682",
"ship_phone"=>"1212121212",
"ship_country"=>"US",
"to_code"=>"28365",
"to_country"=>"US",
"packages"=>
[{"weight"=>10,
"length"=>5,
"width"=>5,
"height"=>5,
"insured_value"=>450,
"insured_currency"=>"USD",
"dry_ice"=>{"weight"=>1, "medical_use"=>false},
"signature_type"=>"DIRECT"}],
"debug"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "GetAllRates",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"test": true,
"shipper": "d",
"ship_addr1": "1452 56TH ST",
"ship_city": "BROOKLYN",
"ship_state": "NY",
"ship_code": "11219-4682",
"ship_phone": "1212121212",
"ship_country": "US",
"to_code": "28365",
"to_country": "US",
"packages": [
{
"weight": 10,
"length": 5,
"width": 5,
"height": 5,
"insured_value": 450,
"insured_currency": "USD",
"dry_ice": {
"weight": 1,
"medical_use": false
},
"signature_type": "DIRECT"
}
],
"debug": true
}
}
)
FedEx - Rates Insurance
{
"carrier": "FedEx",
"action": "GetAllRates",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 2,
"insured_value": 200
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_state": "CA",
"to_code": "90210",
"weight_unit": "LB",
"packaging_type": "YOUR_PACKAGING",
"dropoff_type": "REGULAR_PICKUP",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'GetAllRates',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 2,
'insured_value' => 200,
),
),
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_country' => 'US',
'to_state' => 'CA',
'to_code' => '90210',
'weight_unit' => 'LB',
'packaging_type' => 'YOUR_PACKAGING',
'dropoff_type' => 'REGULAR_PICKUP',
'test' => true,
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'customs': [],
'dropoff_type': 'REGULAR_PICKUP',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'packages': [{'insured_value': 200, 'weight': 2}],
'packaging_type': 'YOUR_PACKAGING',
'password': 'YOUR_PASSWORD',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_code': '90210',
'to_country': 'US',
'to_state': 'CA',
'weight_unit': 'LB'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"GetAllRates",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"packages"=>[{"weight"=>2, "insured_value"=>200}],
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_country"=>"US",
"to_state"=>"CA",
"to_code"=>"90210",
"weight_unit"=>"LB",
"packaging_type"=>"YOUR_PACKAGING",
"dropoff_type"=>"REGULAR_PICKUP",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "GetAllRates",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 2,
"insured_value": 200
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_state": "CA",
"to_code": "90210",
"weight_unit": "LB",
"packaging_type": "YOUR_PACKAGING",
"dropoff_type": "REGULAR_PICKUP",
"test": true
}
}
)
FedEx - Rates International Duties and Taxes
{
"carrier": "FedEx",
"action": "GetAllRates",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 2
}
],
"customs_value": 50.00,
"currency": "USD",
"customs": [
{
"number_of_packages_per_commodity": 1,
"customs_quantity_units": "EA",
"customs_quantity": 1,
"customs_line_amount": 50.00,
"country_of_manufacture": "US",
"customs_weight": 2.5,
"customs_description": "Brass Trumpet in Case",
"customs_hs_tariff": "920510009000"
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_addr1": "2020 ELLESMERE ROAD 6-7",
"to_city": "SCARBOROUGH",
"to_country": "CA",
"to_state": "ON",
"to_code": "M1H2Z8",
"weight_unit": "LB",
"packaging_type": "YOUR_PACKAGING",
"dropoff_type": "REGULAR_PICKUP",
"test": true,
"negotiated_rates": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'GetAllRates',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 2,
),
),
'customs_value' => 50.0,
'currency' => 'USD',
'customs' =>
array (
0 =>
array (
'number_of_packages_per_commodity' => 1,
'customs_quantity_units' => 'EA',
'customs_quantity' => 1,
'customs_line_amount' => 50.0,
'country_of_manufacture' => 'US',
'customs_weight' => 2.5,
'customs_description' => 'Brass Trumpet in Case',
'customs_hs_tariff' => '920510009000',
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_addr1' => '2020 ELLESMERE ROAD 6-7',
'to_city' => 'SCARBOROUGH',
'to_country' => 'CA',
'to_state' => 'ON',
'to_code' => 'M1H2Z8',
'weight_unit' => 'LB',
'packaging_type' => 'YOUR_PACKAGING',
'dropoff_type' => 'REGULAR_PICKUP',
'test' => true,
'negotiated_rates' => true,
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'currency': 'USD',
'customs': [{'country_of_manufacture': 'US',
'customs_description': 'Brass Trumpet in Case',
'customs_hs_tariff': '920510009000',
'customs_line_amount': 50.0,
'customs_quantity': 1,
'customs_quantity_units': 'EA',
'customs_weight': 2.5,
'number_of_packages_per_commodity': 1}],
'customs_value': 50.0,
'dropoff_type': 'REGULAR_PICKUP',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'negotiated_rates': True,
'packages': [{'weight': 2}],
'packaging_type': 'YOUR_PACKAGING',
'password': 'YOUR_PASSWORD',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '2020 ELLESMERE ROAD 6-7',
'to_city': 'SCARBOROUGH',
'to_code': 'M1H2Z8',
'to_country': 'CA',
'to_state': 'ON',
'weight_unit': 'LB'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"GetAllRates",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"packages"=>[{"weight"=>2}],
"customs_value"=>50.0,
"currency"=>"USD",
"customs"=>
[{"number_of_packages_per_commodity"=>1,
"customs_quantity_units"=>"EA",
"customs_quantity"=>1,
"customs_line_amount"=>50.0,
"country_of_manufacture"=>"US",
"customs_weight"=>2.5,
"customs_description"=>"Brass Trumpet in Case",
"customs_hs_tariff"=>"920510009000"}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_addr1"=>"2020 ELLESMERE ROAD 6-7",
"to_city"=>"SCARBOROUGH",
"to_country"=>"CA",
"to_state"=>"ON",
"to_code"=>"M1H2Z8",
"weight_unit"=>"LB",
"packaging_type"=>"YOUR_PACKAGING",
"dropoff_type"=>"REGULAR_PICKUP",
"test"=>true,
"negotiated_rates"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "GetAllRates",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 2
}
],
"customs_value": 50.00,
"currency": "USD",
"customs": [
{
"number_of_packages_per_commodity": 1,
"customs_quantity_units": "EA",
"customs_quantity": 1,
"customs_line_amount": 50.00,
"country_of_manufacture": "US",
"customs_weight": 2.5,
"customs_description": "Brass Trumpet in Case",
"customs_hs_tariff": "920510009000"
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_addr1": "2020 ELLESMERE ROAD 6-7",
"to_city": "SCARBOROUGH",
"to_country": "CA",
"to_state": "ON",
"to_code": "M1H2Z8",
"weight_unit": "LB",
"packaging_type": "YOUR_PACKAGING",
"dropoff_type": "REGULAR_PICKUP",
"test": true,
"negotiated_rates": true
}
}
)
FedEx - Rates Negotiated
{
"carrier": "FedEx",
"action": "GetAllRates",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 2
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_state": "CA",
"to_code": "90210",
"weight_unit": "LB",
"packaging_type": "YOUR_PACKAGING",
"dropoff_type": "REGULAR_PICKUP",
"test": true,
"negotiated_rates": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'GetAllRates',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 2,
),
),
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_country' => 'US',
'to_state' => 'CA',
'to_code' => '90210',
'weight_unit' => 'LB',
'packaging_type' => 'YOUR_PACKAGING',
'dropoff_type' => 'REGULAR_PICKUP',
'test' => true,
'negotiated_rates' => true,
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'customs': [],
'dropoff_type': 'REGULAR_PICKUP',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'negotiated_rates': True,
'packages': [{'weight': 2}],
'packaging_type': 'YOUR_PACKAGING',
'password': 'YOUR_PASSWORD',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_code': '90210',
'to_country': 'US',
'to_state': 'CA',
'weight_unit': 'LB'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"GetAllRates",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"packages"=>[{"weight"=>2}],
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_country"=>"US",
"to_state"=>"CA",
"to_code"=>"90210",
"weight_unit"=>"LB",
"packaging_type"=>"YOUR_PACKAGING",
"dropoff_type"=>"REGULAR_PICKUP",
"test"=>true,
"negotiated_rates"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "GetAllRates",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 2
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_state": "CA",
"to_code": "90210",
"weight_unit": "LB",
"packaging_type": "YOUR_PACKAGING",
"dropoff_type": "REGULAR_PICKUP",
"test": true,
"negotiated_rates": true
}
}
)
FedEx - Rates OneRate
{
"carrier": "FedEx",
"action": "GetAllRates",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 2
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_state": "CA",
"to_code": "90210",
"weight_unit": "LB",
"test": true,
"dropoff_type": "REGULAR_PICKUP",
"service": "FEDEX_EXPRESS_SAVER",
"packaging_type": "FEDEX_SMALL_BOX",
"fedex_one_rate": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'GetAllRates',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 2,
),
),
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_country' => 'US',
'to_state' => 'CA',
'to_code' => '90210',
'weight_unit' => 'LB',
'test' => true,
'dropoff_type' => 'REGULAR_PICKUP',
'service' => 'FEDEX_EXPRESS_SAVER',
'packaging_type' => 'FEDEX_SMALL_BOX',
'fedex_one_rate' => true,
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'customs': [],
'dropoff_type': 'REGULAR_PICKUP',
'fedex_one_rate': True,
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'packages': [{'weight': 2}],
'packaging_type': 'FEDEX_SMALL_BOX',
'password': 'YOUR_PASSWORD',
'service': 'FEDEX_EXPRESS_SAVER',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_code': '90210',
'to_country': 'US',
'to_state': 'CA',
'weight_unit': 'LB'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"GetAllRates",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"packages"=>[{"weight"=>2}],
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_country"=>"US",
"to_state"=>"CA",
"to_code"=>"90210",
"weight_unit"=>"LB",
"test"=>true,
"dropoff_type"=>"REGULAR_PICKUP",
"service"=>"FEDEX_EXPRESS_SAVER",
"packaging_type"=>"FEDEX_SMALL_BOX",
"fedex_one_rate"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "GetAllRates",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 2
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_state": "CA",
"to_code": "90210",
"weight_unit": "LB",
"test": true,
"dropoff_type": "REGULAR_PICKUP",
"service": "FEDEX_EXPRESS_SAVER",
"packaging_type": "FEDEX_SMALL_BOX",
"fedex_one_rate": true
}
}
)
FedEx - Rates Residential Home Delivery
{
"carrier": "FedEx",
"action": "GetAllRates",
"params": {
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"residential": true,
"packages": [
{
"weight": 2
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_state": "CA",
"to_code": "90210",
"weight_unit": "LB",
"packaging_type": "YOUR_PACKAGING",
"dropoff_type": "REGULAR_PICKUP",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'GetAllRates',
'params' =>
array (
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'residential' => true,
'packages' =>
array (
0 =>
array (
'weight' => 2,
),
),
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_country' => 'US',
'to_state' => 'CA',
'to_code' => '90210',
'weight_unit' => 'LB',
'packaging_type' => 'YOUR_PACKAGING',
'dropoff_type' => 'REGULAR_PICKUP',
'test' => true,
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'FedEx',
'params': {'customs': [],
'dropoff_type': 'REGULAR_PICKUP',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'packages': [{'weight': 2}],
'packaging_type': 'YOUR_PACKAGING',
'password': 'YOUR_PASSWORD',
'residential': True,
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_code': '90210',
'to_country': 'US',
'to_state': 'CA',
'weight_unit': 'LB'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"GetAllRates",
"params"=>
{"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"residential"=>true,
"packages"=>[{"weight"=>2}],
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_country"=>"US",
"to_state"=>"CA",
"to_code"=>"90210",
"weight_unit"=>"LB",
"packaging_type"=>"YOUR_PACKAGING",
"dropoff_type"=>"REGULAR_PICKUP",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "GetAllRates",
"params": {
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"residential": true,
"packages": [
{
"weight": 2
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_state": "CA",
"to_code": "90210",
"weight_unit": "LB",
"packaging_type": "YOUR_PACKAGING",
"dropoff_type": "REGULAR_PICKUP",
"test": true
}
}
)
FedEx - Rates Return Label
{
"carrier": "FedEx",
"action": "GetAllRates",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"return_code": "PRINT_RETURN_LABEL",
"packages": [
{
"weight": 4,
"length": 5,
"width": 5,
"height": 5
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_state": "CA",
"to_code": "90210",
"weight_unit": "LB",
"packaging_type": "YOUR_PACKAGING",
"dropoff_type": "REGULAR_PICKUP"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'GetAllRates',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'return_code' => 'PRINT_RETURN_LABEL',
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 5,
'width' => 5,
'height' => 5,
),
),
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_country' => 'US',
'to_state' => 'CA',
'to_code' => '90210',
'weight_unit' => 'LB',
'packaging_type' => 'YOUR_PACKAGING',
'dropoff_type' => 'REGULAR_PICKUP',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'customs': [],
'dropoff_type': 'REGULAR_PICKUP',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'packages': [{'height': 5, 'length': 5, 'weight': 4, 'width': 5}],
'packaging_type': 'YOUR_PACKAGING',
'password': 'YOUR_PASSWORD',
'return_code': 'PRINT_RETURN_LABEL',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'to_code': '90210',
'to_country': 'US',
'to_state': 'CA',
'weight_unit': 'LB'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"GetAllRates",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"return_code"=>"PRINT_RETURN_LABEL",
"packages"=>[{"weight"=>4, "length"=>5, "width"=>5, "height"=>5}],
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_country"=>"US",
"to_state"=>"CA",
"to_code"=>"90210",
"weight_unit"=>"LB",
"packaging_type"=>"YOUR_PACKAGING",
"dropoff_type"=>"REGULAR_PICKUP"}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "GetAllRates",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"return_code": "PRINT_RETURN_LABEL",
"packages": [
{
"weight": 4,
"length": 5,
"width": 5,
"height": 5
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_state": "CA",
"to_code": "90210",
"weight_unit": "LB",
"packaging_type": "YOUR_PACKAGING",
"dropoff_type": "REGULAR_PICKUP"
}
}
)
FedEx - Rates Signature Required
{
"carrier": "FedEx",
"action": "GetAllRates",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 2,
"signature_type": "DIRECT"
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_state": "CA",
"to_code": "90210",
"weight_unit": "LB",
"packaging_type": "YOUR_PACKAGING",
"dropoff_type": "REGULAR_PICKUP",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'GetAllRates',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 2,
'signature_type' => 'DIRECT',
),
),
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_country' => 'US',
'to_state' => 'CA',
'to_code' => '90210',
'weight_unit' => 'LB',
'packaging_type' => 'YOUR_PACKAGING',
'dropoff_type' => 'REGULAR_PICKUP',
'test' => true,
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'customs': [],
'dropoff_type': 'REGULAR_PICKUP',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'packages': [{'signature_type': 'DIRECT', 'weight': 2}],
'packaging_type': 'YOUR_PACKAGING',
'password': 'YOUR_PASSWORD',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_code': '90210',
'to_country': 'US',
'to_state': 'CA',
'weight_unit': 'LB'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"GetAllRates",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"packages"=>[{"weight"=>2, "signature_type"=>"DIRECT"}],
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_country"=>"US",
"to_state"=>"CA",
"to_code"=>"90210",
"weight_unit"=>"LB",
"packaging_type"=>"YOUR_PACKAGING",
"dropoff_type"=>"REGULAR_PICKUP",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "GetAllRates",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 2,
"signature_type": "DIRECT"
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_state": "CA",
"to_code": "90210",
"weight_unit": "LB",
"packaging_type": "YOUR_PACKAGING",
"dropoff_type": "REGULAR_PICKUP",
"test": true
}
}
)
FedEx - Rates SmartPost
{
"carrier": "FedEx",
"action": "GetAllRates",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 2
}
],
"customs": [],
"service": "SMART_POST",
"smart_post_indicia": "PARCEL_SELECT",
"smart_post_hub_id": "5531",
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_state": "CA",
"to_code": "90210",
"weight_unit": "LB",
"packaging_type": "YOUR_PACKAGING",
"dropoff_type": "REGULAR_PICKUP",
"test": true,
"negotiated_rates": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'GetAllRates',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 2,
),
),
'customs' =>
array (
),
'service' => 'SMART_POST',
'smart_post_indicia' => 'PARCEL_SELECT',
'smart_post_hub_id' => '5531',
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_country' => 'US',
'to_state' => 'CA',
'to_code' => '90210',
'weight_unit' => 'LB',
'packaging_type' => 'YOUR_PACKAGING',
'dropoff_type' => 'REGULAR_PICKUP',
'test' => true,
'negotiated_rates' => true,
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'customs': [],
'dropoff_type': 'REGULAR_PICKUP',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'negotiated_rates': True,
'packages': [{'weight': 2}],
'packaging_type': 'YOUR_PACKAGING',
'password': 'YOUR_PASSWORD',
'service': 'SMART_POST',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'smart_post_hub_id': '5531',
'smart_post_indicia': 'PARCEL_SELECT',
'test': True,
'to_code': '90210',
'to_country': 'US',
'to_state': 'CA',
'weight_unit': 'LB'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"GetAllRates",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"packages"=>[{"weight"=>2}],
"customs"=>[],
"service"=>"SMART_POST",
"smart_post_indicia"=>"PARCEL_SELECT",
"smart_post_hub_id"=>"5531",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_country"=>"US",
"to_state"=>"CA",
"to_code"=>"90210",
"weight_unit"=>"LB",
"packaging_type"=>"YOUR_PACKAGING",
"dropoff_type"=>"REGULAR_PICKUP",
"test"=>true,
"negotiated_rates"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "GetAllRates",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 2
}
],
"customs": [],
"service": "SMART_POST",
"smart_post_indicia": "PARCEL_SELECT",
"smart_post_hub_id": "5531",
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_state": "CA",
"to_code": "90210",
"weight_unit": "LB",
"packaging_type": "YOUR_PACKAGING",
"dropoff_type": "REGULAR_PICKUP",
"test": true,
"negotiated_rates": true
}
}
)
FedEx - Rating Hold at Location
{
"carrier": "FedEx",
"action": "GetAllRates",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"hold_at_location": true,
"hold_phone": "1231231234",
"hold_addr1": "8549 Wilshire Blvd",
"hold_city": "Beverly Hills",
"hold_state": "CA",
"hold_code": "90211",
"hold_country": "US",
"packages": [
{
"weight": 2,
"insured_value": 200
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_code": "90210",
"weight_unit": "LB",
"packaging_type": "YOUR_PACKAGING",
"dropoff_type": "REGULAR_PICKUP",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'GetAllRates',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'hold_at_location' => true,
'hold_phone' => '1231231234',
'hold_addr1' => '8549 Wilshire Blvd',
'hold_city' => 'Beverly Hills',
'hold_state' => 'CA',
'hold_code' => '90211',
'hold_country' => 'US',
'packages' =>
array (
0 =>
array (
'weight' => 2,
'insured_value' => 200,
),
),
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_country' => 'US',
'to_code' => '90210',
'weight_unit' => 'LB',
'packaging_type' => 'YOUR_PACKAGING',
'dropoff_type' => 'REGULAR_PICKUP',
'test' => true,
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'customs': [],
'dropoff_type': 'REGULAR_PICKUP',
'hold_addr1': '8549 Wilshire Blvd',
'hold_at_location': True,
'hold_city': 'Beverly Hills',
'hold_code': '90211',
'hold_country': 'US',
'hold_phone': '1231231234',
'hold_state': 'CA',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'packages': [{'insured_value': 200, 'weight': 2}],
'packaging_type': 'YOUR_PACKAGING',
'password': 'YOUR_PASSWORD',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_code': '90210',
'to_country': 'US',
'weight_unit': 'LB'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"GetAllRates",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"hold_at_location"=>true,
"hold_phone"=>"1231231234",
"hold_addr1"=>"8549 Wilshire Blvd",
"hold_city"=>"Beverly Hills",
"hold_state"=>"CA",
"hold_code"=>"90211",
"hold_country"=>"US",
"packages"=>[{"weight"=>2, "insured_value"=>200}],
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_country"=>"US",
"to_code"=>"90210",
"weight_unit"=>"LB",
"packaging_type"=>"YOUR_PACKAGING",
"dropoff_type"=>"REGULAR_PICKUP",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "GetAllRates",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"hold_at_location": true,
"hold_phone": "1231231234",
"hold_addr1": "8549 Wilshire Blvd",
"hold_city": "Beverly Hills",
"hold_state": "CA",
"hold_code": "90211",
"hold_country": "US",
"packages": [
{
"weight": 2,
"insured_value": 200
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_code": "90210",
"weight_unit": "LB",
"packaging_type": "YOUR_PACKAGING",
"dropoff_type": "REGULAR_PICKUP",
"test": true
}
}
)
FedEx - Time in Transit
{
"carrier": "FedEx",
"action": "TimeInTransit",
"params": {
"key": "YOUR_KEY",
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"password": "YOUR_PASSWORD",
"ship_code": "94608",
"ship_country": "US",
"to_code": "90210",
"to_country": "US",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'TimeInTransit',
'params' =>
array (
'key' => 'YOUR_KEY',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'password' => 'YOUR_PASSWORD',
'ship_code' => '94608',
'ship_country' => 'US',
'to_code' => '90210',
'to_country' => 'US',
'test' => true,
),
)
);
rs.request(
{'action': 'TimeInTransit',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'password': 'YOUR_PASSWORD',
'ship_code': '94608',
'ship_country': 'US',
'test': True,
'to_code': '90210',
'to_country': 'US'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"TimeInTransit",
"params"=>
{"key"=>"YOUR_KEY",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"password"=>"YOUR_PASSWORD",
"ship_code"=>"94608",
"ship_country"=>"US",
"to_code"=>"90210",
"to_country"=>"US",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "TimeInTransit",
"params": {
"key": "YOUR_KEY",
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"password": "YOUR_PASSWORD",
"ship_code": "94608",
"ship_country": "US",
"to_code": "90210",
"to_country": "US",
"test": true
}
}
)
FedEx - Tracking
{
"carrier": "FedEx",
"action": "track",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"tracking_number": "123456789012"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'track',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'tracking_number' => '123456789012',
),
)
);
rs.request(
{'action': 'track',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'password': 'YOUR_PASSWORD',
'tracking_number': '123456789012'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"track",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"tracking_number"=>"123456789012"}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "track",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"tracking_number": "123456789012"
}
}
)
FedEx - Tracking Duplicate IDs Request Unique
{
"carrier": "FedEx",
"action": "track",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"reference_type": "TRACKING_NUMBER_OR_DOORTAG",
"unique_id": "12020~392845303162~FDEG",
"tracking_number": "392845303162"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'track',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'reference_type' => 'TRACKING_NUMBER_OR_DOORTAG',
'unique_id' => '12020~392845303162~FDEG',
'tracking_number' => '392845303162',
),
)
);
rs.request(
{'action': 'track',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'password': 'YOUR_PASSWORD',
'reference_type': 'TRACKING_NUMBER_OR_DOORTAG',
'tracking_number': '392845303162',
'unique_id': '12020~392845303162~FDEG'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"track",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"reference_type"=>"TRACKING_NUMBER_OR_DOORTAG",
"unique_id"=>"12020~392845303162~FDEG",
"tracking_number"=>"392845303162"}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "track",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"reference_type": "TRACKING_NUMBER_OR_DOORTAG",
"unique_id": "12020~392845303162~FDEG",
"tracking_number": "392845303162"
}
}
)
FedEx - Tracking by Control Number
{
"carrier": "FedEx",
"action": "track",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"tracking_number": "211172",
"tracking_id_type": "TRACKING_CONTROL_NUMBER",
"ship_date_begin": "2016-01-01",
"ship_date_end": "2018-01-01"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'track',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'tracking_number' => '211172',
'tracking_id_type' => 'TRACKING_CONTROL_NUMBER',
'ship_date_begin' => '2016-01-01',
'ship_date_end' => '2018-01-01',
),
)
);
rs.request(
{'action': 'track',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'password': 'YOUR_PASSWORD',
'ship_date_begin': '2016-01-01',
'ship_date_end': '2018-01-01',
'tracking_id_type': 'TRACKING_CONTROL_NUMBER',
'tracking_number': '211172'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"track",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"tracking_number"=>"211172",
"tracking_id_type"=>"TRACKING_CONTROL_NUMBER",
"ship_date_begin"=>"2016-01-01",
"ship_date_end"=>"2018-01-01"}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "track",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"tracking_number": "211172",
"tracking_id_type": "TRACKING_CONTROL_NUMBER",
"ship_date_begin": "2016-01-01",
"ship_date_end": "2018-01-01"
}
}
)
FedEx - Tracking by Reference
{
"carrier": "FedEx",
"action": "track",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"tracking_number": "211172",
"tracking_id_type": "CUSTOMER_REFERENCE"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'track',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'tracking_number' => '211172',
'tracking_id_type' => 'CUSTOMER_REFERENCE',
),
)
);
rs.request(
{'action': 'track',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'password': 'YOUR_PASSWORD',
'tracking_id_type': 'CUSTOMER_REFERENCE',
'tracking_number': '211172'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"track",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"tracking_number"=>"211172",
"tracking_id_type"=>"CUSTOMER_REFERENCE"}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "track",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"tracking_number": "211172",
"tracking_id_type": "CUSTOMER_REFERENCE"
}
}
)
FedEx - Tracking by Reference without account
{
"carrier": "FedEx",
"action": "track",
"params": {
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"tracking_number": "211172",
"tracking_id_type": "CUSTOMER_REFERENCE",
"to_country": "US",
"to_code": "90210",
"ship_date_begin": "2021-01-01",
"ship_date_end": "2021-01-11"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'track',
'params' =>
array (
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'tracking_number' => '211172',
'tracking_id_type' => 'CUSTOMER_REFERENCE',
'to_country' => 'US',
'to_code' => '90210',
'ship_date_begin' => '2021-01-01',
'ship_date_end' => '2021-01-11',
),
)
);
rs.request(
{'action': 'track',
'carrier': 'FedEx',
'params': {'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'password': 'YOUR_PASSWORD',
'ship_date_begin': '2021-01-01',
'ship_date_end': '2021-01-11',
'to_code': '90210',
'to_country': 'US',
'tracking_id_type': 'CUSTOMER_REFERENCE',
'tracking_number': '211172'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"track",
"params"=>
{"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"tracking_number"=>"211172",
"tracking_id_type"=>"CUSTOMER_REFERENCE",
"to_country"=>"US",
"to_code"=>"90210",
"ship_date_begin"=>"2021-01-01",
"ship_date_end"=>"2021-01-11"}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "track",
"params": {
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"tracking_number": "211172",
"tracking_id_type": "CUSTOMER_REFERENCE",
"to_country": "US",
"to_code": "90210",
"ship_date_begin": "2021-01-01",
"ship_date_end": "2021-01-11"
}
}
)
FedEx - Upload Customs Document
{
"carrier": "FedEx",
"action": "UploadDocument",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"filename": "test.txt",
"file_format": "txt",
"document_type": "013",
"file_contents": "Tm90aWNlDQpJbiBhbGwgY29tbXVuaWNhdGlvbnMgd2l0aCBVUFMgY29uY2VybmluZyB0aGlzIGRvY3VtZW50LCBwbGVhc2UgcmVmZXIgdG8gdGhlIGRvY3VtZW50IGRhdGUgbG9jYXRlZCBvbiB0aGUgY292ZXIuDQpDb3B5cmlnaHQNClRoZSB1c2UsIGRpc2Nsb3N1cmUsIHJlcHJvZHVjdGlvbiwgbW9kaWZpY2F0aW9uLCB0cmFuc2Zlciwgb3IgdHJhbnNtaXR0YWwgb2YgdGhpcyB3b3JrIGZvciBhbnkgcHVycG9zZSBpbiBhbnkgZm9ybSBvciBieSBhbnkgbWVhbnMgd2l0aG91dCB0aGUgd3JpdHRlbiBw ZXJtaXNzaW9uIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBpcyBzdHJpY3RseSBwcm9oaWJpdGVk Lg0KwqkgQ29weXJpZ2h0IDIwMTYgVW5pdGVkIFBhcmNlbCBTZXJ2aWNlIG9mIEFtZXJpY2EsIElu Yy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC4NClRyYWRlbWFya3MNClVQUyBPbkxpbmXCriBpcyBhIHJl Z2lzdGVyZWQgdHJhZGVtYXJrIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJ bmMuIEFsbCBvdGhlciB0cmFkZW1hcmtzIGFyZSB0aGUgcHJvcGVydHkgb2YgdGhlaXIgcmVzcGVj dGl2ZSBvd25lcnMuDQpTb21lIG9mIHRoZSBVUFMgY29ycG9yYXRlIGFwcGxpY2F0aW9ucyB1c2Ug VS5TLiBjaXR5LCBzdGF0ZSwgYW5kIHBvc3RhbCBjb2RlIGluZm9ybWF0aW9uIG9idGFpbmVkIGJ5 IFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJbmMuIHVuZGVyIGEgbm9uLWV4Y2x1 c2l2ZSBsaWNlbnNlIGZyb20gdGhlIFVuaXRlZCBTdGF0ZXMgUG9zdGFsIFNlcnZpY2UuIA0K"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'UploadDocument',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'filename' => 'test.txt',
'file_format' => 'txt',
'document_type' => '013',
'file_contents' => 'Tm90aWNlDQpJbiBhbGwgY29tbXVuaWNhdGlvbnMgd2l0aCBVUFMgY29uY2VybmluZyB0aGlzIGRvY3VtZW50LCBwbGVhc2UgcmVmZXIgdG8gdGhlIGRvY3VtZW50IGRhdGUgbG9jYXRlZCBvbiB0aGUgY292ZXIuDQpDb3B5cmlnaHQNClRoZSB1c2UsIGRpc2Nsb3N1cmUsIHJlcHJvZHVjdGlvbiwgbW9kaWZpY2F0aW9uLCB0cmFuc2Zlciwgb3IgdHJhbnNtaXR0YWwgb2YgdGhpcyB3b3JrIGZvciBhbnkgcHVycG9zZSBpbiBhbnkgZm9ybSBvciBieSBhbnkgbWVhbnMgd2l0aG91dCB0aGUgd3JpdHRlbiBw ZXJtaXNzaW9uIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBpcyBzdHJpY3RseSBwcm9oaWJpdGVk Lg0KwqkgQ29weXJpZ2h0IDIwMTYgVW5pdGVkIFBhcmNlbCBTZXJ2aWNlIG9mIEFtZXJpY2EsIElu Yy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC4NClRyYWRlbWFya3MNClVQUyBPbkxpbmXCriBpcyBhIHJl Z2lzdGVyZWQgdHJhZGVtYXJrIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJ bmMuIEFsbCBvdGhlciB0cmFkZW1hcmtzIGFyZSB0aGUgcHJvcGVydHkgb2YgdGhlaXIgcmVzcGVj dGl2ZSBvd25lcnMuDQpTb21lIG9mIHRoZSBVUFMgY29ycG9yYXRlIGFwcGxpY2F0aW9ucyB1c2Ug VS5TLiBjaXR5LCBzdGF0ZSwgYW5kIHBvc3RhbCBjb2RlIGluZm9ybWF0aW9uIG9idGFpbmVkIGJ5 IFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJbmMuIHVuZGVyIGEgbm9uLWV4Y2x1 c2l2ZSBsaWNlbnNlIGZyb20gdGhlIFVuaXRlZCBTdGF0ZXMgUG9zdGFsIFNlcnZpY2UuIA0K',
),
)
);
rs.request(
{'action': 'UploadDocument',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'document_type': '013',
'file_contents': 'Tm90aWNlDQpJbiBhbGwgY29tbXVuaWNhdGlvbnMgd2l0aCBVUFMgY29uY2VybmluZyB0aGlzIGRvY3VtZW50LCBwbGVhc2UgcmVmZXIgdG8gdGhlIGRvY3VtZW50IGRhdGUgbG9jYXRlZCBvbiB0aGUgY292ZXIuDQpDb3B5cmlnaHQNClRoZSB1c2UsIGRpc2Nsb3N1cmUsIHJlcHJvZHVjdGlvbiwgbW9kaWZpY2F0aW9uLCB0cmFuc2Zlciwgb3IgdHJhbnNtaXR0YWwgb2YgdGhpcyB3b3JrIGZvciBhbnkgcHVycG9zZSBpbiBhbnkgZm9ybSBvciBieSBhbnkgbWVhbnMgd2l0aG91dCB0aGUgd3JpdHRlbiBw '
'ZXJtaXNzaW9uIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBpcyBzdHJpY3RseSBwcm9oaWJpdGVk '
'Lg0KwqkgQ29weXJpZ2h0IDIwMTYgVW5pdGVkIFBhcmNlbCBTZXJ2aWNlIG9mIEFtZXJpY2EsIElu '
'Yy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC4NClRyYWRlbWFya3MNClVQUyBPbkxpbmXCriBpcyBhIHJl '
'Z2lzdGVyZWQgdHJhZGVtYXJrIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJ '
'bmMuIEFsbCBvdGhlciB0cmFkZW1hcmtzIGFyZSB0aGUgcHJvcGVydHkgb2YgdGhlaXIgcmVzcGVj '
'dGl2ZSBvd25lcnMuDQpTb21lIG9mIHRoZSBVUFMgY29ycG9yYXRlIGFwcGxpY2F0aW9ucyB1c2Ug '
'VS5TLiBjaXR5LCBzdGF0ZSwgYW5kIHBvc3RhbCBjb2RlIGluZm9ybWF0aW9uIG9idGFpbmVkIGJ5 '
'IFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJbmMuIHVuZGVyIGEgbm9uLWV4Y2x1 '
'c2l2ZSBsaWNlbnNlIGZyb20gdGhlIFVuaXRlZCBTdGF0ZXMgUG9zdGFsIFNlcnZpY2UuIA0K',
'file_format': 'txt',
'filename': 'test.txt',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'password': 'YOUR_PASSWORD'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"UploadDocument",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"filename"=>"test.txt",
"file_format"=>"txt",
"document_type"=>"013",
"file_contents"=>
"Tm90aWNlDQpJbiBhbGwgY29tbXVuaWNhdGlvbnMgd2l0aCBVUFMgY29uY2VybmluZyB0aGlzIGRvY3VtZW50LCBwbGVhc2UgcmVmZXIgdG8gdGhlIGRvY3VtZW50IGRhdGUgbG9jYXRlZCBvbiB0aGUgY292ZXIuDQpDb3B5cmlnaHQNClRoZSB1c2UsIGRpc2Nsb3N1cmUsIHJlcHJvZHVjdGlvbiwgbW9kaWZpY2F0aW9uLCB0cmFuc2Zlciwgb3IgdHJhbnNtaXR0YWwgb2YgdGhpcyB3b3JrIGZvciBhbnkgcHVycG9zZSBpbiBhbnkgZm9ybSBvciBieSBhbnkgbWVhbnMgd2l0aG91dCB0aGUgd3JpdHRlbiBw ZXJtaXNzaW9uIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBpcyBzdHJpY3RseSBwcm9oaWJpdGVk Lg0KwqkgQ29weXJpZ2h0IDIwMTYgVW5pdGVkIFBhcmNlbCBTZXJ2aWNlIG9mIEFtZXJpY2EsIElu Yy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC4NClRyYWRlbWFya3MNClVQUyBPbkxpbmXCriBpcyBhIHJl Z2lzdGVyZWQgdHJhZGVtYXJrIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJ bmMuIEFsbCBvdGhlciB0cmFkZW1hcmtzIGFyZSB0aGUgcHJvcGVydHkgb2YgdGhlaXIgcmVzcGVj dGl2ZSBvd25lcnMuDQpTb21lIG9mIHRoZSBVUFMgY29ycG9yYXRlIGFwcGxpY2F0aW9ucyB1c2Ug VS5TLiBjaXR5LCBzdGF0ZSwgYW5kIHBvc3RhbCBjb2RlIGluZm9ybWF0aW9uIG9idGFpbmVkIGJ5 IFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJbmMuIHVuZGVyIGEgbm9uLWV4Y2x1 c2l2ZSBsaWNlbnNlIGZyb20gdGhlIFVuaXRlZCBTdGF0ZXMgUG9zdGFsIFNlcnZpY2UuIA0K"}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "UploadDocument",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"filename": "test.txt",
"file_format": "txt",
"document_type": "013",
"file_contents": "Tm90aWNlDQpJbiBhbGwgY29tbXVuaWNhdGlvbnMgd2l0aCBVUFMgY29uY2VybmluZyB0aGlzIGRvY3VtZW50LCBwbGVhc2UgcmVmZXIgdG8gdGhlIGRvY3VtZW50IGRhdGUgbG9jYXRlZCBvbiB0aGUgY292ZXIuDQpDb3B5cmlnaHQNClRoZSB1c2UsIGRpc2Nsb3N1cmUsIHJlcHJvZHVjdGlvbiwgbW9kaWZpY2F0aW9uLCB0cmFuc2Zlciwgb3IgdHJhbnNtaXR0YWwgb2YgdGhpcyB3b3JrIGZvciBhbnkgcHVycG9zZSBpbiBhbnkgZm9ybSBvciBieSBhbnkgbWVhbnMgd2l0aG91dCB0aGUgd3JpdHRlbiBw ZXJtaXNzaW9uIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBpcyBzdHJpY3RseSBwcm9oaWJpdGVk Lg0KwqkgQ29weXJpZ2h0IDIwMTYgVW5pdGVkIFBhcmNlbCBTZXJ2aWNlIG9mIEFtZXJpY2EsIElu Yy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC4NClRyYWRlbWFya3MNClVQUyBPbkxpbmXCriBpcyBhIHJl Z2lzdGVyZWQgdHJhZGVtYXJrIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJ bmMuIEFsbCBvdGhlciB0cmFkZW1hcmtzIGFyZSB0aGUgcHJvcGVydHkgb2YgdGhlaXIgcmVzcGVj dGl2ZSBvd25lcnMuDQpTb21lIG9mIHRoZSBVUFMgY29ycG9yYXRlIGFwcGxpY2F0aW9ucyB1c2Ug VS5TLiBjaXR5LCBzdGF0ZSwgYW5kIHBvc3RhbCBjb2RlIGluZm9ybWF0aW9uIG9idGFpbmVkIGJ5 IFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJbmMuIHVuZGVyIGEgbm9uLWV4Y2x1 c2l2ZSBsaWNlbnNlIGZyb20gdGhlIFVuaXRlZCBTdGF0ZXMgUG9zdGFsIFNlcnZpY2UuIA0K"
}
}
)
FedEx - Upload Images
{
"carrier": "FedEx",
"action": "UploadImages",
"params": {
"test": true,
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"images": [
{
"id": "IMAGE_1",
"content": "Tm90aWNlDQpJbiBhbGwgY29tbXVuaWNhdGlvbnMgd2l0aCBVUFMgY29uY2VybmluZyB0aGlzIGRvY3VtZW50LCBwbGVhc2UgcmVmZXIgdG8gdGhlIGRvY3VtZW50IGRhdGUgbG9jYXRlZCBvbiB0aGUgY292ZXIuDQpDb3B5cmlnaHQNClRoZSB1c2UsIGRpc2Nsb3N1cmUsIHJlcHJvZHVjdGlvbiwgbW9kaWZpY2F0aW9uLCB0cmFuc2Zlciwgb3IgdHJhbnNtaXR0YWwgb2YgdGhpcyB3b3JrIGZvciBhbnkgcHVycG9zZSBpbiBhbnkgZm9ybSBvciBieSBhbnkgbWVhbnMgd2l0aG91dCB0aGUgd3JpdHRlbiBw ZXJtaXNzaW9uIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBpcyBzdHJpY3RseSBwcm9oaWJpdGVk Lg0KwqkgQ29weXJpZ2h0IDIwMTYgVW5pdGVkIFBhcmNlbCBTZXJ2aWNlIG9mIEFtZXJpY2EsIElu Yy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC4NClRyYWRlbWFya3MNClVQUyBPbkxpbmXCriBpcyBhIHJl Z2lzdGVyZWQgdHJhZGVtYXJrIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJ bmMuIEFsbCBvdGhlciB0cmFkZW1hcmtzIGFyZSB0aGUgcHJvcGVydHkgb2YgdGhlaXIgcmVzcGVj dGl2ZSBvd25lcnMuDQpTb21lIG9mIHRoZSBVUFMgY29ycG9yYXRlIGFwcGxpY2F0aW9ucyB1c2Ug VS5TLiBjaXR5LCBzdGF0ZSwgYW5kIHBvc3RhbCBjb2RlIGluZm9ybWF0aW9uIG9idGFpbmVkIGJ5 IFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJbmMuIHVuZGVyIGEgbm9uLWV4Y2x1 c2l2ZSBsaWNlbnNlIGZyb20gdGhlIFVuaXRlZCBTdGF0ZXMgUG9zdGFsIFNlcnZpY2UuIA0K"
},
{
"id": "IMAGE_2",
"content": "Tm90aWNlDQpJbiBhbGwgY29tbXVuaWNhdGlvbnMgd2l0aCBVUFMgY29uY2VybmluZyB0aGlzIGRvY3VtZW50LCBwbGVhc2UgcmVmZXIgdG8gdGhlIGRvY3VtZW50IGRhdGUgbG9jYXRlZCBvbiB0aGUgY292ZXIuDQpDb3B5cmlnaHQNClRoZSB1c2UsIGRpc2Nsb3N1cmUsIHJlcHJvZHVjdGlvbiwgbW9kaWZpY2F0aW9uLCB0cmFuc2Zlciwgb3IgdHJhbnNtaXR0YWwgb2YgdGhpcyB3b3JrIGZvciBhbnkgcHVycG9zZSBpbiBhbnkgZm9ybSBvciBieSBhbnkgbWVhbnMgd2l0aG91dCB0aGUgd3JpdHRlbiBw ZXJtaXNzaW9uIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBpcyBzdHJpY3RseSBwcm9oaWJpdGVk Lg0KwqkgQ29weXJpZ2h0IDIwMTYgVW5pdGVkIFBhcmNlbCBTZXJ2aWNlIG9mIEFtZXJpY2EsIElu Yy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC4NClRyYWRlbWFya3MNClVQUyBPbkxpbmXCriBpcyBhIHJl Z2lzdGVyZWQgdHJhZGVtYXJrIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJ bmMuIEFsbCBvdGhlciB0cmFkZW1hcmtzIGFyZSB0aGUgcHJvcGVydHkgb2YgdGhlaXIgcmVzcGVj dGl2ZSBvd25lcnMuDQpTb21lIG9mIHRoZSBVUFMgY29ycG9yYXRlIGFwcGxpY2F0aW9ucyB1c2Ug VS5TLiBjaXR5LCBzdGF0ZSwgYW5kIHBvc3RhbCBjb2RlIGluZm9ybWF0aW9uIG9idGFpbmVkIGJ5 IFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJbmMuIHVuZGVyIGEgbm9uLWV4Y2x1 c2l2ZSBsaWNlbnNlIGZyb20gdGhlIFVuaXRlZCBTdGF0ZXMgUG9zdGFsIFNlcnZpY2UuIA0K"
}
]
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'UploadImages',
'params' =>
array (
'test' => true,
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'images' =>
array (
0 =>
array (
'id' => 'IMAGE_1',
'content' => 'Tm90aWNlDQpJbiBhbGwgY29tbXVuaWNhdGlvbnMgd2l0aCBVUFMgY29uY2VybmluZyB0aGlzIGRvY3VtZW50LCBwbGVhc2UgcmVmZXIgdG8gdGhlIGRvY3VtZW50IGRhdGUgbG9jYXRlZCBvbiB0aGUgY292ZXIuDQpDb3B5cmlnaHQNClRoZSB1c2UsIGRpc2Nsb3N1cmUsIHJlcHJvZHVjdGlvbiwgbW9kaWZpY2F0aW9uLCB0cmFuc2Zlciwgb3IgdHJhbnNtaXR0YWwgb2YgdGhpcyB3b3JrIGZvciBhbnkgcHVycG9zZSBpbiBhbnkgZm9ybSBvciBieSBhbnkgbWVhbnMgd2l0aG91dCB0aGUgd3JpdHRlbiBw ZXJtaXNzaW9uIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBpcyBzdHJpY3RseSBwcm9oaWJpdGVk Lg0KwqkgQ29weXJpZ2h0IDIwMTYgVW5pdGVkIFBhcmNlbCBTZXJ2aWNlIG9mIEFtZXJpY2EsIElu Yy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC4NClRyYWRlbWFya3MNClVQUyBPbkxpbmXCriBpcyBhIHJl Z2lzdGVyZWQgdHJhZGVtYXJrIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJ bmMuIEFsbCBvdGhlciB0cmFkZW1hcmtzIGFyZSB0aGUgcHJvcGVydHkgb2YgdGhlaXIgcmVzcGVj dGl2ZSBvd25lcnMuDQpTb21lIG9mIHRoZSBVUFMgY29ycG9yYXRlIGFwcGxpY2F0aW9ucyB1c2Ug VS5TLiBjaXR5LCBzdGF0ZSwgYW5kIHBvc3RhbCBjb2RlIGluZm9ybWF0aW9uIG9idGFpbmVkIGJ5 IFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJbmMuIHVuZGVyIGEgbm9uLWV4Y2x1 c2l2ZSBsaWNlbnNlIGZyb20gdGhlIFVuaXRlZCBTdGF0ZXMgUG9zdGFsIFNlcnZpY2UuIA0K',
),
1 =>
array (
'id' => 'IMAGE_2',
'content' => 'Tm90aWNlDQpJbiBhbGwgY29tbXVuaWNhdGlvbnMgd2l0aCBVUFMgY29uY2VybmluZyB0aGlzIGRvY3VtZW50LCBwbGVhc2UgcmVmZXIgdG8gdGhlIGRvY3VtZW50IGRhdGUgbG9jYXRlZCBvbiB0aGUgY292ZXIuDQpDb3B5cmlnaHQNClRoZSB1c2UsIGRpc2Nsb3N1cmUsIHJlcHJvZHVjdGlvbiwgbW9kaWZpY2F0aW9uLCB0cmFuc2Zlciwgb3IgdHJhbnNtaXR0YWwgb2YgdGhpcyB3b3JrIGZvciBhbnkgcHVycG9zZSBpbiBhbnkgZm9ybSBvciBieSBhbnkgbWVhbnMgd2l0aG91dCB0aGUgd3JpdHRlbiBw ZXJtaXNzaW9uIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBpcyBzdHJpY3RseSBwcm9oaWJpdGVk Lg0KwqkgQ29weXJpZ2h0IDIwMTYgVW5pdGVkIFBhcmNlbCBTZXJ2aWNlIG9mIEFtZXJpY2EsIElu Yy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC4NClRyYWRlbWFya3MNClVQUyBPbkxpbmXCriBpcyBhIHJl Z2lzdGVyZWQgdHJhZGVtYXJrIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJ bmMuIEFsbCBvdGhlciB0cmFkZW1hcmtzIGFyZSB0aGUgcHJvcGVydHkgb2YgdGhlaXIgcmVzcGVj dGl2ZSBvd25lcnMuDQpTb21lIG9mIHRoZSBVUFMgY29ycG9yYXRlIGFwcGxpY2F0aW9ucyB1c2Ug VS5TLiBjaXR5LCBzdGF0ZSwgYW5kIHBvc3RhbCBjb2RlIGluZm9ybWF0aW9uIG9idGFpbmVkIGJ5 IFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJbmMuIHVuZGVyIGEgbm9uLWV4Y2x1 c2l2ZSBsaWNlbnNlIGZyb20gdGhlIFVuaXRlZCBTdGF0ZXMgUG9zdGFsIFNlcnZpY2UuIA0K',
),
),
),
)
);
rs.request(
{'action': 'UploadImages',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'images': [{'content': 'Tm90aWNlDQpJbiBhbGwgY29tbXVuaWNhdGlvbnMgd2l0aCBVUFMgY29uY2VybmluZyB0aGlzIGRvY3VtZW50LCBwbGVhc2UgcmVmZXIgdG8gdGhlIGRvY3VtZW50IGRhdGUgbG9jYXRlZCBvbiB0aGUgY292ZXIuDQpDb3B5cmlnaHQNClRoZSB1c2UsIGRpc2Nsb3N1cmUsIHJlcHJvZHVjdGlvbiwgbW9kaWZpY2F0aW9uLCB0cmFuc2Zlciwgb3IgdHJhbnNtaXR0YWwgb2YgdGhpcyB3b3JrIGZvciBhbnkgcHVycG9zZSBpbiBhbnkgZm9ybSBvciBieSBhbnkgbWVhbnMgd2l0aG91dCB0aGUgd3JpdHRlbiBw '
'ZXJtaXNzaW9uIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBpcyBzdHJpY3RseSBwcm9oaWJpdGVk '
'Lg0KwqkgQ29weXJpZ2h0IDIwMTYgVW5pdGVkIFBhcmNlbCBTZXJ2aWNlIG9mIEFtZXJpY2EsIElu '
'Yy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC4NClRyYWRlbWFya3MNClVQUyBPbkxpbmXCriBpcyBhIHJl '
'Z2lzdGVyZWQgdHJhZGVtYXJrIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJ '
'bmMuIEFsbCBvdGhlciB0cmFkZW1hcmtzIGFyZSB0aGUgcHJvcGVydHkgb2YgdGhlaXIgcmVzcGVj '
'dGl2ZSBvd25lcnMuDQpTb21lIG9mIHRoZSBVUFMgY29ycG9yYXRlIGFwcGxpY2F0aW9ucyB1c2Ug '
'VS5TLiBjaXR5LCBzdGF0ZSwgYW5kIHBvc3RhbCBjb2RlIGluZm9ybWF0aW9uIG9idGFpbmVkIGJ5 '
'IFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJbmMuIHVuZGVyIGEgbm9uLWV4Y2x1 '
'c2l2ZSBsaWNlbnNlIGZyb20gdGhlIFVuaXRlZCBTdGF0ZXMgUG9zdGFsIFNlcnZpY2UuIA0K',
'id': 'IMAGE_1'},
{'content': 'Tm90aWNlDQpJbiBhbGwgY29tbXVuaWNhdGlvbnMgd2l0aCBVUFMgY29uY2VybmluZyB0aGlzIGRvY3VtZW50LCBwbGVhc2UgcmVmZXIgdG8gdGhlIGRvY3VtZW50IGRhdGUgbG9jYXRlZCBvbiB0aGUgY292ZXIuDQpDb3B5cmlnaHQNClRoZSB1c2UsIGRpc2Nsb3N1cmUsIHJlcHJvZHVjdGlvbiwgbW9kaWZpY2F0aW9uLCB0cmFuc2Zlciwgb3IgdHJhbnNtaXR0YWwgb2YgdGhpcyB3b3JrIGZvciBhbnkgcHVycG9zZSBpbiBhbnkgZm9ybSBvciBieSBhbnkgbWVhbnMgd2l0aG91dCB0aGUgd3JpdHRlbiBw '
'ZXJtaXNzaW9uIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBpcyBzdHJpY3RseSBwcm9oaWJpdGVk '
'Lg0KwqkgQ29weXJpZ2h0IDIwMTYgVW5pdGVkIFBhcmNlbCBTZXJ2aWNlIG9mIEFtZXJpY2EsIElu '
'Yy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC4NClRyYWRlbWFya3MNClVQUyBPbkxpbmXCriBpcyBhIHJl '
'Z2lzdGVyZWQgdHJhZGVtYXJrIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJ '
'bmMuIEFsbCBvdGhlciB0cmFkZW1hcmtzIGFyZSB0aGUgcHJvcGVydHkgb2YgdGhlaXIgcmVzcGVj '
'dGl2ZSBvd25lcnMuDQpTb21lIG9mIHRoZSBVUFMgY29ycG9yYXRlIGFwcGxpY2F0aW9ucyB1c2Ug '
'VS5TLiBjaXR5LCBzdGF0ZSwgYW5kIHBvc3RhbCBjb2RlIGluZm9ybWF0aW9uIG9idGFpbmVkIGJ5 '
'IFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJbmMuIHVuZGVyIGEgbm9uLWV4Y2x1 '
'c2l2ZSBsaWNlbnNlIGZyb20gdGhlIFVuaXRlZCBTdGF0ZXMgUG9zdGFsIFNlcnZpY2UuIA0K',
'id': 'IMAGE_2'}],
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'password': 'YOUR_PASSWORD',
'test': True}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"UploadImages",
"params"=>
{"test"=>true,
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"images"=>
[{"id"=>"IMAGE_1",
"content"=>
"Tm90aWNlDQpJbiBhbGwgY29tbXVuaWNhdGlvbnMgd2l0aCBVUFMgY29uY2VybmluZyB0aGlzIGRvY3VtZW50LCBwbGVhc2UgcmVmZXIgdG8gdGhlIGRvY3VtZW50IGRhdGUgbG9jYXRlZCBvbiB0aGUgY292ZXIuDQpDb3B5cmlnaHQNClRoZSB1c2UsIGRpc2Nsb3N1cmUsIHJlcHJvZHVjdGlvbiwgbW9kaWZpY2F0aW9uLCB0cmFuc2Zlciwgb3IgdHJhbnNtaXR0YWwgb2YgdGhpcyB3b3JrIGZvciBhbnkgcHVycG9zZSBpbiBhbnkgZm9ybSBvciBieSBhbnkgbWVhbnMgd2l0aG91dCB0aGUgd3JpdHRlbiBw ZXJtaXNzaW9uIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBpcyBzdHJpY3RseSBwcm9oaWJpdGVk Lg0KwqkgQ29weXJpZ2h0IDIwMTYgVW5pdGVkIFBhcmNlbCBTZXJ2aWNlIG9mIEFtZXJpY2EsIElu Yy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC4NClRyYWRlbWFya3MNClVQUyBPbkxpbmXCriBpcyBhIHJl Z2lzdGVyZWQgdHJhZGVtYXJrIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJ bmMuIEFsbCBvdGhlciB0cmFkZW1hcmtzIGFyZSB0aGUgcHJvcGVydHkgb2YgdGhlaXIgcmVzcGVj dGl2ZSBvd25lcnMuDQpTb21lIG9mIHRoZSBVUFMgY29ycG9yYXRlIGFwcGxpY2F0aW9ucyB1c2Ug VS5TLiBjaXR5LCBzdGF0ZSwgYW5kIHBvc3RhbCBjb2RlIGluZm9ybWF0aW9uIG9idGFpbmVkIGJ5 IFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJbmMuIHVuZGVyIGEgbm9uLWV4Y2x1 c2l2ZSBsaWNlbnNlIGZyb20gdGhlIFVuaXRlZCBTdGF0ZXMgUG9zdGFsIFNlcnZpY2UuIA0K"},
{"id"=>"IMAGE_2",
"content"=>
"Tm90aWNlDQpJbiBhbGwgY29tbXVuaWNhdGlvbnMgd2l0aCBVUFMgY29uY2VybmluZyB0aGlzIGRvY3VtZW50LCBwbGVhc2UgcmVmZXIgdG8gdGhlIGRvY3VtZW50IGRhdGUgbG9jYXRlZCBvbiB0aGUgY292ZXIuDQpDb3B5cmlnaHQNClRoZSB1c2UsIGRpc2Nsb3N1cmUsIHJlcHJvZHVjdGlvbiwgbW9kaWZpY2F0aW9uLCB0cmFuc2Zlciwgb3IgdHJhbnNtaXR0YWwgb2YgdGhpcyB3b3JrIGZvciBhbnkgcHVycG9zZSBpbiBhbnkgZm9ybSBvciBieSBhbnkgbWVhbnMgd2l0aG91dCB0aGUgd3JpdHRlbiBw ZXJtaXNzaW9uIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBpcyBzdHJpY3RseSBwcm9oaWJpdGVk Lg0KwqkgQ29weXJpZ2h0IDIwMTYgVW5pdGVkIFBhcmNlbCBTZXJ2aWNlIG9mIEFtZXJpY2EsIElu Yy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC4NClRyYWRlbWFya3MNClVQUyBPbkxpbmXCriBpcyBhIHJl Z2lzdGVyZWQgdHJhZGVtYXJrIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJ bmMuIEFsbCBvdGhlciB0cmFkZW1hcmtzIGFyZSB0aGUgcHJvcGVydHkgb2YgdGhlaXIgcmVzcGVj dGl2ZSBvd25lcnMuDQpTb21lIG9mIHRoZSBVUFMgY29ycG9yYXRlIGFwcGxpY2F0aW9ucyB1c2Ug VS5TLiBjaXR5LCBzdGF0ZSwgYW5kIHBvc3RhbCBjb2RlIGluZm9ybWF0aW9uIG9idGFpbmVkIGJ5 IFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJbmMuIHVuZGVyIGEgbm9uLWV4Y2x1 c2l2ZSBsaWNlbnNlIGZyb20gdGhlIFVuaXRlZCBTdGF0ZXMgUG9zdGFsIFNlcnZpY2UuIA0K"}]}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "UploadImages",
"params": {
"test": true,
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"images": [
{
"id": "IMAGE_1",
"content": "Tm90aWNlDQpJbiBhbGwgY29tbXVuaWNhdGlvbnMgd2l0aCBVUFMgY29uY2VybmluZyB0aGlzIGRvY3VtZW50LCBwbGVhc2UgcmVmZXIgdG8gdGhlIGRvY3VtZW50IGRhdGUgbG9jYXRlZCBvbiB0aGUgY292ZXIuDQpDb3B5cmlnaHQNClRoZSB1c2UsIGRpc2Nsb3N1cmUsIHJlcHJvZHVjdGlvbiwgbW9kaWZpY2F0aW9uLCB0cmFuc2Zlciwgb3IgdHJhbnNtaXR0YWwgb2YgdGhpcyB3b3JrIGZvciBhbnkgcHVycG9zZSBpbiBhbnkgZm9ybSBvciBieSBhbnkgbWVhbnMgd2l0aG91dCB0aGUgd3JpdHRlbiBw ZXJtaXNzaW9uIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBpcyBzdHJpY3RseSBwcm9oaWJpdGVk Lg0KwqkgQ29weXJpZ2h0IDIwMTYgVW5pdGVkIFBhcmNlbCBTZXJ2aWNlIG9mIEFtZXJpY2EsIElu Yy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC4NClRyYWRlbWFya3MNClVQUyBPbkxpbmXCriBpcyBhIHJl Z2lzdGVyZWQgdHJhZGVtYXJrIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJ bmMuIEFsbCBvdGhlciB0cmFkZW1hcmtzIGFyZSB0aGUgcHJvcGVydHkgb2YgdGhlaXIgcmVzcGVj dGl2ZSBvd25lcnMuDQpTb21lIG9mIHRoZSBVUFMgY29ycG9yYXRlIGFwcGxpY2F0aW9ucyB1c2Ug VS5TLiBjaXR5LCBzdGF0ZSwgYW5kIHBvc3RhbCBjb2RlIGluZm9ybWF0aW9uIG9idGFpbmVkIGJ5 IFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJbmMuIHVuZGVyIGEgbm9uLWV4Y2x1 c2l2ZSBsaWNlbnNlIGZyb20gdGhlIFVuaXRlZCBTdGF0ZXMgUG9zdGFsIFNlcnZpY2UuIA0K"
},
{
"id": "IMAGE_2",
"content": "Tm90aWNlDQpJbiBhbGwgY29tbXVuaWNhdGlvbnMgd2l0aCBVUFMgY29uY2VybmluZyB0aGlzIGRvY3VtZW50LCBwbGVhc2UgcmVmZXIgdG8gdGhlIGRvY3VtZW50IGRhdGUgbG9jYXRlZCBvbiB0aGUgY292ZXIuDQpDb3B5cmlnaHQNClRoZSB1c2UsIGRpc2Nsb3N1cmUsIHJlcHJvZHVjdGlvbiwgbW9kaWZpY2F0aW9uLCB0cmFuc2Zlciwgb3IgdHJhbnNtaXR0YWwgb2YgdGhpcyB3b3JrIGZvciBhbnkgcHVycG9zZSBpbiBhbnkgZm9ybSBvciBieSBhbnkgbWVhbnMgd2l0aG91dCB0aGUgd3JpdHRlbiBw ZXJtaXNzaW9uIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBpcyBzdHJpY3RseSBwcm9oaWJpdGVk Lg0KwqkgQ29weXJpZ2h0IDIwMTYgVW5pdGVkIFBhcmNlbCBTZXJ2aWNlIG9mIEFtZXJpY2EsIElu Yy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC4NClRyYWRlbWFya3MNClVQUyBPbkxpbmXCriBpcyBhIHJl Z2lzdGVyZWQgdHJhZGVtYXJrIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJ bmMuIEFsbCBvdGhlciB0cmFkZW1hcmtzIGFyZSB0aGUgcHJvcGVydHkgb2YgdGhlaXIgcmVzcGVj dGl2ZSBvd25lcnMuDQpTb21lIG9mIHRoZSBVUFMgY29ycG9yYXRlIGFwcGxpY2F0aW9ucyB1c2Ug VS5TLiBjaXR5LCBzdGF0ZSwgYW5kIHBvc3RhbCBjb2RlIGluZm9ybWF0aW9uIG9idGFpbmVkIGJ5 IFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJbmMuIHVuZGVyIGEgbm9uLWV4Y2x1 c2l2ZSBsaWNlbnNlIGZyb20gdGhlIFVuaXRlZCBTdGF0ZXMgUG9zdGFsIFNlcnZpY2UuIA0K"
}
]
}
}
)
FedEx - Void
{
"carrier": "FedEx",
"action": "VoidShipment",
"params": {
"shipment_id": "123123123",
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'VoidShipment',
'params' =>
array (
'shipment_id' => '123123123',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'test' => true,
),
)
);
rs.request(
{'action': 'VoidShipment',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'password': 'YOUR_PASSWORD',
'shipment_id': '123123123',
'test': True}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"VoidShipment",
"params"=>
{"shipment_id"=>"123123123",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "VoidShipment",
"params": {
"shipment_id": "123123123",
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"test": true
}
}
)
FedEx-FIMS - Label
{
"carrier": "FedEx-FIMS",
"action": "SubmitShipment",
"params": {
"username": "YOUR_FIMS_CUSTCODE",
"password": "YOUR_FIMS_SERVICE_ID",
"airway_bill": "123456789098",
"packages": [
{
"weight": 15,
"length": 10,
"width": 10,
"height": 10
}
],
"customs": [
{
"customs_weight": 10,
"customs_line_amount": 10,
"customs_description": "books",
"customs_hs_tariff": "2100",
"country_of_manufacture": "US"
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"to_country": "CA",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx-FIMS',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_FIMS_CUSTCODE',
'password' => 'YOUR_FIMS_SERVICE_ID',
'airway_bill' => '123456789098',
'packages' =>
array (
0 =>
array (
'weight' => 15,
'length' => 10,
'width' => 10,
'height' => 10,
),
),
'customs' =>
array (
0 =>
array (
'customs_weight' => 10,
'customs_line_amount' => 10,
'customs_description' => 'books',
'customs_hs_tariff' => '2100',
'country_of_manufacture' => 'US',
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'to_phone' => '1231231234',
'to_country' => 'CA',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx-FIMS',
'params': {'airway_bill': '123456789098',
'customs': [{'country_of_manufacture': 'US',
'customs_description': 'books',
'customs_hs_tariff': '2100',
'customs_line_amount': 10,
'customs_weight': 10}],
'packages': [{'height': 10,
'length': 10,
'weight': 15,
'width': 10}],
'password': 'YOUR_FIMS_SERVICE_ID',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_country': 'CA',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'CA',
'username': 'YOUR_FIMS_CUSTCODE'}}
)
rs.request(
{"carrier"=>"FedEx-FIMS",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_FIMS_CUSTCODE",
"password"=>"YOUR_FIMS_SERVICE_ID",
"airway_bill"=>"123456789098",
"packages"=>[{"weight"=>15, "length"=>10, "width"=>10, "height"=>10}],
"customs"=>
[{"customs_weight"=>10,
"customs_line_amount"=>10,
"customs_description"=>"books",
"customs_hs_tariff"=>"2100",
"country_of_manufacture"=>"US"}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"to_phone"=>"1231231234",
"to_country"=>"CA",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx-FIMS",
"action": "SubmitShipment",
"params": {
"username": "YOUR_FIMS_CUSTCODE",
"password": "YOUR_FIMS_SERVICE_ID",
"airway_bill": "123456789098",
"packages": [
{
"weight": 15,
"length": 10,
"width": 10,
"height": 10
}
],
"customs": [
{
"customs_weight": 10,
"customs_line_amount": 10,
"customs_description": "books",
"customs_hs_tariff": "2100",
"country_of_manufacture": "US"
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"to_country": "CA",
"test": true
}
}
)
FedEx-REST - Address Validation
{
"carrier": "FedEx-REST",
"action": "AddressValidate",
"params": {
"key": "your-key-from-authenticate-request",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx-REST',
'action' => 'AddressValidate',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'to_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'test' => true,
),
)
);
rs.request(
{'action': 'AddressValidate',
'carrier': 'FedEx-REST',
'params': {'key': 'your-key-from-authenticate-request',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"FedEx-REST",
"action"=>"AddressValidate",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"to_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx-REST",
"action": "AddressValidate",
"params": {
"key": "your-key-from-authenticate-request",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"test": true
}
}
)
FedEx-REST - Authenticate
{
"carrier": "FedEx-REST",
"action": "Authenticate",
"params": {
"client_id": "abc123",
"client_secret": "def987",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx-REST',
'action' => 'Authenticate',
'params' =>
array (
'client_id' => 'abc123',
'client_secret' => 'def987',
'test' => true,
),
)
);
rs.request(
{'action': 'Authenticate',
'carrier': 'FedEx-REST',
'params': {'client_id': 'abc123', 'client_secret': 'def987', 'test': True}}
)
rs.request(
{"carrier"=>"FedEx-REST",
"action"=>"Authenticate",
"params"=>{"client_id"=>"abc123", "client_secret"=>"def987", "test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx-REST",
"action": "Authenticate",
"params": {
"client_id": "abc123",
"client_secret": "def987",
"test": true
}
}
)
FedEx-REST - Freight Rating
{
"carrier": "FedEx-REST",
"action": "GetAllRates",
"params": {
"key": "your-key-from-authenticate-request",
"freight_account_number": "abc123",
"packages": [
{
"description": "furniture",
"sub_packaging_type": "PALLET",
"weight": 200,
"freight_class": "50"
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "1202 Chalet Ln",
"ship_addr2": "Do Not Delete - Test Account",
"ship_city": "Harrison",
"ship_state": "AR",
"ship_code": "72601",
"ship_country": "US",
"to_country": "US",
"to_city": "Akron",
"to_state": "OH",
"to_code": "44333",
"weight_unit": "LB",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx-REST',
'action' => 'GetAllRates',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'freight_account_number' => 'abc123',
'packages' =>
array (
0 =>
array (
'description' => 'furniture',
'sub_packaging_type' => 'PALLET',
'weight' => 200,
'freight_class' => '50',
),
),
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '1202 Chalet Ln',
'ship_addr2' => 'Do Not Delete - Test Account',
'ship_city' => 'Harrison',
'ship_state' => 'AR',
'ship_code' => '72601',
'ship_country' => 'US',
'to_country' => 'US',
'to_city' => 'Akron',
'to_state' => 'OH',
'to_code' => '44333',
'weight_unit' => 'LB',
'test' => true,
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'FedEx-REST',
'params': {'customs': [],
'freight_account_number': 'abc123',
'key': 'your-key-from-authenticate-request',
'packages': [{'description': 'furniture',
'freight_class': '50',
'sub_packaging_type': 'PALLET',
'weight': 200}],
'ship_addr1': '1202 Chalet Ln',
'ship_addr2': 'Do Not Delete - Test Account',
'ship_city': 'Harrison',
'ship_code': '72601',
'ship_country': 'US',
'ship_state': 'AR',
'shipper': 'RocketShipIt',
'test': True,
'to_city': 'Akron',
'to_code': '44333',
'to_country': 'US',
'to_state': 'OH',
'weight_unit': 'LB'}}
)
rs.request(
{"carrier"=>"FedEx-REST",
"action"=>"GetAllRates",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"freight_account_number"=>"abc123",
"packages"=>
[{"description"=>"furniture",
"sub_packaging_type"=>"PALLET",
"weight"=>200,
"freight_class"=>"50"}],
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"1202 Chalet Ln",
"ship_addr2"=>"Do Not Delete - Test Account",
"ship_city"=>"Harrison",
"ship_state"=>"AR",
"ship_code"=>"72601",
"ship_country"=>"US",
"to_country"=>"US",
"to_city"=>"Akron",
"to_state"=>"OH",
"to_code"=>"44333",
"weight_unit"=>"LB",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx-REST",
"action": "GetAllRates",
"params": {
"key": "your-key-from-authenticate-request",
"freight_account_number": "abc123",
"packages": [
{
"description": "furniture",
"sub_packaging_type": "PALLET",
"weight": 200,
"freight_class": "50"
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "1202 Chalet Ln",
"ship_addr2": "Do Not Delete - Test Account",
"ship_city": "Harrison",
"ship_state": "AR",
"ship_code": "72601",
"ship_country": "US",
"to_country": "US",
"to_city": "Akron",
"to_state": "OH",
"to_code": "44333",
"weight_unit": "LB",
"test": true
}
}
)
FedEx-REST - Label
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"key": "your-key-from-authenticate-request",
"packages": [
{
"weight": 15
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'key' => 'your-key-from-authenticate-request',
'packages' =>
array (
0 =>
array (
'weight' => 15,
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'to_phone' => '1231231234',
'packaging_type' => 'YOUR_PACKAGING',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx-REST',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'key': 'your-key-from-authenticate-request',
'packages': [{'weight': 15}],
'packaging_type': 'YOUR_PACKAGING',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"FedEx-REST",
"action"=>"SubmitShipment",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"key"=>"your-key-from-authenticate-request",
"packages"=>[{"weight"=>15}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"to_phone"=>"1231231234",
"packaging_type"=>"YOUR_PACKAGING",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"key": "your-key-from-authenticate-request",
"packages": [
{
"weight": 15
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
)
FedEx-REST - Label Additional Handling PAIL
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"account_number": "your-account-number",
"key": "your-key-from-authenticate-request",
"packages": [
{
"weight": 15,
"additional_handling": true,
"sub_packaging_type": "PAIL"
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'account_number' => 'your-account-number',
'key' => 'your-key-from-authenticate-request',
'packages' =>
array (
0 =>
array (
'weight' => 15,
'additional_handling' => true,
'sub_packaging_type' => 'PAIL',
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'to_phone' => '1231231234',
'packaging_type' => 'YOUR_PACKAGING',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx-REST',
'params': {'account_number': 'your-account-number',
'key': 'your-key-from-authenticate-request',
'packages': [{'additional_handling': True,
'sub_packaging_type': 'PAIL',
'weight': 15}],
'packaging_type': 'YOUR_PACKAGING',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"FedEx-REST",
"action"=>"SubmitShipment",
"params"=>
{"account_number"=>"your-account-number",
"key"=>"your-key-from-authenticate-request",
"packages"=>
[{"weight"=>15,
"additional_handling"=>true,
"sub_packaging_type"=>"PAIL"}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"to_phone"=>"1231231234",
"packaging_type"=>"YOUR_PACKAGING",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"account_number": "your-account-number",
"key": "your-key-from-authenticate-request",
"packages": [
{
"weight": 15,
"additional_handling": true,
"sub_packaging_type": "PAIL"
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
)
FedEx-REST - Label Alcohol
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"key": "your-key-from-authenticate-request",
"packages": [
{
"weight": 15,
"alcohol": true
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'key' => 'your-key-from-authenticate-request',
'packages' =>
array (
0 =>
array (
'weight' => 15,
'alcohol' => true,
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'to_phone' => '1231231234',
'packaging_type' => 'YOUR_PACKAGING',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx-REST',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'key': 'your-key-from-authenticate-request',
'packages': [{'alcohol': True, 'weight': 15}],
'packaging_type': 'YOUR_PACKAGING',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"FedEx-REST",
"action"=>"SubmitShipment",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"key"=>"your-key-from-authenticate-request",
"packages"=>[{"weight"=>15, "alcohol"=>true}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"to_phone"=>"1231231234",
"packaging_type"=>"YOUR_PACKAGING",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"key": "your-key-from-authenticate-request",
"packages": [
{
"weight": 15,
"alcohol": true
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
)
FedEx-REST - Label Alcohol to Licensee
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"recipient_type": "LICENSEE",
"packages": [
{
"weight": 15,
"alcohol": true
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'recipient_type' => 'LICENSEE',
'packages' =>
array (
0 =>
array (
'weight' => 15,
'alcohol' => true,
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'to_phone' => '1231231234',
'packaging_type' => 'YOUR_PACKAGING',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx-REST',
'params': {'key': 'your-key-from-authenticate-request',
'packages': [{'alcohol': True, 'weight': 15}],
'packaging_type': 'YOUR_PACKAGING',
'recipient_type': 'LICENSEE',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"FedEx-REST",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"recipient_type"=>"LICENSEE",
"packages"=>[{"weight"=>15, "alcohol"=>true}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"to_phone"=>"1231231234",
"packaging_type"=>"YOUR_PACKAGING",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"recipient_type": "LICENSEE",
"packages": [
{
"weight": 15,
"alcohol": true
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
)
FedEx-REST - Label Alternate Return Address
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"packages": [
{
"weight": 15
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"label": {
"printed_origin": {
"phone": "123-123-1234",
"name": "John Doe",
"addr1": "940 Presidio Ave",
"state": "CA",
"city": "San Francisco",
"code": "94112",
"country": "US"
}
},
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'packages' =>
array (
0 =>
array (
'weight' => 15,
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'to_phone' => '1231231234',
'packaging_type' => 'YOUR_PACKAGING',
'label' =>
array (
'printed_origin' =>
array (
'phone' => '123-123-1234',
'name' => 'John Doe',
'addr1' => '940 Presidio Ave',
'state' => 'CA',
'city' => 'San Francisco',
'code' => '94112',
'country' => 'US',
),
),
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx-REST',
'params': {'key': 'your-key-from-authenticate-request',
'label': {'printed_origin': {'addr1': '940 Presidio Ave',
'city': 'San Francisco',
'code': '94112',
'country': 'US',
'name': 'John Doe',
'phone': '123-123-1234',
'state': 'CA'}},
'packages': [{'weight': 15}],
'packaging_type': 'YOUR_PACKAGING',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"FedEx-REST",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"packages"=>[{"weight"=>15}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"to_phone"=>"1231231234",
"packaging_type"=>"YOUR_PACKAGING",
"label"=>
{"printed_origin"=>
{"phone"=>"123-123-1234",
"name"=>"John Doe",
"addr1"=>"940 Presidio Ave",
"state"=>"CA",
"city"=>"San Francisco",
"code"=>"94112",
"country"=>"US"}},
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"packages": [
{
"weight": 15
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"label": {
"printed_origin": {
"phone": "123-123-1234",
"name": "John Doe",
"addr1": "940 Presidio Ave",
"state": "CA",
"city": "San Francisco",
"code": "94112",
"country": "US"
}
},
"test": true
}
}
)
FedEx-REST - Label Bill Recipient
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"billing": [
{
"type": "transportation",
"payment_type": "recipient",
"account": "abc123",
"postal_code": "94608",
"country_code": "US"
}
],
"packages": [
{
"weight": 4,
"length": 7
}
],
"service": "FEDEX_GROUND",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "GIF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'billing' =>
array (
0 =>
array (
'type' => 'transportation',
'payment_type' => 'recipient',
'account' => 'abc123',
'postal_code' => '94608',
'country_code' => 'US',
),
),
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
),
),
'service' => 'FEDEX_GROUND',
'shipper' => '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_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'GIF',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx-REST',
'params': {'billing': [{'account': 'abc123',
'country_code': 'US',
'payment_type': 'recipient',
'postal_code': '94608',
'type': 'transportation'}],
'image_type': 'GIF',
'key': 'your-key-from-authenticate-request',
'packages': [{'length': 7, 'weight': 4}],
'service': 'FEDEX_GROUND',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'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'}}
)
rs.request(
{"carrier"=>"FedEx-REST",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"billing"=>
[{"type"=>"transportation",
"payment_type"=>"recipient",
"account"=>"abc123",
"postal_code"=>"94608",
"country_code"=>"US"}],
"packages"=>[{"weight"=>4, "length"=>7}],
"service"=>"FEDEX_GROUND",
"shipper"=>"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_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"GIF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"billing": [
{
"type": "transportation",
"payment_type": "recipient",
"account": "abc123",
"postal_code": "94608",
"country_code": "US"
}
],
"packages": [
{
"weight": 4,
"length": 7
}
],
"service": "FEDEX_GROUND",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "GIF",
"test": true
}
}
)
FedEx-REST - Label Dry Ice
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"packages": [
{
"weight": 15,
"dry_ice": {
"weight": 2
}
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'packages' =>
array (
0 =>
array (
'weight' => 15,
'dry_ice' =>
array (
'weight' => 2,
),
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'to_phone' => '1231231234',
'packaging_type' => 'YOUR_PACKAGING',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx-REST',
'params': {'key': 'your-key-from-authenticate-request',
'packages': [{'dry_ice': {'weight': 2}, 'weight': 15}],
'packaging_type': 'YOUR_PACKAGING',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"FedEx-REST",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"packages"=>[{"weight"=>15, "dry_ice"=>{"weight"=>2}}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"to_phone"=>"1231231234",
"packaging_type"=>"YOUR_PACKAGING",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"packages": [
{
"weight": 15,
"dry_ice": {
"weight": 2
}
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
)
FedEx-REST - Label Email Notifications
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"notify": [
{
"email": "customer@email.com",
"type": "ON_SHIPMENT,ON_TENDER,ON_EXCEPTION,ON_DELIVERY"
}
],
"packages": [
{
"weight": 15
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'notify' =>
array (
0 =>
array (
'email' => 'customer@email.com',
'type' => 'ON_SHIPMENT,ON_TENDER,ON_EXCEPTION,ON_DELIVERY',
),
),
'packages' =>
array (
0 =>
array (
'weight' => 15,
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'to_phone' => '1231231234',
'packaging_type' => 'YOUR_PACKAGING',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx-REST',
'params': {'key': 'your-key-from-authenticate-request',
'notify': [{'email': 'customer@email.com',
'type': 'ON_SHIPMENT,ON_TENDER,ON_EXCEPTION,ON_DELIVERY'}],
'packages': [{'weight': 15}],
'packaging_type': 'YOUR_PACKAGING',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"FedEx-REST",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"notify"=>
[{"email"=>"customer@email.com",
"type"=>"ON_SHIPMENT,ON_TENDER,ON_EXCEPTION,ON_DELIVERY"}],
"packages"=>[{"weight"=>15}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"to_phone"=>"1231231234",
"packaging_type"=>"YOUR_PACKAGING",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"notify": [
{
"email": "customer@email.com",
"type": "ON_SHIPMENT,ON_TENDER,ON_EXCEPTION,ON_DELIVERY"
}
],
"packages": [
{
"weight": 15
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
)
FedEx-REST - Label Ground Collect (Not COD)
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"billing": [
{
"type": "transportation",
"payment_type": "collect",
"account": "abc123"
}
],
"packages": [
{
"width": 14,
"length": 11,
"height": 8,
"weight": 5,
"reference_code": "P_O_NUMBER",
"reference_value": "abc123",
"reference_code2": "CUSTOMER_REFERENCE",
"reference_value2": "123456"
}
],
"shipper": "Acme Inc",
"ship_addr1": "123 Main St.",
"ship_city": "Vancouver",
"ship_state": "WA",
"ship_code": "98685",
"ship_phone": "123-123-1234",
"ship_country": "US",
"to_country": "US",
"to_code": "11040",
"to_name": "Big Box Store",
"to_addr1": "123 Fake St.",
"to_state": "NY",
"to_city": "New Hyde Park",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'billing' =>
array (
0 =>
array (
'type' => 'transportation',
'payment_type' => 'collect',
'account' => 'abc123',
),
),
'packages' =>
array (
0 =>
array (
'width' => 14,
'length' => 11,
'height' => 8,
'weight' => 5,
'reference_code' => 'P_O_NUMBER',
'reference_value' => 'abc123',
'reference_code2' => 'CUSTOMER_REFERENCE',
'reference_value2' => '123456',
),
),
'shipper' => 'Acme Inc',
'ship_addr1' => '123 Main St.',
'ship_city' => 'Vancouver',
'ship_state' => 'WA',
'ship_code' => '98685',
'ship_phone' => '123-123-1234',
'ship_country' => 'US',
'to_country' => 'US',
'to_code' => '11040',
'to_name' => 'Big Box Store',
'to_addr1' => '123 Fake St.',
'to_state' => 'NY',
'to_city' => 'New Hyde Park',
'packaging_type' => 'YOUR_PACKAGING',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx-REST',
'params': {'billing': [{'account': 'abc123',
'payment_type': 'collect',
'type': 'transportation'}],
'key': 'your-key-from-authenticate-request',
'packages': [{'height': 8,
'length': 11,
'reference_code': 'P_O_NUMBER',
'reference_code2': 'CUSTOMER_REFERENCE',
'reference_value': 'abc123',
'reference_value2': '123456',
'weight': 5,
'width': 14}],
'packaging_type': 'YOUR_PACKAGING',
'ship_addr1': '123 Main St.',
'ship_city': 'Vancouver',
'ship_code': '98685',
'ship_country': 'US',
'ship_phone': '123-123-1234',
'ship_state': 'WA',
'shipper': 'Acme Inc',
'test': True,
'to_addr1': '123 Fake St.',
'to_city': 'New Hyde Park',
'to_code': '11040',
'to_country': 'US',
'to_name': 'Big Box Store',
'to_state': 'NY'}}
)
rs.request(
{"carrier"=>"FedEx-REST",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"billing"=>
[{"type"=>"transportation",
"payment_type"=>"collect",
"account"=>"abc123"}],
"packages"=>
[{"width"=>14,
"length"=>11,
"height"=>8,
"weight"=>5,
"reference_code"=>"P_O_NUMBER",
"reference_value"=>"abc123",
"reference_code2"=>"CUSTOMER_REFERENCE",
"reference_value2"=>"123456"}],
"shipper"=>"Acme Inc",
"ship_addr1"=>"123 Main St.",
"ship_city"=>"Vancouver",
"ship_state"=>"WA",
"ship_code"=>"98685",
"ship_phone"=>"123-123-1234",
"ship_country"=>"US",
"to_country"=>"US",
"to_code"=>"11040",
"to_name"=>"Big Box Store",
"to_addr1"=>"123 Fake St.",
"to_state"=>"NY",
"to_city"=>"New Hyde Park",
"packaging_type"=>"YOUR_PACKAGING",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"billing": [
{
"type": "transportation",
"payment_type": "collect",
"account": "abc123"
}
],
"packages": [
{
"width": 14,
"length": 11,
"height": 8,
"weight": 5,
"reference_code": "P_O_NUMBER",
"reference_value": "abc123",
"reference_code2": "CUSTOMER_REFERENCE",
"reference_value2": "123456"
}
],
"shipper": "Acme Inc",
"ship_addr1": "123 Main St.",
"ship_city": "Vancouver",
"ship_state": "WA",
"ship_code": "98685",
"ship_phone": "123-123-1234",
"ship_country": "US",
"to_country": "US",
"to_code": "11040",
"to_name": "Big Box Store",
"to_addr1": "123 Fake St.",
"to_state": "NY",
"to_city": "New Hyde Park",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
)
FedEx-REST - Label Hidden Account Number
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"label": {
"masked_data": [
"SHIPPER_ACCOUNT_NUMBER"
]
},
"packages": [
{
"weight": 15
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'label' =>
array (
'masked_data' =>
array (
0 => 'SHIPPER_ACCOUNT_NUMBER',
),
),
'packages' =>
array (
0 =>
array (
'weight' => 15,
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'to_phone' => '1231231234',
'packaging_type' => 'YOUR_PACKAGING',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx-REST',
'params': {'key': 'your-key-from-authenticate-request',
'label': {'masked_data': ['SHIPPER_ACCOUNT_NUMBER']},
'packages': [{'weight': 15}],
'packaging_type': 'YOUR_PACKAGING',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"FedEx-REST",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"label"=>{"masked_data"=>["SHIPPER_ACCOUNT_NUMBER"]},
"packages"=>[{"weight"=>15}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"to_phone"=>"1231231234",
"packaging_type"=>"YOUR_PACKAGING",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"label": {
"masked_data": [
"SHIPPER_ACCOUNT_NUMBER"
]
},
"packages": [
{
"weight": 15
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
)
FedEx-REST - Label Hold at Location
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"packages": [
{
"weight": 15
}
],
"hold_at_location": true,
"hold_phone": "1231231234",
"hold_addr1": "8549 Wilshire Blvd",
"hold_city": "Beverly Hills",
"hold_state": "CA",
"hold_code": "90211",
"hold_country": "US",
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'packages' =>
array (
0 =>
array (
'weight' => 15,
),
),
'hold_at_location' => true,
'hold_phone' => '1231231234',
'hold_addr1' => '8549 Wilshire Blvd',
'hold_city' => 'Beverly Hills',
'hold_state' => 'CA',
'hold_code' => '90211',
'hold_country' => 'US',
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'to_phone' => '1231231234',
'packaging_type' => 'YOUR_PACKAGING',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx-REST',
'params': {'hold_addr1': '8549 Wilshire Blvd',
'hold_at_location': True,
'hold_city': 'Beverly Hills',
'hold_code': '90211',
'hold_country': 'US',
'hold_phone': '1231231234',
'hold_state': 'CA',
'key': 'your-key-from-authenticate-request',
'packages': [{'weight': 15}],
'packaging_type': 'YOUR_PACKAGING',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"FedEx-REST",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"packages"=>[{"weight"=>15}],
"hold_at_location"=>true,
"hold_phone"=>"1231231234",
"hold_addr1"=>"8549 Wilshire Blvd",
"hold_city"=>"Beverly Hills",
"hold_state"=>"CA",
"hold_code"=>"90211",
"hold_country"=>"US",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"to_phone"=>"1231231234",
"packaging_type"=>"YOUR_PACKAGING",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"packages": [
{
"weight": 15
}
],
"hold_at_location": true,
"hold_phone": "1231231234",
"hold_addr1": "8549 Wilshire Blvd",
"hold_city": "Beverly Hills",
"hold_state": "CA",
"hold_code": "90211",
"hold_country": "US",
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
)
FedEx-REST - Label Home Delivery No Signature
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"packages": [
{
"weight": 15,
"signature_type": "NO_SIGNATURE_REQUIRED"
}
],
"service": "GROUND_HOME_DELIVERY",
"residential": true,
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'packages' =>
array (
0 =>
array (
'weight' => 15,
'signature_type' => 'NO_SIGNATURE_REQUIRED',
),
),
'service' => 'GROUND_HOME_DELIVERY',
'residential' => true,
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'to_phone' => '1231231234',
'packaging_type' => 'YOUR_PACKAGING',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx',
'params': {'key': 'your-key-from-authenticate-request',
'packages': [{'signature_type': 'NO_SIGNATURE_REQUIRED',
'weight': 15}],
'packaging_type': 'YOUR_PACKAGING',
'residential': True,
'service': 'GROUND_HOME_DELIVERY',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"packages"=>[{"weight"=>15, "signature_type"=>"NO_SIGNATURE_REQUIRED"}],
"service"=>"GROUND_HOME_DELIVERY",
"residential"=>true,
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"to_phone"=>"1231231234",
"packaging_type"=>"YOUR_PACKAGING",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"packages": [
{
"weight": 15,
"signature_type": "NO_SIGNATURE_REQUIRED"
}
],
"service": "GROUND_HOME_DELIVERY",
"residential": true,
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
)
FedEx-REST - Label International
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"test": true,
"customs_value": 10,
"currency": "USD",
"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"
}
],
"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": "2300 Southern Blvd",
"ship_city": "Bronx",
"ship_state": "NY",
"ship_code": "10460",
"ship_country": "US",
"ship_phone": "1231231234",
"to_attention_name": "John Doe",
"to_name": "John Doe",
"to_addr1": "2000 Southern Blvd",
"to_state": "ON",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_country": "CA",
"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-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'test' => true,
'customs_value' => 10,
'currency' => 'USD',
'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',
),
),
'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' => '2300 Southern Blvd',
'ship_city' => 'Bronx',
'ship_state' => 'NY',
'ship_code' => '10460',
'ship_country' => 'US',
'ship_phone' => '1231231234',
'to_attention_name' => 'John Doe',
'to_name' => 'John Doe',
'to_addr1' => '2000 Southern Blvd',
'to_state' => 'ON',
'to_city' => 'Toronto',
'to_code' => 'M1B5K7',
'to_country' => 'CA',
'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-REST',
'params': {'currency': 'USD',
'customs': [{'country_of_manufacture': 'US',
'customs_description': 'My Description',
'customs_line_amount': 50.0,
'customs_quantity': 1,
'customs_quantity_units': 'EA',
'customs_weight': 2.5}],
'customs_value': 10,
'image_type': 'PNG',
'key': 'your-key-from-authenticate-request',
'length_unit': 'IN',
'packages': [{'height': 1, 'length': 1, 'weight': 5, 'width': 1}],
'packaging_type': 'YOUR_PACKAGING',
'pickup_type': '02',
'service': 'INTERNATIONAL_PRIORITY',
'ship_addr1': '2300 Southern Blvd',
'ship_city': 'Bronx',
'ship_code': '10460',
'ship_contact': 'John Doe',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'NY',
'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': '2000 Southern Blvd',
'to_attention_name': 'John Doe',
'to_city': 'Toronto',
'to_code': 'M1B5K7',
'to_country': 'CA',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'ON',
'weight_unit': 'LB'}}
)
rs.request(
{"carrier"=>"FedEx-REST",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"test"=>true,
"customs_value"=>10,
"currency"=>"USD",
"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"}],
"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"=>"2300 Southern Blvd",
"ship_city"=>"Bronx",
"ship_state"=>"NY",
"ship_code"=>"10460",
"ship_country"=>"US",
"ship_phone"=>"1231231234",
"to_attention_name"=>"John Doe",
"to_name"=>"John Doe",
"to_addr1"=>"2000 Southern Blvd",
"to_state"=>"ON",
"to_city"=>"Toronto",
"to_code"=>"M1B5K7",
"to_country"=>"CA",
"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-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"test": true,
"customs_value": 10,
"currency": "USD",
"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"
}
],
"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": "2300 Southern Blvd",
"ship_city": "Bronx",
"ship_state": "NY",
"ship_code": "10460",
"ship_country": "US",
"ship_phone": "1231231234",
"to_attention_name": "John Doe",
"to_name": "John Doe",
"to_addr1": "2000 Southern Blvd",
"to_state": "ON",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_country": "CA",
"to_phone": "1231231234",
"image_type": "PNG",
"shipment_description": "xxx",
"packaging_type": "YOUR_PACKAGING",
"pickup_type": "02",
"weight_unit": "LB",
"length_unit": "IN"
}
}
)
FedEx-REST - Label International Documents Only
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"test": true,
"currency": "CAD",
"packages": [
{
"weight": 1
}
],
"customs": [
{
"customs_quantity_units": "EA",
"customs_quantity": 1,
"customs_line_amount": 0.00,
"country_of_manufacture": "US",
"customs_weight": 1,
"customs_description": "Legal Documents"
}
],
"customs_value": 0.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": "FEDEX_ENVELOPE",
"pickup_type": "02",
"weight_unit": "LB",
"length_unit": "IN"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'test' => true,
'currency' => 'CAD',
'packages' =>
array (
0 =>
array (
'weight' => 1,
),
),
'customs' =>
array (
0 =>
array (
'customs_quantity_units' => 'EA',
'customs_quantity' => 1,
'customs_line_amount' => 0.0,
'country_of_manufacture' => 'US',
'customs_weight' => 1,
'customs_description' => 'Legal Documents',
),
),
'customs_value' => 0.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' => 'FEDEX_ENVELOPE',
'pickup_type' => '02',
'weight_unit' => 'LB',
'length_unit' => 'IN',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx-REST',
'params': {'currency': 'CAD',
'customs': [{'country_of_manufacture': 'US',
'customs_description': 'Legal Documents',
'customs_line_amount': 0.0,
'customs_quantity': 1,
'customs_quantity_units': 'EA',
'customs_weight': 1}],
'customs_value': 0.0,
'image_type': 'PNG',
'key': 'your-key-from-authenticate-request',
'length_unit': 'IN',
'packages': [{'weight': 1}],
'packaging_type': 'FEDEX_ENVELOPE',
'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-REST",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"test"=>true,
"currency"=>"CAD",
"packages"=>[{"weight"=>1}],
"customs"=>
[{"customs_quantity_units"=>"EA",
"customs_quantity"=>1,
"customs_line_amount"=>0.0,
"country_of_manufacture"=>"US",
"customs_weight"=>1,
"customs_description"=>"Legal Documents"}],
"customs_value"=>0.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"=>"FEDEX_ENVELOPE",
"pickup_type"=>"02",
"weight_unit"=>"LB",
"length_unit"=>"IN"}}
)
rocketshipit.request(
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"test": true,
"currency": "CAD",
"packages": [
{
"weight": 1
}
],
"customs": [
{
"customs_quantity_units": "EA",
"customs_quantity": 1,
"customs_line_amount": 0.00,
"country_of_manufacture": "US",
"customs_weight": 1,
"customs_description": "Legal Documents"
}
],
"customs_value": 0.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": "FEDEX_ENVELOPE",
"pickup_type": "02",
"weight_unit": "LB",
"length_unit": "IN"
}
}
)
FedEx-REST - Label International NO EEI Exemption
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"b13a_filing_option": "NOT_REQUIRED",
"export_compliance_statement": "NO EEI 30.37(f)",
"packages": [
{
"weight": 12,
"length": 0,
"width": 0,
"height": 0,
"reference_code": "INVOICE_NUMBER",
"reference_value": "79631"
}
],
"shipper": "Acme, Inc.",
"ship_addr1": "273 Cahaba Valley Pkwy",
"ship_city": "Pelham",
"ship_state": "AL",
"ship_code": "35124",
"ship_country": "US",
"ship_phone": "(123) 123.6183",
"to_name": "John Doe",
"to_company": "Bogota DC",
"to_addr1": "Calle 151",
"to_attention_name": "John Doe",
"to_phone": "1113444356",
"to_country": "CO",
"to_city": "Bogota",
"to_state": null,
"to_code": "110131",
"weight_unit": "LB",
"length_unit": "IN",
"packaging_type": "YOUR_PACKAGING",
"fedex_one_rate": false,
"service": "INTERNATIONAL_PRIORITY",
"negotiated_rates": true,
"currency": "USD",
"sold_company": "Acme, Inc.",
"sold_name": "John Doe",
"sold_tax_id": "",
"sold_phone": "1113444356",
"sold_addr1": "Calle 151",
"sold_city": "Bogota",
"sold_state": null,
"sold_code": "110131",
"sold_country": "CO",
"customs_value": 262.89,
"customs": [
{
"customs_quantity_units": "EA",
"customs_quantity": 500,
"customs_line_amount": 55,
"country_of_manufacture": "US",
"customs_weight": 10,
"customs_description": "Cards"
}
],
"ship_contact": "Sales Person2",
"shipment_description": "PRINTED MATERIALS",
"generate_docs": [
"COMMERCIAL_INVOICE"
]
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'test' => true,
'key' => 'your-key-from-authenticate-request',
'b13a_filing_option' => 'NOT_REQUIRED',
'export_compliance_statement' => 'NO EEI 30.37(f)',
'packages' =>
array (
0 =>
array (
'weight' => 12,
'length' => 0,
'width' => 0,
'height' => 0,
'reference_code' => 'INVOICE_NUMBER',
'reference_value' => '79631',
),
),
'shipper' => 'Acme, Inc.',
'ship_addr1' => '273 Cahaba Valley Pkwy',
'ship_city' => 'Pelham',
'ship_state' => 'AL',
'ship_code' => '35124',
'ship_country' => 'US',
'ship_phone' => '(123) 123.6183',
'to_name' => 'John Doe',
'to_company' => 'Bogota DC',
'to_addr1' => 'Calle 151',
'to_attention_name' => 'John Doe',
'to_phone' => '1113444356',
'to_country' => 'CO',
'to_city' => 'Bogota',
'to_state' => NULL,
'to_code' => '110131',
'weight_unit' => 'LB',
'length_unit' => 'IN',
'packaging_type' => 'YOUR_PACKAGING',
'fedex_one_rate' => false,
'service' => 'INTERNATIONAL_PRIORITY',
'negotiated_rates' => true,
'currency' => 'USD',
'sold_company' => 'Acme, Inc.',
'sold_name' => 'John Doe',
'sold_tax_id' => '',
'sold_phone' => '1113444356',
'sold_addr1' => 'Calle 151',
'sold_city' => 'Bogota',
'sold_state' => NULL,
'sold_code' => '110131',
'sold_country' => 'CO',
'customs_value' => 262.89,
'customs' =>
array (
0 =>
array (
'customs_quantity_units' => 'EA',
'customs_quantity' => 500,
'customs_line_amount' => 55,
'country_of_manufacture' => 'US',
'customs_weight' => 10,
'customs_description' => 'Cards',
),
),
'ship_contact' => 'Sales Person2',
'shipment_description' => 'PRINTED MATERIALS',
'generate_docs' =>
array (
0 => 'COMMERCIAL_INVOICE',
),
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx-REST',
'params': {'b13a_filing_option': 'NOT_REQUIRED',
'currency': 'USD',
'customs': [{'country_of_manufacture': 'US',
'customs_description': 'Cards',
'customs_line_amount': 55,
'customs_quantity': 500,
'customs_quantity_units': 'EA',
'customs_weight': 10}],
'customs_value': 262.89,
'export_compliance_statement': 'NO EEI 30.37(f)',
'fedex_one_rate': False,
'generate_docs': ['COMMERCIAL_INVOICE'],
'key': 'your-key-from-authenticate-request',
'length_unit': 'IN',
'negotiated_rates': True,
'packages': [{'height': 0,
'length': 0,
'reference_code': 'INVOICE_NUMBER',
'reference_value': '79631',
'weight': 12,
'width': 0}],
'packaging_type': 'YOUR_PACKAGING',
'service': 'INTERNATIONAL_PRIORITY',
'ship_addr1': '273 Cahaba Valley Pkwy',
'ship_city': 'Pelham',
'ship_code': '35124',
'ship_contact': 'Sales Person2',
'ship_country': 'US',
'ship_phone': '(123) 123.6183',
'ship_state': 'AL',
'shipment_description': 'PRINTED MATERIALS',
'shipper': 'Acme, Inc.',
'sold_addr1': 'Calle 151',
'sold_city': 'Bogota',
'sold_code': '110131',
'sold_company': 'Acme, Inc.',
'sold_country': 'CO',
'sold_name': 'John Doe',
'sold_phone': '1113444356',
'sold_state': None,
'sold_tax_id': '',
'test': True,
'to_addr1': 'Calle 151',
'to_attention_name': 'John Doe',
'to_city': 'Bogota',
'to_code': '110131',
'to_company': 'Bogota DC',
'to_country': 'CO',
'to_name': 'John Doe',
'to_phone': '1113444356',
'to_state': None,
'weight_unit': 'LB'}}
)
rs.request(
{"carrier"=>"FedEx-REST",
"action"=>"SubmitShipment",
"params"=>
{"test"=>true,
"key"=>"your-key-from-authenticate-request",
"b13a_filing_option"=>"NOT_REQUIRED",
"export_compliance_statement"=>"NO EEI 30.37(f)",
"packages"=>
[{"weight"=>12,
"length"=>0,
"width"=>0,
"height"=>0,
"reference_code"=>"INVOICE_NUMBER",
"reference_value"=>"79631"}],
"shipper"=>"Acme, Inc.",
"ship_addr1"=>"273 Cahaba Valley Pkwy",
"ship_city"=>"Pelham",
"ship_state"=>"AL",
"ship_code"=>"35124",
"ship_country"=>"US",
"ship_phone"=>"(123) 123.6183",
"to_name"=>"John Doe",
"to_company"=>"Bogota DC",
"to_addr1"=>"Calle 151",
"to_attention_name"=>"John Doe",
"to_phone"=>"1113444356",
"to_country"=>"CO",
"to_city"=>"Bogota",
"to_state"=>nil,
"to_code"=>"110131",
"weight_unit"=>"LB",
"length_unit"=>"IN",
"packaging_type"=>"YOUR_PACKAGING",
"fedex_one_rate"=>false,
"service"=>"INTERNATIONAL_PRIORITY",
"negotiated_rates"=>true,
"currency"=>"USD",
"sold_company"=>"Acme, Inc.",
"sold_name"=>"John Doe",
"sold_tax_id"=>"",
"sold_phone"=>"1113444356",
"sold_addr1"=>"Calle 151",
"sold_city"=>"Bogota",
"sold_state"=>nil,
"sold_code"=>"110131",
"sold_country"=>"CO",
"customs_value"=>262.89,
"customs"=>
[{"customs_quantity_units"=>"EA",
"customs_quantity"=>500,
"customs_line_amount"=>55,
"country_of_manufacture"=>"US",
"customs_weight"=>10,
"customs_description"=>"Cards"}],
"ship_contact"=>"Sales Person2",
"shipment_description"=>"PRINTED MATERIALS",
"generate_docs"=>["COMMERCIAL_INVOICE"]}}
)
rocketshipit.request(
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"b13a_filing_option": "NOT_REQUIRED",
"export_compliance_statement": "NO EEI 30.37(f)",
"packages": [
{
"weight": 12,
"length": 0,
"width": 0,
"height": 0,
"reference_code": "INVOICE_NUMBER",
"reference_value": "79631"
}
],
"shipper": "Acme, Inc.",
"ship_addr1": "273 Cahaba Valley Pkwy",
"ship_city": "Pelham",
"ship_state": "AL",
"ship_code": "35124",
"ship_country": "US",
"ship_phone": "(123) 123.6183",
"to_name": "John Doe",
"to_company": "Bogota DC",
"to_addr1": "Calle 151",
"to_attention_name": "John Doe",
"to_phone": "1113444356",
"to_country": "CO",
"to_city": "Bogota",
"to_state": null,
"to_code": "110131",
"weight_unit": "LB",
"length_unit": "IN",
"packaging_type": "YOUR_PACKAGING",
"fedex_one_rate": false,
"service": "INTERNATIONAL_PRIORITY",
"negotiated_rates": true,
"currency": "USD",
"sold_company": "Acme, Inc.",
"sold_name": "John Doe",
"sold_tax_id": "",
"sold_phone": "1113444356",
"sold_addr1": "Calle 151",
"sold_city": "Bogota",
"sold_state": null,
"sold_code": "110131",
"sold_country": "CO",
"customs_value": 262.89,
"customs": [
{
"customs_quantity_units": "EA",
"customs_quantity": 500,
"customs_line_amount": 55,
"country_of_manufacture": "US",
"customs_weight": 10,
"customs_description": "Cards"
}
],
"ship_contact": "Sales Person2",
"shipment_description": "PRINTED MATERIALS",
"generate_docs": [
"COMMERCIAL_INVOICE"
]
}
}
)
FedEx-REST - Label International Paperless Customs (ETD)
{
"carrier": "FedEx",
"action": "SubmitShipment",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"paperless_customs": true,
"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,
"customs_misc_charge_type": "OTHER",
"customs_misc_charge": 10.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,
'key' => 'your-key-from-authenticate-request',
'paperless_customs' => true,
'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,
'customs_misc_charge_type' => 'OTHER',
'customs_misc_charge' => 10.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',
'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_misc_charge': 10.0,
'customs_misc_charge_type': 'OTHER',
'customs_value': 100.0,
'generate_docs': ['COMMERCIAL_INVOICE',
'NAFTA_CERTIFICATE_OF_ORIGIN'],
'image_type': 'PNG',
'key': 'your-key-from-authenticate-request',
'length_unit': 'IN',
'packages': [{'height': 1, 'length': 1, 'weight': 5, 'width': 1}],
'packaging_type': 'YOUR_PACKAGING',
'paperless_customs': True,
'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,
"key"=>"your-key-from-authenticate-request",
"paperless_customs"=>true,
"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,
"customs_misc_charge_type"=>"OTHER",
"customs_misc_charge"=>10.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,
"key": "your-key-from-authenticate-request",
"paperless_customs": true,
"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,
"customs_misc_charge_type": "OTHER",
"customs_misc_charge": 10.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"
}
}
)
FedEx-REST - Label International Sender Pays Duties
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"billing": [
{
"type": "duties",
"payment_type": "SENDER"
}
],
"packages": [
{
"weight": 15
}
],
"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"
}
],
"currency": "USD",
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "2000 Meadowvale Rd",
"to_city": "Toronto",
"to_state": "ON",
"to_code": "M1B5K7",
"to_country": "CA",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'billing' =>
array (
0 =>
array (
'type' => 'duties',
'payment_type' => 'SENDER',
),
),
'packages' =>
array (
0 =>
array (
'weight' => 15,
),
),
'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',
),
),
'currency' => 'USD',
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '2000 Meadowvale Rd',
'to_city' => 'Toronto',
'to_state' => 'ON',
'to_code' => 'M1B5K7',
'to_country' => 'CA',
'to_phone' => '1231231234',
'packaging_type' => 'YOUR_PACKAGING',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx-REST',
'params': {'billing': [{'payment_type': 'SENDER', 'type': 'duties'}],
'currency': 'USD',
'customs': [{'country_of_manufacture': 'US',
'customs_description': 'My Description',
'customs_line_amount': 50.0,
'customs_quantity': 1,
'customs_quantity_units': 'EA',
'customs_weight': 2.5}],
'key': 'your-key-from-authenticate-request',
'packages': [{'weight': 15}],
'packaging_type': 'YOUR_PACKAGING',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '2000 Meadowvale Rd',
'to_city': 'Toronto',
'to_code': 'M1B5K7',
'to_country': 'CA',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'ON'}}
)
rs.request(
{"carrier"=>"FedEx-REST",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"billing"=>[{"type"=>"duties", "payment_type"=>"SENDER"}],
"packages"=>[{"weight"=>15}],
"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"}],
"currency"=>"USD",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"2000 Meadowvale Rd",
"to_city"=>"Toronto",
"to_state"=>"ON",
"to_code"=>"M1B5K7",
"to_country"=>"CA",
"to_phone"=>"1231231234",
"packaging_type"=>"YOUR_PACKAGING",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"billing": [
{
"type": "duties",
"payment_type": "SENDER"
}
],
"packages": [
{
"weight": 15
}
],
"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"
}
],
"currency": "USD",
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "2000 Meadowvale Rd",
"to_city": "Toronto",
"to_state": "ON",
"to_code": "M1B5K7",
"to_country": "CA",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
)
FedEx-REST - Label International w/ CI and NAFTA
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"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,
"customs_misc_charge_type": "OTHER",
"customs_misc_charge": 10.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-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'test' => true,
'key' => 'your-key-from-authenticate-request',
'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,
'customs_misc_charge_type' => 'OTHER',
'customs_misc_charge' => 10.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-REST',
'params': {'currency': 'CAD',
'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_misc_charge': 10.0,
'customs_misc_charge_type': 'OTHER',
'customs_value': 100.0,
'generate_docs': ['COMMERCIAL_INVOICE',
'NAFTA_CERTIFICATE_OF_ORIGIN'],
'image_type': 'PNG',
'key': 'your-key-from-authenticate-request',
'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-REST",
"action"=>"SubmitShipment",
"params"=>
{"test"=>true,
"key"=>"your-key-from-authenticate-request",
"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,
"customs_misc_charge_type"=>"OTHER",
"customs_misc_charge"=>10.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-REST",
"action": "SubmitShipment",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"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,
"customs_misc_charge_type": "OTHER",
"customs_misc_charge": 10.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"
}
}
)
FedEx-REST - Label International w/ CI and NAFTA Custom Images
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"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-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'test' => true,
'key' => 'your-key-from-authenticate-request',
'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-REST',
'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',
'key': 'your-key-from-authenticate-request',
'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-REST",
"action"=>"SubmitShipment",
"params"=>
{"test"=>true,
"key"=>"your-key-from-authenticate-request",
"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-REST",
"action": "SubmitShipment",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"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"
}
}
)
FedEx-REST - Label Lithium Battery
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"account_number": "your-account-number",
"key": "your-key-from-authenticate-request",
"service": "FEDEX_2_DAY",
"packages": [
{
"weight": 15,
"battery": {
"type": "LITHIUM_ION",
"packing_type": "PACKED_WITH_EQUIPMENT"
}
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'account_number' => 'your-account-number',
'key' => 'your-key-from-authenticate-request',
'service' => 'FEDEX_2_DAY',
'packages' =>
array (
0 =>
array (
'weight' => 15,
'battery' =>
array (
'type' => 'LITHIUM_ION',
'packing_type' => 'PACKED_WITH_EQUIPMENT',
),
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'to_phone' => '1231231234',
'packaging_type' => 'YOUR_PACKAGING',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx-REST',
'params': {'account_number': 'your-account-number',
'key': 'your-key-from-authenticate-request',
'packages': [{'battery': {'packing_type': 'PACKED_WITH_EQUIPMENT',
'type': 'LITHIUM_ION'},
'weight': 15}],
'packaging_type': 'YOUR_PACKAGING',
'service': 'FEDEX_2_DAY',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"FedEx-REST",
"action"=>"SubmitShipment",
"params"=>
{"account_number"=>"your-account-number",
"key"=>"your-key-from-authenticate-request",
"service"=>"FEDEX_2_DAY",
"packages"=>
[{"weight"=>15,
"battery"=>
{"type"=>"LITHIUM_ION", "packing_type"=>"PACKED_WITH_EQUIPMENT"}}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"to_phone"=>"1231231234",
"packaging_type"=>"YOUR_PACKAGING",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"account_number": "your-account-number",
"key": "your-key-from-authenticate-request",
"service": "FEDEX_2_DAY",
"packages": [
{
"weight": 15,
"battery": {
"type": "LITHIUM_ION",
"packing_type": "PACKED_WITH_EQUIPMENT"
}
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
)
FedEx-REST - Label Multi-package
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT_NUMBER",
"packages": [
{
"weight": 5
},
{
"weight": 10
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'packages' =>
array (
0 =>
array (
'weight' => 5,
),
1 =>
array (
'weight' => 10,
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'to_phone' => '1231231234',
'packaging_type' => 'YOUR_PACKAGING',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx-REST',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'key': 'your-key-from-authenticate-request',
'packages': [{'weight': 5}, {'weight': 10}],
'packaging_type': 'YOUR_PACKAGING',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"FedEx-REST",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"packages"=>[{"weight"=>5}, {"weight"=>10}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"to_phone"=>"1231231234",
"packaging_type"=>"YOUR_PACKAGING",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT_NUMBER",
"packages": [
{
"weight": 5
},
{
"weight": 10
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
)
FedEx-REST - Label Multi-package International
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"currency": "CAD",
"packages": [
{
"weight": 5,
"length": 1,
"width": 1,
"height": 1
},
{
"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"
}
],
"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-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'test' => true,
'key' => 'your-key-from-authenticate-request',
'currency' => 'CAD',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 1,
'width' => 1,
'height' => 1,
),
1 =>
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',
),
),
'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-REST',
'params': {'currency': 'CAD',
'customs': [{'country_of_manufacture': 'US',
'customs_description': 'My Description',
'customs_line_amount': 50.0,
'customs_quantity': 1,
'customs_quantity_units': 'EA',
'customs_weight': 2.5}],
'image_type': 'PNG',
'key': 'your-key-from-authenticate-request',
'length_unit': 'IN',
'packages': [{'height': 1, 'length': 1, 'weight': 5, 'width': 1},
{'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-REST",
"action"=>"SubmitShipment",
"params"=>
{"test"=>true,
"key"=>"your-key-from-authenticate-request",
"currency"=>"CAD",
"packages"=>
[{"weight"=>5, "length"=>1, "width"=>1, "height"=>1},
{"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"}],
"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-REST",
"action": "SubmitShipment",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"currency": "CAD",
"packages": [
{
"weight": 5,
"length": 1,
"width": 1,
"height": 1
},
{
"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"
}
],
"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"
}
}
)
FedEx-REST - Label OneRate
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"dropoff_type": "REGULAR_PICKUP",
"service": "FEDEX_EXPRESS_SAVER",
"packaging_type": "FEDEX_SMALL_BOX",
"fedex_one_rate": true,
"packages": [
{
"weight": 15
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'dropoff_type' => 'REGULAR_PICKUP',
'service' => 'FEDEX_EXPRESS_SAVER',
'packaging_type' => 'FEDEX_SMALL_BOX',
'fedex_one_rate' => true,
'packages' =>
array (
0 =>
array (
'weight' => 15,
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'to_phone' => '1231231234',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx-REST',
'params': {'dropoff_type': 'REGULAR_PICKUP',
'fedex_one_rate': True,
'packages': [{'weight': 15}],
'packaging_type': 'FEDEX_SMALL_BOX',
'service': 'FEDEX_EXPRESS_SAVER',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"FedEx-REST",
"action"=>"SubmitShipment",
"params"=>
{"dropoff_type"=>"REGULAR_PICKUP",
"service"=>"FEDEX_EXPRESS_SAVER",
"packaging_type"=>"FEDEX_SMALL_BOX",
"fedex_one_rate"=>true,
"packages"=>[{"weight"=>15}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"to_phone"=>"1231231234",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"dropoff_type": "REGULAR_PICKUP",
"service": "FEDEX_EXPRESS_SAVER",
"packaging_type": "FEDEX_SMALL_BOX",
"fedex_one_rate": true,
"packages": [
{
"weight": 15
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"test": true
}
}
)
FedEx-REST - Label Reference Values
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"packages": [
{
"weight": 15,
"reference_code": "INVOICE_NUMBER",
"reference_value": "#123",
"reference_code2": "P_O_NUMBER",
"reference_value2": "B2C"
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'packages' =>
array (
0 =>
array (
'weight' => 15,
'reference_code' => 'INVOICE_NUMBER',
'reference_value' => '#123',
'reference_code2' => 'P_O_NUMBER',
'reference_value2' => 'B2C',
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'to_phone' => '1231231234',
'packaging_type' => 'YOUR_PACKAGING',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx-REST',
'params': {'key': 'your-key-from-authenticate-request',
'packages': [{'reference_code': 'INVOICE_NUMBER',
'reference_code2': 'P_O_NUMBER',
'reference_value': '#123',
'reference_value2': 'B2C',
'weight': 15}],
'packaging_type': 'YOUR_PACKAGING',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"FedEx-REST",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"packages"=>
[{"weight"=>15,
"reference_code"=>"INVOICE_NUMBER",
"reference_value"=>"#123",
"reference_code2"=>"P_O_NUMBER",
"reference_value2"=>"B2C"}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"to_phone"=>"1231231234",
"packaging_type"=>"YOUR_PACKAGING",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"packages": [
{
"weight": 15,
"reference_code": "INVOICE_NUMBER",
"reference_value": "#123",
"reference_code2": "P_O_NUMBER",
"reference_value2": "B2C"
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
)
FedEx-REST - Label Residential
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"residential": true,
"packages": [
{
"weight": 15
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'YOUR_KEY',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'password' => 'YOUR_PASSWORD',
'residential' => true,
'packages' =>
array (
0 =>
array (
'weight' => 15,
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'to_phone' => '1231231234',
'packaging_type' => 'YOUR_PACKAGING',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx-REST',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'packages': [{'weight': 15}],
'packaging_type': 'YOUR_PACKAGING',
'password': 'YOUR_PASSWORD',
'residential': True,
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"FedEx-REST",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"YOUR_KEY",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"password"=>"YOUR_PASSWORD",
"residential"=>true,
"packages"=>[{"weight"=>15}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"to_phone"=>"1231231234",
"packaging_type"=>"YOUR_PACKAGING",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"residential": true,
"packages": [
{
"weight": 15
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
)
FedEx-REST - Label Return Email label
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"notify": [
{
"type": "RETURN",
"email": "bob@email.com"
}
],
"packages": [
{
"weight": 2
}
],
"packaging_type": "YOUR_PACKAGING",
"return_code": "PRINT_RETURN_LABEL",
"shipper": "RocketShipIt",
"ship_addr1": "940 Presidio Ave",
"ship_addr2": "#103",
"ship_city": "San Francisco",
"ship_state": "CA",
"ship_code": "94115",
"ship_phone": "1231231234",
"to_name": "John Doe Schmoe",
"to_addr1": "124 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'notify' =>
array (
0 =>
array (
'type' => 'RETURN',
'email' => 'bob@email.com',
),
),
'packages' =>
array (
0 =>
array (
'weight' => 2,
),
),
'packaging_type' => 'YOUR_PACKAGING',
'return_code' => 'PRINT_RETURN_LABEL',
'shipper' => 'RocketShipIt',
'ship_addr1' => '940 Presidio Ave',
'ship_addr2' => '#103',
'ship_city' => 'San Francisco',
'ship_state' => 'CA',
'ship_code' => '94115',
'ship_phone' => '1231231234',
'to_name' => 'John Doe Schmoe',
'to_addr1' => '124 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx-REST',
'params': {'key': 'your-key-from-authenticate-request',
'notify': [{'email': 'bob@email.com', 'type': 'RETURN'}],
'packages': [{'weight': 2}],
'packaging_type': 'YOUR_PACKAGING',
'return_code': 'PRINT_RETURN_LABEL',
'ship_addr1': '940 Presidio Ave',
'ship_addr2': '#103',
'ship_city': 'San Francisco',
'ship_code': '94115',
'ship_phone': '1231231234',
'ship_state': 'CA',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '124 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe Schmoe',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"FedEx-REST",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"notify"=>[{"type"=>"RETURN", "email"=>"bob@email.com"}],
"packages"=>[{"weight"=>2}],
"packaging_type"=>"YOUR_PACKAGING",
"return_code"=>"PRINT_RETURN_LABEL",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"940 Presidio Ave",
"ship_addr2"=>"#103",
"ship_city"=>"San Francisco",
"ship_state"=>"CA",
"ship_code"=>"94115",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe Schmoe",
"to_addr1"=>"124 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"notify": [
{
"type": "RETURN",
"email": "bob@email.com"
}
],
"packages": [
{
"weight": 2
}
],
"packaging_type": "YOUR_PACKAGING",
"return_code": "PRINT_RETURN_LABEL",
"shipper": "RocketShipIt",
"ship_addr1": "940 Presidio Ave",
"ship_addr2": "#103",
"ship_city": "San Francisco",
"ship_state": "CA",
"ship_code": "94115",
"ship_phone": "1231231234",
"to_name": "John Doe Schmoe",
"to_addr1": "124 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"test": true
}
}
)
FedEx-REST - Label Return label
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"packages": [
{
"weight": 2
}
],
"packaging_type": "YOUR_PACKAGING",
"return_code": "PRINT_RETURN_LABEL",
"shipper": "RocketShipIt",
"ship_addr1": "940 Presidio Ave",
"ship_addr2": "#103",
"ship_city": "San Francisco",
"ship_state": "CA",
"ship_code": "94115",
"ship_phone": "1231231234",
"to_name": "John Doe Schmoe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'packages' =>
array (
0 =>
array (
'weight' => 2,
),
),
'packaging_type' => 'YOUR_PACKAGING',
'return_code' => 'PRINT_RETURN_LABEL',
'shipper' => 'RocketShipIt',
'ship_addr1' => '940 Presidio Ave',
'ship_addr2' => '#103',
'ship_city' => 'San Francisco',
'ship_state' => 'CA',
'ship_code' => '94115',
'ship_phone' => '1231231234',
'to_name' => 'John Doe Schmoe',
'to_addr1' => '123 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx-REST',
'params': {'key': 'your-key-from-authenticate-request',
'packages': [{'weight': 2}],
'packaging_type': 'YOUR_PACKAGING',
'return_code': 'PRINT_RETURN_LABEL',
'ship_addr1': '940 Presidio Ave',
'ship_addr2': '#103',
'ship_city': 'San Francisco',
'ship_code': '94115',
'ship_phone': '1231231234',
'ship_state': 'CA',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe Schmoe',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"FedEx-REST",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"packages"=>[{"weight"=>2}],
"packaging_type"=>"YOUR_PACKAGING",
"return_code"=>"PRINT_RETURN_LABEL",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"940 Presidio Ave",
"ship_addr2"=>"#103",
"ship_city"=>"San Francisco",
"ship_state"=>"CA",
"ship_code"=>"94115",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe Schmoe",
"to_addr1"=>"123 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"packages": [
{
"weight": 2
}
],
"packaging_type": "YOUR_PACKAGING",
"return_code": "PRINT_RETURN_LABEL",
"shipper": "RocketShipIt",
"ship_addr1": "940 Presidio Ave",
"ship_addr2": "#103",
"ship_city": "San Francisco",
"ship_state": "CA",
"ship_code": "94115",
"ship_phone": "1231231234",
"to_name": "John Doe Schmoe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"test": true
}
}
)
FedEx-REST - Label SmartPost
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"test": true,
"packages": [
{
"weight": 5
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"service": "SMART_POST",
"smart_post_indicia": "PARCEL_SELECT",
"smart_post_hub_id": "5552"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'test' => true,
'packages' =>
array (
0 =>
array (
'weight' => 5,
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'to_phone' => '1231231234',
'packaging_type' => 'YOUR_PACKAGING',
'service' => 'SMART_POST',
'smart_post_indicia' => 'PARCEL_SELECT',
'smart_post_hub_id' => '5552',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx-REST',
'params': {'key': 'your-key-from-authenticate-request',
'packages': [{'weight': 5}],
'packaging_type': 'YOUR_PACKAGING',
'service': 'SMART_POST',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'smart_post_hub_id': '5552',
'smart_post_indicia': 'PARCEL_SELECT',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"FedEx-REST",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"test"=>true,
"packages"=>[{"weight"=>5}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"to_phone"=>"1231231234",
"packaging_type"=>"YOUR_PACKAGING",
"service"=>"SMART_POST",
"smart_post_indicia"=>"PARCEL_SELECT",
"smart_post_hub_id"=>"5552"}}
)
rocketshipit.request(
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"test": true,
"packages": [
{
"weight": 5
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"service": "SMART_POST",
"smart_post_indicia": "PARCEL_SELECT",
"smart_post_hub_id": "5552"
}
}
)
FedEx-REST - Label Third Party Billing
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"billing": [
{
"type": "transportation",
"payment_type": "third_party",
"company": "Acme Inc.",
"account": "abc123",
"postal_code": "94608",
"country_code": "US"
}
],
"packages": [
{
"weight": 15
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'billing' =>
array (
0 =>
array (
'type' => 'transportation',
'payment_type' => 'third_party',
'company' => 'Acme Inc.',
'account' => 'abc123',
'postal_code' => '94608',
'country_code' => 'US',
),
),
'packages' =>
array (
0 =>
array (
'weight' => 15,
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'to_phone' => '1231231234',
'packaging_type' => 'YOUR_PACKAGING',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx-REST',
'params': {'billing': [{'account': 'abc123',
'company': 'Acme Inc.',
'country_code': 'US',
'payment_type': 'third_party',
'postal_code': '94608',
'type': 'transportation'}],
'key': 'your-key-from-authenticate-request',
'packages': [{'weight': 15}],
'packaging_type': 'YOUR_PACKAGING',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"FedEx-REST",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"billing"=>
[{"type"=>"transportation",
"payment_type"=>"third_party",
"company"=>"Acme Inc.",
"account"=>"abc123",
"postal_code"=>"94608",
"country_code"=>"US"}],
"packages"=>[{"weight"=>15}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"to_phone"=>"1231231234",
"packaging_type"=>"YOUR_PACKAGING",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"billing": [
{
"type": "transportation",
"payment_type": "third_party",
"company": "Acme Inc.",
"account": "abc123",
"postal_code": "94608",
"country_code": "US"
}
],
"packages": [
{
"weight": 15
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
)
FedEx-REST - Label with Insurance
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"packages": [
{
"weight": 5,
"insured_value": 899.00,
"insured_currency": "USD"
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'insured_value' => 899.0,
'insured_currency' => 'USD',
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'to_phone' => '1231231234',
'packaging_type' => 'YOUR_PACKAGING',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'FedEx-REST',
'params': {'key': 'your-key-from-authenticate-request',
'packages': [{'insured_currency': 'USD',
'insured_value': 899.0,
'weight': 5}],
'packaging_type': 'YOUR_PACKAGING',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"FedEx-REST",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"packages"=>
[{"weight"=>5, "insured_value"=>899.0, "insured_currency"=>"USD"}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"to_phone"=>"1231231234",
"packaging_type"=>"YOUR_PACKAGING",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"packages": [
{
"weight": 5,
"insured_value": 899.00,
"insured_currency": "USD"
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
)
FedEx-REST - Locator
{
"carrier": "FedEx-REST",
"action": "FindLocations",
"params": {
"key": "your-key-from-authenticate-request",
"attributes": [
"SATURDAY_DROPOFFS"
],
"locations": [
"FEDEX_OFFICE"
],
"results_requested": 4,
"radius": 50,
"ship_city": "Briggs",
"ship_state": "TX",
"ship_code": "78608-0001",
"ship_country": "US",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx-REST',
'action' => 'FindLocations',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'attributes' =>
array (
0 => 'SATURDAY_DROPOFFS',
),
'locations' =>
array (
0 => 'FEDEX_OFFICE',
),
'results_requested' => 4,
'radius' => 50,
'ship_city' => 'Briggs',
'ship_state' => 'TX',
'ship_code' => '78608-0001',
'ship_country' => 'US',
'test' => true,
),
)
);
rs.request(
{'action': 'FindLocations',
'carrier': 'FedEx-REST',
'params': {'attributes': ['SATURDAY_DROPOFFS'],
'key': 'your-key-from-authenticate-request',
'locations': ['FEDEX_OFFICE'],
'radius': 50,
'results_requested': 4,
'ship_city': 'Briggs',
'ship_code': '78608-0001',
'ship_country': 'US',
'ship_state': 'TX',
'test': True}}
)
rs.request(
{"carrier"=>"FedEx-REST",
"action"=>"FindLocations",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"attributes"=>["SATURDAY_DROPOFFS"],
"locations"=>["FEDEX_OFFICE"],
"results_requested"=>4,
"radius"=>50,
"ship_city"=>"Briggs",
"ship_state"=>"TX",
"ship_code"=>"78608-0001",
"ship_country"=>"US",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx-REST",
"action": "FindLocations",
"params": {
"key": "your-key-from-authenticate-request",
"attributes": [
"SATURDAY_DROPOFFS"
],
"locations": [
"FEDEX_OFFICE"
],
"results_requested": 4,
"radius": 50,
"ship_city": "Briggs",
"ship_state": "TX",
"ship_code": "78608-0001",
"ship_country": "US",
"test": true
}
}
)
FedEx-REST - Pickup Cancel
{
"carrier": "FedEx-REST",
"action": "CancelPickup",
"params": {
"key": "your-key-from-authenticate-request",
"pickup_id": "CPU663460",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx-REST',
'action' => 'CancelPickup',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'pickup_id' => 'CPU663460',
'test' => true,
),
)
);
rs.request(
{'action': 'CancelPickup',
'carrier': 'FedEx-REST',
'params': {'key': 'your-key-from-authenticate-request',
'pickup_id': 'CPU663460',
'test': True}}
)
rs.request(
{"carrier"=>"FedEx-REST",
"action"=>"CancelPickup",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"pickup_id"=>"CPU663460",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx-REST",
"action": "CancelPickup",
"params": {
"key": "your-key-from-authenticate-request",
"pickup_id": "CPU663460",
"test": true
}
}
)
FedEx-REST - Pickup Express
{
"carrier": "FedEx-REST",
"action": "CreatePickup",
"params": {
"key": "your-key-from-authenticate-request",
"carrier_code": "FDXE",
"weight": 10,
"pickup_company_name": "Acme Inc",
"pickup_contact_name": "John Doe",
"pickup_addr1": "123 Main St",
"pickup_addr2": "123",
"pickup_city": "Emeryville",
"pickup_state": "CA",
"pickup_code": "94608",
"pickup_country": "US",
"pickup_phone": "123-123-1234",
"pickup_date": "20161212",
"close_time": "1600",
"ready_time": "0800",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx-REST',
'action' => 'CreatePickup',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'carrier_code' => 'FDXE',
'weight' => 10,
'pickup_company_name' => 'Acme Inc',
'pickup_contact_name' => 'John Doe',
'pickup_addr1' => '123 Main St',
'pickup_addr2' => '123',
'pickup_city' => 'Emeryville',
'pickup_state' => 'CA',
'pickup_code' => '94608',
'pickup_country' => 'US',
'pickup_phone' => '123-123-1234',
'pickup_date' => '20161212',
'close_time' => '1600',
'ready_time' => '0800',
'test' => true,
),
)
);
rs.request(
{'action': 'CreatePickup',
'carrier': 'FedEx-REST',
'params': {'carrier_code': 'FDXE',
'close_time': '1600',
'key': 'your-key-from-authenticate-request',
'pickup_addr1': '123 Main St',
'pickup_addr2': '123',
'pickup_city': 'Emeryville',
'pickup_code': '94608',
'pickup_company_name': 'Acme Inc',
'pickup_contact_name': 'John Doe',
'pickup_country': 'US',
'pickup_date': '20161212',
'pickup_phone': '123-123-1234',
'pickup_state': 'CA',
'ready_time': '0800',
'test': True,
'weight': 10}}
)
rs.request(
{"carrier"=>"FedEx-REST",
"action"=>"CreatePickup",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"carrier_code"=>"FDXE",
"weight"=>10,
"pickup_company_name"=>"Acme Inc",
"pickup_contact_name"=>"John Doe",
"pickup_addr1"=>"123 Main St",
"pickup_addr2"=>"123",
"pickup_city"=>"Emeryville",
"pickup_state"=>"CA",
"pickup_code"=>"94608",
"pickup_country"=>"US",
"pickup_phone"=>"123-123-1234",
"pickup_date"=>"20161212",
"close_time"=>"1600",
"ready_time"=>"0800",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx-REST",
"action": "CreatePickup",
"params": {
"key": "your-key-from-authenticate-request",
"carrier_code": "FDXE",
"weight": 10,
"pickup_company_name": "Acme Inc",
"pickup_contact_name": "John Doe",
"pickup_addr1": "123 Main St",
"pickup_addr2": "123",
"pickup_city": "Emeryville",
"pickup_state": "CA",
"pickup_code": "94608",
"pickup_country": "US",
"pickup_phone": "123-123-1234",
"pickup_date": "20161212",
"close_time": "1600",
"ready_time": "0800",
"test": true
}
}
)
FedEx-REST - Pickup Ground
{
"carrier": "FedEx-REST",
"action": "CreatePickup",
"params": {
"key": "your-key-from-authenticate-request",
"weight": 10,
"pickup_company_name": "Acme Inc",
"pickup_contact_name": "John Doe",
"pickup_addr1": "123 Main St",
"pickup_addr2": "123",
"pickup_city": "Emeryville",
"pickup_state": "CA",
"pickup_code": "94608",
"pickup_country": "US",
"pickup_phone": "123-123-1234",
"pickup_date": "20161212",
"close_time": "1600",
"ready_time": "0800",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx-REST',
'action' => 'CreatePickup',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'weight' => 10,
'pickup_company_name' => 'Acme Inc',
'pickup_contact_name' => 'John Doe',
'pickup_addr1' => '123 Main St',
'pickup_addr2' => '123',
'pickup_city' => 'Emeryville',
'pickup_state' => 'CA',
'pickup_code' => '94608',
'pickup_country' => 'US',
'pickup_phone' => '123-123-1234',
'pickup_date' => '20161212',
'close_time' => '1600',
'ready_time' => '0800',
'test' => true,
),
)
);
rs.request(
{'action': 'CreatePickup',
'carrier': 'FedEx-REST',
'params': {'close_time': '1600',
'key': 'your-key-from-authenticate-request',
'pickup_addr1': '123 Main St',
'pickup_addr2': '123',
'pickup_city': 'Emeryville',
'pickup_code': '94608',
'pickup_company_name': 'Acme Inc',
'pickup_contact_name': 'John Doe',
'pickup_country': 'US',
'pickup_date': '20161212',
'pickup_phone': '123-123-1234',
'pickup_state': 'CA',
'ready_time': '0800',
'test': True,
'weight': 10}}
)
rs.request(
{"carrier"=>"FedEx-REST",
"action"=>"CreatePickup",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"weight"=>10,
"pickup_company_name"=>"Acme Inc",
"pickup_contact_name"=>"John Doe",
"pickup_addr1"=>"123 Main St",
"pickup_addr2"=>"123",
"pickup_city"=>"Emeryville",
"pickup_state"=>"CA",
"pickup_code"=>"94608",
"pickup_country"=>"US",
"pickup_phone"=>"123-123-1234",
"pickup_date"=>"20161212",
"close_time"=>"1600",
"ready_time"=>"0800",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx-REST",
"action": "CreatePickup",
"params": {
"key": "your-key-from-authenticate-request",
"weight": 10,
"pickup_company_name": "Acme Inc",
"pickup_contact_name": "John Doe",
"pickup_addr1": "123 Main St",
"pickup_addr2": "123",
"pickup_city": "Emeryville",
"pickup_state": "CA",
"pickup_code": "94608",
"pickup_country": "US",
"pickup_phone": "123-123-1234",
"pickup_date": "20161212",
"close_time": "1600",
"ready_time": "0800",
"test": true
}
}
)
FedEx-REST - Rates
{
"carrier": "FedEx-REST",
"action": "GetAllRates",
"params": {
"test": true,
"account_number": "1234567890",
"key": "your-key-from-authenticate-request",
"packages": [
{
"weight": 2
},
{
"weight": 5
}
],
"customs": [],
"shipper": "My Company",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_state": "CA",
"to_code": "90210",
"weight_unit": "LB",
"packaging_type": "YOUR_PACKAGING",
"dropoff_type": "USE_SCHEDULED_PICKUP",
"negotiated_rates": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx-REST',
'action' => 'GetAllRates',
'params' =>
array (
'test' => true,
'account_number' => '1234567890',
'key' => 'your-key-from-authenticate-request',
'packages' =>
array (
0 =>
array (
'weight' => 2,
),
1 =>
array (
'weight' => 5,
),
),
'customs' =>
array (
),
'shipper' => 'My Company',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_country' => 'US',
'to_state' => 'CA',
'to_code' => '90210',
'weight_unit' => 'LB',
'packaging_type' => 'YOUR_PACKAGING',
'dropoff_type' => 'USE_SCHEDULED_PICKUP',
'negotiated_rates' => true,
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'FedEx-REST',
'params': {'account_number': '1234567890',
'customs': [],
'dropoff_type': 'USE_SCHEDULED_PICKUP',
'key': 'your-key-from-authenticate-request',
'negotiated_rates': True,
'packages': [{'weight': 2}, {'weight': 5}],
'packaging_type': 'YOUR_PACKAGING',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'My Company',
'test': True,
'to_code': '90210',
'to_country': 'US',
'to_state': 'CA',
'weight_unit': 'LB'}}
)
rs.request(
{"carrier"=>"FedEx-REST",
"action"=>"GetAllRates",
"params"=>
{"test"=>true,
"account_number"=>"1234567890",
"key"=>"your-key-from-authenticate-request",
"packages"=>[{"weight"=>2}, {"weight"=>5}],
"customs"=>[],
"shipper"=>"My Company",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_country"=>"US",
"to_state"=>"CA",
"to_code"=>"90210",
"weight_unit"=>"LB",
"packaging_type"=>"YOUR_PACKAGING",
"dropoff_type"=>"USE_SCHEDULED_PICKUP",
"negotiated_rates"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx-REST",
"action": "GetAllRates",
"params": {
"test": true,
"account_number": "1234567890",
"key": "your-key-from-authenticate-request",
"packages": [
{
"weight": 2
},
{
"weight": 5
}
],
"customs": [],
"shipper": "My Company",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_state": "CA",
"to_code": "90210",
"weight_unit": "LB",
"packaging_type": "YOUR_PACKAGING",
"dropoff_type": "USE_SCHEDULED_PICKUP",
"negotiated_rates": true
}
}
)
FedEx-REST - Rates International
{
"carrier": "FedEx-REST",
"action": "GetAllRates",
"params": {
"account_number": "your-account-number",
"key": "your-key-from-authenticate-request",
"packages": [
{
"weight": 2.5
}
],
"customs": [
{
"customs_value": 10.00,
"customs_quantity_units": "EA",
"customs_quantity": 1,
"country_of_manufacture": "US",
"customs_weight": 2.5,
"customs_description": "Brass Trumpet in Case"
}
],
"weight_unit": "LB",
"packaging_type": "YOUR_PACKAGING",
"dropoff_type": "USE_SCHEDULED_PICKUP",
"negotiated_rates": true,
"ship_addr1": "123 Main St",
"ship_city": "Burnsville",
"ship_code": "55337",
"ship_country": "US",
"ship_phone": "123-123-1234",
"ship_state": "MN",
"to_city": "New Glasgow",
"to_code": "B2H3Y5",
"to_country": "CA",
"to_state": "NS"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx-REST',
'action' => 'GetAllRates',
'params' =>
array (
'account_number' => 'your-account-number',
'key' => 'your-key-from-authenticate-request',
'packages' =>
array (
0 =>
array (
'weight' => 2.5,
),
),
'customs' =>
array (
0 =>
array (
'customs_value' => 10.0,
'customs_quantity_units' => 'EA',
'customs_quantity' => 1,
'country_of_manufacture' => 'US',
'customs_weight' => 2.5,
'customs_description' => 'Brass Trumpet in Case',
),
),
'weight_unit' => 'LB',
'packaging_type' => 'YOUR_PACKAGING',
'dropoff_type' => 'USE_SCHEDULED_PICKUP',
'negotiated_rates' => true,
'ship_addr1' => '123 Main St',
'ship_city' => 'Burnsville',
'ship_code' => '55337',
'ship_country' => 'US',
'ship_phone' => '123-123-1234',
'ship_state' => 'MN',
'to_city' => 'New Glasgow',
'to_code' => 'B2H3Y5',
'to_country' => 'CA',
'to_state' => 'NS',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'FedEx-REST',
'params': {'account_number': 'your-account-number',
'customs': [{'country_of_manufacture': 'US',
'customs_description': 'Brass Trumpet in Case',
'customs_quantity': 1,
'customs_quantity_units': 'EA',
'customs_value': 10.0,
'customs_weight': 2.5}],
'dropoff_type': 'USE_SCHEDULED_PICKUP',
'key': 'your-key-from-authenticate-request',
'negotiated_rates': True,
'packages': [{'weight': 2.5}],
'packaging_type': 'YOUR_PACKAGING',
'ship_addr1': '123 Main St',
'ship_city': 'Burnsville',
'ship_code': '55337',
'ship_country': 'US',
'ship_phone': '123-123-1234',
'ship_state': 'MN',
'to_city': 'New Glasgow',
'to_code': 'B2H3Y5',
'to_country': 'CA',
'to_state': 'NS',
'weight_unit': 'LB'}}
)
rs.request(
{"carrier"=>"FedEx-REST",
"action"=>"GetAllRates",
"params"=>
{"account_number"=>"your-account-number",
"key"=>"your-key-from-authenticate-request",
"packages"=>[{"weight"=>2.5}],
"customs"=>
[{"customs_value"=>10.0,
"customs_quantity_units"=>"EA",
"customs_quantity"=>1,
"country_of_manufacture"=>"US",
"customs_weight"=>2.5,
"customs_description"=>"Brass Trumpet in Case"}],
"weight_unit"=>"LB",
"packaging_type"=>"YOUR_PACKAGING",
"dropoff_type"=>"USE_SCHEDULED_PICKUP",
"negotiated_rates"=>true,
"ship_addr1"=>"123 Main St",
"ship_city"=>"Burnsville",
"ship_code"=>"55337",
"ship_country"=>"US",
"ship_phone"=>"123-123-1234",
"ship_state"=>"MN",
"to_city"=>"New Glasgow",
"to_code"=>"B2H3Y5",
"to_country"=>"CA",
"to_state"=>"NS"}}
)
rocketshipit.request(
{
"carrier": "FedEx-REST",
"action": "GetAllRates",
"params": {
"account_number": "your-account-number",
"key": "your-key-from-authenticate-request",
"packages": [
{
"weight": 2.5
}
],
"customs": [
{
"customs_value": 10.00,
"customs_quantity_units": "EA",
"customs_quantity": 1,
"country_of_manufacture": "US",
"customs_weight": 2.5,
"customs_description": "Brass Trumpet in Case"
}
],
"weight_unit": "LB",
"packaging_type": "YOUR_PACKAGING",
"dropoff_type": "USE_SCHEDULED_PICKUP",
"negotiated_rates": true,
"ship_addr1": "123 Main St",
"ship_city": "Burnsville",
"ship_code": "55337",
"ship_country": "US",
"ship_phone": "123-123-1234",
"ship_state": "MN",
"to_city": "New Glasgow",
"to_code": "B2H3Y5",
"to_country": "CA",
"to_state": "NS"
}
}
)
FedEx-REST - Rates OneRate
{
"carrier": "FedEx-REST",
"action": "GetAllRates",
"params": {
"packages": [
{
"weight": 2
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_state": "CA",
"to_code": "90210",
"weight_unit": "LB",
"test": true,
"dropoff_type": "USE_SCHEDULED_PICKUP",
"service": "FEDEX_EXPRESS_SAVER",
"packaging_type": "FEDEX_SMALL_BOX",
"fedex_one_rate": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx-REST',
'action' => 'GetAllRates',
'params' =>
array (
'packages' =>
array (
0 =>
array (
'weight' => 2,
),
),
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_country' => 'US',
'to_state' => 'CA',
'to_code' => '90210',
'weight_unit' => 'LB',
'test' => true,
'dropoff_type' => 'USE_SCHEDULED_PICKUP',
'service' => 'FEDEX_EXPRESS_SAVER',
'packaging_type' => 'FEDEX_SMALL_BOX',
'fedex_one_rate' => true,
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'FedEx-REST',
'params': {'customs': [],
'dropoff_type': 'USE_SCHEDULED_PICKUP',
'fedex_one_rate': True,
'packages': [{'weight': 2}],
'packaging_type': 'FEDEX_SMALL_BOX',
'service': 'FEDEX_EXPRESS_SAVER',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_code': '90210',
'to_country': 'US',
'to_state': 'CA',
'weight_unit': 'LB'}}
)
rs.request(
{"carrier"=>"FedEx-REST",
"action"=>"GetAllRates",
"params"=>
{"packages"=>[{"weight"=>2}],
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_country"=>"US",
"to_state"=>"CA",
"to_code"=>"90210",
"weight_unit"=>"LB",
"test"=>true,
"dropoff_type"=>"USE_SCHEDULED_PICKUP",
"service"=>"FEDEX_EXPRESS_SAVER",
"packaging_type"=>"FEDEX_SMALL_BOX",
"fedex_one_rate"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx-REST",
"action": "GetAllRates",
"params": {
"packages": [
{
"weight": 2
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_state": "CA",
"to_code": "90210",
"weight_unit": "LB",
"test": true,
"dropoff_type": "USE_SCHEDULED_PICKUP",
"service": "FEDEX_EXPRESS_SAVER",
"packaging_type": "FEDEX_SMALL_BOX",
"fedex_one_rate": true
}
}
)
FedEx-REST - Time in Transit
{
"carrier": "FedEx-REST",
"action": "TimeInTransit",
"params": {
"key": "your-key-from-authenticate-request",
"ship_code": "94608",
"ship_country": "US",
"to_code": "90210",
"to_country": "US",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx-REST',
'action' => 'TimeInTransit',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'ship_code' => '94608',
'ship_country' => 'US',
'to_code' => '90210',
'to_country' => 'US',
'test' => true,
),
)
);
rs.request(
{'action': 'TimeInTransit',
'carrier': 'FedEx-REST',
'params': {'key': 'your-key-from-authenticate-request',
'ship_code': '94608',
'ship_country': 'US',
'test': True,
'to_code': '90210',
'to_country': 'US'}}
)
rs.request(
{"carrier"=>"FedEx-REST",
"action"=>"TimeInTransit",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"ship_code"=>"94608",
"ship_country"=>"US",
"to_code"=>"90210",
"to_country"=>"US",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx-REST",
"action": "TimeInTransit",
"params": {
"key": "your-key-from-authenticate-request",
"ship_code": "94608",
"ship_country": "US",
"to_code": "90210",
"to_country": "US",
"test": true
}
}
)
FedEx-REST - Track
{
"carrier": "FedEx-REST",
"action": "track",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"tracking_number": "123456789012"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx-REST',
'action' => 'track',
'params' =>
array (
'test' => true,
'key' => 'your-key-from-authenticate-request',
'tracking_number' => '123456789012',
),
)
);
rs.request(
{'action': 'track',
'carrier': 'FedEx-REST',
'params': {'key': 'your-key-from-authenticate-request',
'test': True,
'tracking_number': '123456789012'}}
)
rs.request(
{"carrier"=>"FedEx-REST",
"action"=>"track",
"params"=>
{"test"=>true,
"key"=>"your-key-from-authenticate-request",
"tracking_number"=>"123456789012"}}
)
rocketshipit.request(
{
"carrier": "FedEx-REST",
"action": "track",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"tracking_number": "123456789012"
}
}
)
FedEx-REST - Tracking by Reference without account
{
"carrier": "FedEx-REST",
"action": "track",
"params": {
"key": "your-key-from-authenticate-request",
"tracking_number": "318511",
"tracking_id_type": "PURCHASE_ORDER",
"carrier_code": "FDXE",
"to_country": "US",
"to_code": "01835",
"ship_date_begin": "2024-05-01",
"ship_date_end": "2024-05-24"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx-REST',
'action' => 'track',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'tracking_number' => '318511',
'tracking_id_type' => 'PURCHASE_ORDER',
'carrier_code' => 'FDXE',
'to_country' => 'US',
'to_code' => '01835',
'ship_date_begin' => '2024-05-01',
'ship_date_end' => '2024-05-24',
),
)
);
rs.request(
{'action': 'track',
'carrier': 'FedEx-REST',
'params': {'carrier_code': 'FDXE',
'key': 'your-key-from-authenticate-request',
'ship_date_begin': '2024-05-01',
'ship_date_end': '2024-05-24',
'to_code': '01835',
'to_country': 'US',
'tracking_id_type': 'PURCHASE_ORDER',
'tracking_number': '318511'}}
)
rs.request(
{"carrier"=>"FedEx-REST",
"action"=>"track",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"tracking_number"=>"318511",
"tracking_id_type"=>"PURCHASE_ORDER",
"carrier_code"=>"FDXE",
"to_country"=>"US",
"to_code"=>"01835",
"ship_date_begin"=>"2024-05-01",
"ship_date_end"=>"2024-05-24"}}
)
rocketshipit.request(
{
"carrier": "FedEx-REST",
"action": "track",
"params": {
"key": "your-key-from-authenticate-request",
"tracking_number": "318511",
"tracking_id_type": "PURCHASE_ORDER",
"carrier_code": "FDXE",
"to_country": "US",
"to_code": "01835",
"ship_date_begin": "2024-05-01",
"ship_date_end": "2024-05-24"
}
}
)
FedEx-REST - Upload Customs Document
{
"carrier": "FedEx-REST",
"action": "UploadDocument",
"params": {
"key": "your-key-from-authenticate-request",
"test": true,
"filename": "test.txt",
"file_format": "txt",
"document_type": "013",
"file_contents": "Tm90aWNlDQpJbiBhbGwgY29tbXVuaWNhdGlvbnMgd2l0aCBVUFMgY29uY2VybmluZyB0aGlzIGRvY3VtZW50LCBwbGVhc2UgcmVmZXIgdG8gdGhlIGRvY3VtZW50IGRhdGUgbG9jYXRlZCBvbiB0aGUgY292ZXIuDQpDb3B5cmlnaHQNClRoZSB1c2UsIGRpc2Nsb3N1cmUsIHJlcHJvZHVjdGlvbiwgbW9kaWZpY2F0aW9uLCB0cmFuc2Zlciwgb3IgdHJhbnNtaXR0YWwgb2YgdGhpcyB3b3JrIGZvciBhbnkgcHVycG9zZSBpbiBhbnkgZm9ybSBvciBieSBhbnkgbWVhbnMgd2l0aG91dCB0aGUgd3JpdHRlbiBwZXJtaXNzaW9uIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBpcyBzdHJpY3RseSBwcm9oaWJpdGVkLg0KwqkgQ29weXJpZ2h0IDIwMTYgVW5pdGVkIFBhcmNlbCBTZXJ2aWNlIG9mIEFtZXJpY2EsIEluYy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC4NClRyYWRlbWFya3MNClVQUyBPbkxpbmXCriBpcyBhIHJlZ2lzdGVyZWQgdHJhZGVtYXJrIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJbmMuIEFsbCBvdGhlciB0cmFkZW1hcmtzIGFyZSB0aGUgcHJvcGVydHkgb2YgdGhlaXIgcmVzcGVjdGl2ZSBvd25lcnMuDQpTb21lIG9mIHRoZSBVUFMgY29ycG9yYXRlIGFwcGxpY2F0aW9ucyB1c2UgVS5TLiBjaXR5LCBzdGF0ZSwgYW5kIHBvc3RhbCBjb2RlIGluZm9ybWF0aW9uIG9idGFpbmVkIGJ5IFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJbmMuIHVuZGVyIGEgbm9uLWV4Y2x1c2l2ZSBsaWNlbnNlIGZyb20gdGhlIFVuaXRlZCBTdGF0ZXMgUG9zdGFsIFNlcnZpY2UuIA0K"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx-REST',
'action' => 'UploadDocument',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'test' => true,
'filename' => 'test.txt',
'file_format' => 'txt',
'document_type' => '013',
'file_contents' => 'Tm90aWNlDQpJbiBhbGwgY29tbXVuaWNhdGlvbnMgd2l0aCBVUFMgY29uY2VybmluZyB0aGlzIGRvY3VtZW50LCBwbGVhc2UgcmVmZXIgdG8gdGhlIGRvY3VtZW50IGRhdGUgbG9jYXRlZCBvbiB0aGUgY292ZXIuDQpDb3B5cmlnaHQNClRoZSB1c2UsIGRpc2Nsb3N1cmUsIHJlcHJvZHVjdGlvbiwgbW9kaWZpY2F0aW9uLCB0cmFuc2Zlciwgb3IgdHJhbnNtaXR0YWwgb2YgdGhpcyB3b3JrIGZvciBhbnkgcHVycG9zZSBpbiBhbnkgZm9ybSBvciBieSBhbnkgbWVhbnMgd2l0aG91dCB0aGUgd3JpdHRlbiBwZXJtaXNzaW9uIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBpcyBzdHJpY3RseSBwcm9oaWJpdGVkLg0KwqkgQ29weXJpZ2h0IDIwMTYgVW5pdGVkIFBhcmNlbCBTZXJ2aWNlIG9mIEFtZXJpY2EsIEluYy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC4NClRyYWRlbWFya3MNClVQUyBPbkxpbmXCriBpcyBhIHJlZ2lzdGVyZWQgdHJhZGVtYXJrIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJbmMuIEFsbCBvdGhlciB0cmFkZW1hcmtzIGFyZSB0aGUgcHJvcGVydHkgb2YgdGhlaXIgcmVzcGVjdGl2ZSBvd25lcnMuDQpTb21lIG9mIHRoZSBVUFMgY29ycG9yYXRlIGFwcGxpY2F0aW9ucyB1c2UgVS5TLiBjaXR5LCBzdGF0ZSwgYW5kIHBvc3RhbCBjb2RlIGluZm9ybWF0aW9uIG9idGFpbmVkIGJ5IFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJbmMuIHVuZGVyIGEgbm9uLWV4Y2x1c2l2ZSBsaWNlbnNlIGZyb20gdGhlIFVuaXRlZCBTdGF0ZXMgUG9zdGFsIFNlcnZpY2UuIA0K',
),
)
);
rs.request(
{'action': 'UploadDocument',
'carrier': 'FedEx-REST',
'params': {'document_type': '013',
'file_contents': 'Tm90aWNlDQpJbiBhbGwgY29tbXVuaWNhdGlvbnMgd2l0aCBVUFMgY29uY2VybmluZyB0aGlzIGRvY3VtZW50LCBwbGVhc2UgcmVmZXIgdG8gdGhlIGRvY3VtZW50IGRhdGUgbG9jYXRlZCBvbiB0aGUgY292ZXIuDQpDb3B5cmlnaHQNClRoZSB1c2UsIGRpc2Nsb3N1cmUsIHJlcHJvZHVjdGlvbiwgbW9kaWZpY2F0aW9uLCB0cmFuc2Zlciwgb3IgdHJhbnNtaXR0YWwgb2YgdGhpcyB3b3JrIGZvciBhbnkgcHVycG9zZSBpbiBhbnkgZm9ybSBvciBieSBhbnkgbWVhbnMgd2l0aG91dCB0aGUgd3JpdHRlbiBwZXJtaXNzaW9uIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBpcyBzdHJpY3RseSBwcm9oaWJpdGVkLg0KwqkgQ29weXJpZ2h0IDIwMTYgVW5pdGVkIFBhcmNlbCBTZXJ2aWNlIG9mIEFtZXJpY2EsIEluYy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC4NClRyYWRlbWFya3MNClVQUyBPbkxpbmXCriBpcyBhIHJlZ2lzdGVyZWQgdHJhZGVtYXJrIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJbmMuIEFsbCBvdGhlciB0cmFkZW1hcmtzIGFyZSB0aGUgcHJvcGVydHkgb2YgdGhlaXIgcmVzcGVjdGl2ZSBvd25lcnMuDQpTb21lIG9mIHRoZSBVUFMgY29ycG9yYXRlIGFwcGxpY2F0aW9ucyB1c2UgVS5TLiBjaXR5LCBzdGF0ZSwgYW5kIHBvc3RhbCBjb2RlIGluZm9ybWF0aW9uIG9idGFpbmVkIGJ5IFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJbmMuIHVuZGVyIGEgbm9uLWV4Y2x1c2l2ZSBsaWNlbnNlIGZyb20gdGhlIFVuaXRlZCBTdGF0ZXMgUG9zdGFsIFNlcnZpY2UuIA0K',
'file_format': 'txt',
'filename': 'test.txt',
'key': 'your-key-from-authenticate-request',
'test': True}}
)
rs.request(
{"carrier"=>"FedEx-REST",
"action"=>"UploadDocument",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"test"=>true,
"filename"=>"test.txt",
"file_format"=>"txt",
"document_type"=>"013",
"file_contents"=>
"Tm90aWNlDQpJbiBhbGwgY29tbXVuaWNhdGlvbnMgd2l0aCBVUFMgY29uY2VybmluZyB0aGlzIGRvY3VtZW50LCBwbGVhc2UgcmVmZXIgdG8gdGhlIGRvY3VtZW50IGRhdGUgbG9jYXRlZCBvbiB0aGUgY292ZXIuDQpDb3B5cmlnaHQNClRoZSB1c2UsIGRpc2Nsb3N1cmUsIHJlcHJvZHVjdGlvbiwgbW9kaWZpY2F0aW9uLCB0cmFuc2Zlciwgb3IgdHJhbnNtaXR0YWwgb2YgdGhpcyB3b3JrIGZvciBhbnkgcHVycG9zZSBpbiBhbnkgZm9ybSBvciBieSBhbnkgbWVhbnMgd2l0aG91dCB0aGUgd3JpdHRlbiBwZXJtaXNzaW9uIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBpcyBzdHJpY3RseSBwcm9oaWJpdGVkLg0KwqkgQ29weXJpZ2h0IDIwMTYgVW5pdGVkIFBhcmNlbCBTZXJ2aWNlIG9mIEFtZXJpY2EsIEluYy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC4NClRyYWRlbWFya3MNClVQUyBPbkxpbmXCriBpcyBhIHJlZ2lzdGVyZWQgdHJhZGVtYXJrIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJbmMuIEFsbCBvdGhlciB0cmFkZW1hcmtzIGFyZSB0aGUgcHJvcGVydHkgb2YgdGhlaXIgcmVzcGVjdGl2ZSBvd25lcnMuDQpTb21lIG9mIHRoZSBVUFMgY29ycG9yYXRlIGFwcGxpY2F0aW9ucyB1c2UgVS5TLiBjaXR5LCBzdGF0ZSwgYW5kIHBvc3RhbCBjb2RlIGluZm9ybWF0aW9uIG9idGFpbmVkIGJ5IFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJbmMuIHVuZGVyIGEgbm9uLWV4Y2x1c2l2ZSBsaWNlbnNlIGZyb20gdGhlIFVuaXRlZCBTdGF0ZXMgUG9zdGFsIFNlcnZpY2UuIA0K"}}
)
rocketshipit.request(
{
"carrier": "FedEx-REST",
"action": "UploadDocument",
"params": {
"key": "your-key-from-authenticate-request",
"test": true,
"filename": "test.txt",
"file_format": "txt",
"document_type": "013",
"file_contents": "Tm90aWNlDQpJbiBhbGwgY29tbXVuaWNhdGlvbnMgd2l0aCBVUFMgY29uY2VybmluZyB0aGlzIGRvY3VtZW50LCBwbGVhc2UgcmVmZXIgdG8gdGhlIGRvY3VtZW50IGRhdGUgbG9jYXRlZCBvbiB0aGUgY292ZXIuDQpDb3B5cmlnaHQNClRoZSB1c2UsIGRpc2Nsb3N1cmUsIHJlcHJvZHVjdGlvbiwgbW9kaWZpY2F0aW9uLCB0cmFuc2Zlciwgb3IgdHJhbnNtaXR0YWwgb2YgdGhpcyB3b3JrIGZvciBhbnkgcHVycG9zZSBpbiBhbnkgZm9ybSBvciBieSBhbnkgbWVhbnMgd2l0aG91dCB0aGUgd3JpdHRlbiBwZXJtaXNzaW9uIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBpcyBzdHJpY3RseSBwcm9oaWJpdGVkLg0KwqkgQ29weXJpZ2h0IDIwMTYgVW5pdGVkIFBhcmNlbCBTZXJ2aWNlIG9mIEFtZXJpY2EsIEluYy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC4NClRyYWRlbWFya3MNClVQUyBPbkxpbmXCriBpcyBhIHJlZ2lzdGVyZWQgdHJhZGVtYXJrIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJbmMuIEFsbCBvdGhlciB0cmFkZW1hcmtzIGFyZSB0aGUgcHJvcGVydHkgb2YgdGhlaXIgcmVzcGVjdGl2ZSBvd25lcnMuDQpTb21lIG9mIHRoZSBVUFMgY29ycG9yYXRlIGFwcGxpY2F0aW9ucyB1c2UgVS5TLiBjaXR5LCBzdGF0ZSwgYW5kIHBvc3RhbCBjb2RlIGluZm9ybWF0aW9uIG9idGFpbmVkIGJ5IFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJbmMuIHVuZGVyIGEgbm9uLWV4Y2x1c2l2ZSBsaWNlbnNlIGZyb20gdGhlIFVuaXRlZCBTdGF0ZXMgUG9zdGFsIFNlcnZpY2UuIA0K"
}
}
)
FedEx-REST - Upload Images
{
"carrier": "FedEx-REST",
"action": "uploadimages",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"images": [
{
"id": "IMAGE_1",
"mime_type": "image/png",
"type": "SIGNATURE",
"content": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+A8AAQUBAScY42YAAAAASUVORK5CYII="
}
]
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx-REST',
'action' => 'uploadimages',
'params' =>
array (
'test' => true,
'key' => 'your-key-from-authenticate-request',
'images' =>
array (
0 =>
array (
'id' => 'IMAGE_1',
'mime_type' => 'image/png',
'type' => 'SIGNATURE',
'content' => 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+A8AAQUBAScY42YAAAAASUVORK5CYII=',
),
),
),
)
);
rs.request(
{'action': 'uploadimages',
'carrier': 'FedEx-REST',
'params': {'images': [{'content': 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+A8AAQUBAScY42YAAAAASUVORK5CYII=',
'id': 'IMAGE_1',
'mime_type': 'image/png',
'type': 'SIGNATURE'}],
'key': 'your-key-from-authenticate-request',
'test': True}}
)
rs.request(
{"carrier"=>"FedEx-REST",
"action"=>"uploadimages",
"params"=>
{"test"=>true,
"key"=>"your-key-from-authenticate-request",
"images"=>
[{"id"=>"IMAGE_1",
"mime_type"=>"image/png",
"type"=>"SIGNATURE",
"content"=>
"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+A8AAQUBAScY42YAAAAASUVORK5CYII="}]}}
)
rocketshipit.request(
{
"carrier": "FedEx-REST",
"action": "uploadimages",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"images": [
{
"id": "IMAGE_1",
"mime_type": "image/png",
"type": "SIGNATURE",
"content": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+A8AAQUBAScY42YAAAAASUVORK5CYII="
}
]
}
}
)
FedEx-REST - Void
{
"carrier": "FedEx-REST",
"action": "VoidShipment",
"params": {
"shipment_id": "123123123",
"key": "your-key-from-authenticate-request",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx-REST',
'action' => 'VoidShipment',
'params' =>
array (
'shipment_id' => '123123123',
'key' => 'your-key-from-authenticate-request',
'test' => true,
),
)
);
rs.request(
{'action': 'VoidShipment',
'carrier': 'FedEx-REST',
'params': {'key': 'your-key-from-authenticate-request',
'shipment_id': '123123123',
'test': True}}
)
rs.request(
{"carrier"=>"FedEx-REST",
"action"=>"VoidShipment",
"params"=>
{"shipment_id"=>"123123123",
"key"=>"your-key-from-authenticate-request",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx-REST",
"action": "VoidShipment",
"params": {
"shipment_id": "123123123",
"key": "your-key-from-authenticate-request",
"test": true
}
}
)
{
"carrier": "GLS",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT",
"username": "YOUR_USER",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 15
}
],
"shipper": "RocketShipIt",
"ship_addr1": "1401 Park Ave",
"ship_city": "Emeryville",
"ship_state": "CA",
"ship_code": "94608",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"service": "PDS",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'GLS',
'action' => 'SubmitShipment',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT',
'username' => 'YOUR_USER',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 15,
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '1401 Park Ave',
'ship_city' => 'Emeryville',
'ship_state' => 'CA',
'ship_code' => '94608',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'to_phone' => '1231231234',
'service' => 'PDS',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'GLS',
'params': {'account_number': 'YOUR_ACCOUNT',
'packages': [{'weight': 15}],
'password': 'YOUR_PASSWORD',
'service': 'PDS',
'ship_addr1': '1401 Park Ave',
'ship_city': 'Emeryville',
'ship_code': '94608',
'ship_phone': '1231231234',
'ship_state': 'CA',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'CA',
'username': 'YOUR_USER'}}
)
rs.request(
{"carrier"=>"GLS",
"action"=>"SubmitShipment",
"params"=>
{"account_number"=>"YOUR_ACCOUNT",
"username"=>"YOUR_USER",
"password"=>"YOUR_PASSWORD",
"packages"=>[{"weight"=>15}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"1401 Park Ave",
"ship_city"=>"Emeryville",
"ship_state"=>"CA",
"ship_code"=>"94608",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"to_phone"=>"1231231234",
"service"=>"PDS",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "GLS",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT",
"username": "YOUR_USER",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 15
}
],
"shipper": "RocketShipIt",
"ship_addr1": "1401 Park Ave",
"ship_city": "Emeryville",
"ship_state": "CA",
"ship_code": "94608",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"service": "PDS",
"test": true
}
}
)
{
"carrier": "GLS",
"action": "VoidShipment",
"params": {
"account_number": "YOUR_ACCOUNT",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"shipment_id": "ABC123",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'GLS',
'action' => 'VoidShipment',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'shipment_id' => 'ABC123',
'test' => true,
),
)
);
rs.request(
{'action': 'VoidShipment',
'carrier': 'GLS',
'params': {'account_number': 'YOUR_ACCOUNT',
'password': 'YOUR_PASSWORD',
'shipment_id': 'ABC123',
'test': True,
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"GLS",
"action"=>"VoidShipment",
"params"=>
{"account_number"=>"YOUR_ACCOUNT",
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"shipment_id"=>"ABC123",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "GLS",
"action": "VoidShipment",
"params": {
"account_number": "YOUR_ACCOUNT",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"shipment_id": "ABC123",
"test": true
}
}
)
{
"carrier": "GLS",
"action": "GetAllRates",
"params": {
"account_number": "YOUR_ACCOUNT",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"ship_code": "94608",
"to_code": "90210",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'GLS',
'action' => 'GetAllRates',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'ship_code' => '94608',
'to_code' => '90210',
'test' => true,
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'GLS',
'params': {'account_number': 'YOUR_ACCOUNT',
'password': 'YOUR_PASSWORD',
'ship_code': '94608',
'test': True,
'to_code': '90210',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"GLS",
"action"=>"GetAllRates",
"params"=>
{"account_number"=>"YOUR_ACCOUNT",
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"ship_code"=>"94608",
"to_code"=>"90210",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "GLS",
"action": "GetAllRates",
"params": {
"account_number": "YOUR_ACCOUNT",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"ship_code": "94608",
"to_code": "90210",
"test": true
}
}
)
{
"carrier": "GLS",
"action": "Track",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"tracking_number": "123456789012"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'GLS',
'action' => 'Track',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'tracking_number' => '123456789012',
),
)
);
rs.request(
{'action': 'Track',
'carrier': 'GLS',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'password': 'YOUR_PASSWORD',
'tracking_number': '123456789012',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"GLS",
"action"=>"Track",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"tracking_number"=>"123456789012"}}
)
rocketshipit.request(
{
"carrier": "GLS",
"action": "Track",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"tracking_number": "123456789012"
}
}
)
Old Dominion - Freight Rate
{
"carrier": "od",
"action": "GetAllRates",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 200,
"freight_class": "200"
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "1202 Chalet Ln",
"ship_addr2": "Do Not Delete - Test Account",
"ship_city": "Harrison",
"ship_state": "AR",
"ship_code": "72601",
"ship_country": "US",
"to_country": "US",
"to_city": "Akron",
"to_state": "OH",
"to_code": "44333",
"weight_unit": "LB",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'od',
'action' => 'GetAllRates',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 200,
'freight_class' => '200',
),
),
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '1202 Chalet Ln',
'ship_addr2' => 'Do Not Delete - Test Account',
'ship_city' => 'Harrison',
'ship_state' => 'AR',
'ship_code' => '72601',
'ship_country' => 'US',
'to_country' => 'US',
'to_city' => 'Akron',
'to_state' => 'OH',
'to_code' => '44333',
'weight_unit' => 'LB',
'test' => true,
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'od',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'customs': [],
'packages': [{'freight_class': '200', 'weight': 200}],
'password': 'YOUR_PASSWORD',
'ship_addr1': '1202 Chalet Ln',
'ship_addr2': 'Do Not Delete - Test Account',
'ship_city': 'Harrison',
'ship_code': '72601',
'ship_country': 'US',
'ship_state': 'AR',
'shipper': 'RocketShipIt',
'test': True,
'to_city': 'Akron',
'to_code': '44333',
'to_country': 'US',
'to_state': 'OH',
'username': 'YOUR_USERNAME',
'weight_unit': 'LB'}}
)
rs.request(
{"carrier"=>"od",
"action"=>"GetAllRates",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"packages"=>[{"weight"=>200, "freight_class"=>"200"}],
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"1202 Chalet Ln",
"ship_addr2"=>"Do Not Delete - Test Account",
"ship_city"=>"Harrison",
"ship_state"=>"AR",
"ship_code"=>"72601",
"ship_country"=>"US",
"to_country"=>"US",
"to_city"=>"Akron",
"to_state"=>"OH",
"to_code"=>"44333",
"weight_unit"=>"LB",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "od",
"action": "GetAllRates",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 200,
"freight_class": "200"
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "1202 Chalet Ln",
"ship_addr2": "Do Not Delete - Test Account",
"ship_city": "Harrison",
"ship_state": "AR",
"ship_code": "72601",
"ship_country": "US",
"to_country": "US",
"to_city": "Akron",
"to_state": "OH",
"to_code": "44333",
"weight_unit": "LB",
"test": true
}
}
)
Old Dominion - Freight Shipment
{
"carrier": "OD",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"ship_email": "your@email.com",
"packages": [
{
"description": "This is a test shipment",
"weight": 200.00,
"length": 150,
"width": 90,
"height": 100,
"packaging_type": "skid",
"freight_class": "50",
"pieces": 10
}
],
"shipper": "Acme Company",
"ship_addr1": "1202 Chalet Ln",
"ship_addr2": "fake shipment",
"ship_city": "San Diego",
"ship_state": "CA",
"ship_code": "92101",
"ship_phone": "8705551234",
"to_name": "ABC Widget Co",
"to_addr1": "1234 Main St",
"to_addr2": "Suite 200",
"to_state": "OH",
"to_city": "Akron",
"to_code": "44333",
"to_phone": "1231231234",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'OD',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'ship_email' => 'your@email.com',
'packages' =>
array (
0 =>
array (
'description' => 'This is a test shipment',
'weight' => 200.0,
'length' => 150,
'width' => 90,
'height' => 100,
'packaging_type' => 'skid',
'freight_class' => '50',
'pieces' => 10,
),
),
'shipper' => 'Acme Company',
'ship_addr1' => '1202 Chalet Ln',
'ship_addr2' => 'fake shipment',
'ship_city' => 'San Diego',
'ship_state' => 'CA',
'ship_code' => '92101',
'ship_phone' => '8705551234',
'to_name' => 'ABC Widget Co',
'to_addr1' => '1234 Main St',
'to_addr2' => 'Suite 200',
'to_state' => 'OH',
'to_city' => 'Akron',
'to_code' => '44333',
'to_phone' => '1231231234',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'OD',
'params': {'packages': [{'description': 'This is a test shipment',
'freight_class': '50',
'height': 100,
'length': 150,
'packaging_type': 'skid',
'pieces': 10,
'weight': 200.0,
'width': 90}],
'password': 'YOUR_PASSWORD',
'ship_addr1': '1202 Chalet Ln',
'ship_addr2': 'fake shipment',
'ship_city': 'San Diego',
'ship_code': '92101',
'ship_email': 'your@email.com',
'ship_phone': '8705551234',
'ship_state': 'CA',
'shipper': 'Acme Company',
'test': True,
'to_addr1': '1234 Main St',
'to_addr2': 'Suite 200',
'to_city': 'Akron',
'to_code': '44333',
'to_name': 'ABC Widget Co',
'to_phone': '1231231234',
'to_state': 'OH',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"OD",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"ship_email"=>"your@email.com",
"packages"=>
[{"description"=>"This is a test shipment",
"weight"=>200.0,
"length"=>150,
"width"=>90,
"height"=>100,
"packaging_type"=>"skid",
"freight_class"=>"50",
"pieces"=>10}],
"shipper"=>"Acme Company",
"ship_addr1"=>"1202 Chalet Ln",
"ship_addr2"=>"fake shipment",
"ship_city"=>"San Diego",
"ship_state"=>"CA",
"ship_code"=>"92101",
"ship_phone"=>"8705551234",
"to_name"=>"ABC Widget Co",
"to_addr1"=>"1234 Main St",
"to_addr2"=>"Suite 200",
"to_state"=>"OH",
"to_city"=>"Akron",
"to_code"=>"44333",
"to_phone"=>"1231231234",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "OD",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"ship_email": "your@email.com",
"packages": [
{
"description": "This is a test shipment",
"weight": 200.00,
"length": 150,
"width": 90,
"height": 100,
"packaging_type": "skid",
"freight_class": "50",
"pieces": 10
}
],
"shipper": "Acme Company",
"ship_addr1": "1202 Chalet Ln",
"ship_addr2": "fake shipment",
"ship_city": "San Diego",
"ship_state": "CA",
"ship_code": "92101",
"ship_phone": "8705551234",
"to_name": "ABC Widget Co",
"to_addr1": "1234 Main St",
"to_addr2": "Suite 200",
"to_state": "OH",
"to_city": "Akron",
"to_code": "44333",
"to_phone": "1231231234",
"test": true
}
}
)
OnTrac - Label
{
"carrier": "OnTrac",
"action": "SubmitShipment",
"params": {
"packages": [
{
"weight": 15
}
],
"service": "S",
"shipper": "RocketShipIt",
"ship_addr1": "940 Presidio Ave",
"ship_city": "San Francisco",
"ship_state": "CA",
"ship_code": "94115",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'OnTrac',
'action' => 'SubmitShipment',
'params' =>
array (
'packages' =>
array (
0 =>
array (
'weight' => 15,
),
),
'service' => 'S',
'shipper' => 'RocketShipIt',
'ship_addr1' => '940 Presidio Ave',
'ship_city' => 'San Francisco',
'ship_state' => 'CA',
'ship_code' => '94115',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'to_phone' => '1231231234',
'packaging_type' => 'YOUR_PACKAGING',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'OnTrac',
'params': {'packages': [{'weight': 15}],
'packaging_type': 'YOUR_PACKAGING',
'service': 'S',
'ship_addr1': '940 Presidio Ave',
'ship_city': 'San Francisco',
'ship_code': '94115',
'ship_phone': '1231231234',
'ship_state': 'CA',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"OnTrac",
"action"=>"SubmitShipment",
"params"=>
{"packages"=>[{"weight"=>15}],
"service"=>"S",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"940 Presidio Ave",
"ship_city"=>"San Francisco",
"ship_state"=>"CA",
"ship_code"=>"94115",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"to_phone"=>"1231231234",
"packaging_type"=>"YOUR_PACKAGING",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "OnTrac",
"action": "SubmitShipment",
"params": {
"packages": [
{
"weight": 15
}
],
"service": "S",
"shipper": "RocketShipIt",
"ship_addr1": "940 Presidio Ave",
"ship_city": "San Francisco",
"ship_state": "CA",
"ship_code": "94115",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
)
OnTrac - Label with References
{
"carrier": "OnTrac",
"action": "SubmitShipment",
"params": {
"reference_value": "my ref 1",
"reference_value2": "my ref 2",
"reference_value3": "my ref 3",
"packages": [
{
"weight": 15
}
],
"service": "S",
"shipper": "RocketShipIt",
"ship_addr1": "940 Presidio Ave",
"ship_city": "San Francisco",
"ship_state": "CA",
"ship_code": "94115",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'OnTrac',
'action' => 'SubmitShipment',
'params' =>
array (
'reference_value' => 'my ref 1',
'reference_value2' => 'my ref 2',
'reference_value3' => 'my ref 3',
'packages' =>
array (
0 =>
array (
'weight' => 15,
),
),
'service' => 'S',
'shipper' => 'RocketShipIt',
'ship_addr1' => '940 Presidio Ave',
'ship_city' => 'San Francisco',
'ship_state' => 'CA',
'ship_code' => '94115',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'to_phone' => '1231231234',
'packaging_type' => 'YOUR_PACKAGING',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'OnTrac',
'params': {'packages': [{'weight': 15}],
'packaging_type': 'YOUR_PACKAGING',
'reference_value': 'my ref 1',
'reference_value2': 'my ref 2',
'reference_value3': 'my ref 3',
'service': 'S',
'ship_addr1': '940 Presidio Ave',
'ship_city': 'San Francisco',
'ship_code': '94115',
'ship_phone': '1231231234',
'ship_state': 'CA',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"OnTrac",
"action"=>"SubmitShipment",
"params"=>
{"reference_value"=>"my ref 1",
"reference_value2"=>"my ref 2",
"reference_value3"=>"my ref 3",
"packages"=>[{"weight"=>15}],
"service"=>"S",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"940 Presidio Ave",
"ship_city"=>"San Francisco",
"ship_state"=>"CA",
"ship_code"=>"94115",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"to_phone"=>"1231231234",
"packaging_type"=>"YOUR_PACKAGING",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "OnTrac",
"action": "SubmitShipment",
"params": {
"reference_value": "my ref 1",
"reference_value2": "my ref 2",
"reference_value3": "my ref 3",
"packages": [
{
"weight": 15
}
],
"service": "S",
"shipper": "RocketShipIt",
"ship_addr1": "940 Presidio Ave",
"ship_city": "San Francisco",
"ship_state": "CA",
"ship_code": "94115",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
)
OnTrac - Pickup
{
"carrier": "OnTrac",
"action": "CreatePickup",
"params": {
"account_number": "37",
"password": "testpass",
"pickup_company_name": "Acme Inc",
"pickup_contact_name": "Mark Sanborn",
"pickup_addr1": "940 Presidio Ave",
"pickup_city": "San Francisco",
"pickup_state": "CA",
"pickup_code": "94115",
"pickup_phone": "123-123-1234",
"to_code": "92112",
"pickup_date": "20160112",
"ready_time": "12:00:00.0Z",
"close_time": "17:00:00.0Z",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'OnTrac',
'action' => 'CreatePickup',
'params' =>
array (
'account_number' => '37',
'password' => 'testpass',
'pickup_company_name' => 'Acme Inc',
'pickup_contact_name' => 'Mark Sanborn',
'pickup_addr1' => '940 Presidio Ave',
'pickup_city' => 'San Francisco',
'pickup_state' => 'CA',
'pickup_code' => '94115',
'pickup_phone' => '123-123-1234',
'to_code' => '92112',
'pickup_date' => '20160112',
'ready_time' => '12:00:00.0Z',
'close_time' => '17:00:00.0Z',
'test' => true,
),
)
);
rs.request(
{'action': 'CreatePickup',
'carrier': 'OnTrac',
'params': {'account_number': '37',
'close_time': '17:00:00.0Z',
'password': 'testpass',
'pickup_addr1': '940 Presidio Ave',
'pickup_city': 'San Francisco',
'pickup_code': '94115',
'pickup_company_name': 'Acme Inc',
'pickup_contact_name': 'Mark Sanborn',
'pickup_date': '20160112',
'pickup_phone': '123-123-1234',
'pickup_state': 'CA',
'ready_time': '12:00:00.0Z',
'test': True,
'to_code': '92112'}}
)
rs.request(
{"carrier"=>"OnTrac",
"action"=>"CreatePickup",
"params"=>
{"account_number"=>"37",
"password"=>"testpass",
"pickup_company_name"=>"Acme Inc",
"pickup_contact_name"=>"Mark Sanborn",
"pickup_addr1"=>"940 Presidio Ave",
"pickup_city"=>"San Francisco",
"pickup_state"=>"CA",
"pickup_code"=>"94115",
"pickup_phone"=>"123-123-1234",
"to_code"=>"92112",
"pickup_date"=>"20160112",
"ready_time"=>"12:00:00.0Z",
"close_time"=>"17:00:00.0Z",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "OnTrac",
"action": "CreatePickup",
"params": {
"account_number": "37",
"password": "testpass",
"pickup_company_name": "Acme Inc",
"pickup_contact_name": "Mark Sanborn",
"pickup_addr1": "940 Presidio Ave",
"pickup_city": "San Francisco",
"pickup_state": "CA",
"pickup_code": "94115",
"pickup_phone": "123-123-1234",
"to_code": "92112",
"pickup_date": "20160112",
"ready_time": "12:00:00.0Z",
"close_time": "17:00:00.0Z",
"test": true
}
}
)
OnTrac - Rates
{
"carrier": "OnTrac",
"action": "GetAllRates",
"params": {
"test": true,
"account_number": "37",
"password": "testpass",
"packages": [
{
"weight": 20.2,
"length": 5,
"width": 7,
"height": 7
}
],
"customs": [],
"ship_code": "90210",
"to_code": "94115",
"weight_unit": "LB",
"service": ""
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'OnTrac',
'action' => 'GetAllRates',
'params' =>
array (
'test' => true,
'account_number' => '37',
'password' => 'testpass',
'packages' =>
array (
0 =>
array (
'weight' => 20.2,
'length' => 5,
'width' => 7,
'height' => 7,
),
),
'customs' =>
array (
),
'ship_code' => '90210',
'to_code' => '94115',
'weight_unit' => 'LB',
'service' => '',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'OnTrac',
'params': {'account_number': '37',
'customs': [],
'packages': [{'height': 7,
'length': 5,
'weight': 20.2,
'width': 7}],
'password': 'testpass',
'service': '',
'ship_code': '90210',
'test': True,
'to_code': '94115',
'weight_unit': 'LB'}}
)
rs.request(
{"carrier"=>"OnTrac",
"action"=>"GetAllRates",
"params"=>
{"test"=>true,
"account_number"=>"37",
"password"=>"testpass",
"packages"=>[{"weight"=>20.2, "length"=>5, "width"=>7, "height"=>7}],
"customs"=>[],
"ship_code"=>"90210",
"to_code"=>"94115",
"weight_unit"=>"LB",
"service"=>""}}
)
rocketshipit.request(
{
"carrier": "OnTrac",
"action": "GetAllRates",
"params": {
"test": true,
"account_number": "37",
"password": "testpass",
"packages": [
{
"weight": 20.2,
"length": 5,
"width": 7,
"height": 7
}
],
"customs": [],
"ship_code": "90210",
"to_code": "94115",
"weight_unit": "LB",
"service": ""
}
}
)
OnTrac - Tracking
{
"carrier": "OnTrac",
"action": "track",
"params": {
"tracking_number": "D10011029479806"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'OnTrac',
'action' => 'track',
'params' =>
array (
'tracking_number' => 'D10011029479806',
),
)
);
rs.request(
{'action': 'track',
'carrier': 'OnTrac',
'params': {'tracking_number': 'D10011029479806'}}
)
rs.request(
{"carrier"=>"OnTrac",
"action"=>"track",
"params"=>{"tracking_number"=>"D10011029479806"}}
)
rocketshipit.request(
{
"carrier": "OnTrac",
"action": "track",
"params": {
"tracking_number": "D10011029479806"
}
}
)
Purolator - Label
{
"carrier": "Purolator",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_API_USER_TOKEN",
"packages": [
{
"weight": 4,
"length": 7,
"width": 5,
"height": 5
}
],
"service": "PurolatorGround",
"shipper": "RocketShipIt",
"ship_addr1": "5048 264 St",
"ship_city": "Aldergrove",
"ship_state": "BC",
"ship_code": "V4W 1N7",
"ship_phone": "1231231234",
"ship_country": "CA",
"to_name": "John Doe",
"to_addr1": "5048 264 St, Aldergrove",
"to_state": "BC",
"to_city": "Aldergrove",
"to_code": "V4W 1N7",
"to_country": "CA",
"image_type": "PDF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'Purolator',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'key' => 'YOUR_API_USER_TOKEN',
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'width' => 5,
'height' => 5,
),
),
'service' => 'PurolatorGround',
'shipper' => 'RocketShipIt',
'ship_addr1' => '5048 264 St',
'ship_city' => 'Aldergrove',
'ship_state' => 'BC',
'ship_code' => 'V4W 1N7',
'ship_phone' => '1231231234',
'ship_country' => 'CA',
'to_name' => 'John Doe',
'to_addr1' => '5048 264 St, Aldergrove',
'to_state' => 'BC',
'to_city' => 'Aldergrove',
'to_code' => 'V4W 1N7',
'to_country' => 'CA',
'image_type' => 'PDF',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'Purolator',
'params': {'image_type': 'PDF',
'key': 'YOUR_API_USER_TOKEN',
'packages': [{'height': 5, 'length': 7, 'weight': 4, 'width': 5}],
'password': 'YOUR_PASSWORD',
'service': 'PurolatorGround',
'ship_addr1': '5048 264 St',
'ship_city': 'Aldergrove',
'ship_code': 'V4W 1N7',
'ship_country': 'CA',
'ship_phone': '1231231234',
'ship_state': 'BC',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '5048 264 St, Aldergrove',
'to_city': 'Aldergrove',
'to_code': 'V4W 1N7',
'to_country': 'CA',
'to_name': 'John Doe',
'to_state': 'BC',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"Purolator",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"key"=>"YOUR_API_USER_TOKEN",
"packages"=>[{"weight"=>4, "length"=>7, "width"=>5, "height"=>5}],
"service"=>"PurolatorGround",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"5048 264 St",
"ship_city"=>"Aldergrove",
"ship_state"=>"BC",
"ship_code"=>"V4W 1N7",
"ship_phone"=>"1231231234",
"ship_country"=>"CA",
"to_name"=>"John Doe",
"to_addr1"=>"5048 264 St, Aldergrove",
"to_state"=>"BC",
"to_city"=>"Aldergrove",
"to_code"=>"V4W 1N7",
"to_country"=>"CA",
"image_type"=>"PDF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "Purolator",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_API_USER_TOKEN",
"packages": [
{
"weight": 4,
"length": 7,
"width": 5,
"height": 5
}
],
"service": "PurolatorGround",
"shipper": "RocketShipIt",
"ship_addr1": "5048 264 St",
"ship_city": "Aldergrove",
"ship_state": "BC",
"ship_code": "V4W 1N7",
"ship_phone": "1231231234",
"ship_country": "CA",
"to_name": "John Doe",
"to_addr1": "5048 264 St, Aldergrove",
"to_state": "BC",
"to_city": "Aldergrove",
"to_code": "V4W 1N7",
"to_country": "CA",
"image_type": "PDF",
"test": true
}
}
)
Purolator - Label International
{
"action": "SubmitShipment",
"carrier": "Purolator",
"params": {
"carrier": "Purolator",
"from_addr1": "1300 Kamato Road",
"from_city": "Mississauga",
"from_code": "L4W2N2",
"from_country": "CA",
"from_name": "Mississauga",
"from_phone": "19052121055",
"from_state": "ON",
"image_type": "PDF",
"length_unit": "CM",
"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",
"commodity_code": "55"
}
],
"packages": [
{
"height": 11,
"length": 11,
"reference_code": "IN",
"reference_value": "1234567890 | CUST_NO | 4567890",
"weight": 0.5,
"width": 9
}
],
"residential": true,
"service": "PurolatorGroundU.S.",
"ship_addr1": "1300 Kamato Road",
"ship_city": "Mississauga",
"ship_code": "L4W2N2",
"ship_country": "CA",
"ship_name": "Mississauga",
"ship_phone": "19052121055",
"ship_state": "ON",
"shipment_description": "My Custom Text",
"shipper": "Mississauga",
"test": true,
"to_addr1": "2043 Forest Street",
"to_attention_name": "QC",
"to_city": "Jacksonville",
"to_code": "32204",
"to_company": "Urban Inspirations",
"to_country": "US",
"to_name": "US Jacksonville",
"to_phone": "9042887732",
"to_state": "FL",
"weight_unit": "KG"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'action' => 'SubmitShipment',
'carrier' => 'Purolator',
'params' =>
array (
'carrier' => 'Purolator',
'from_addr1' => '1300 Kamato Road',
'from_city' => 'Mississauga',
'from_code' => 'L4W2N2',
'from_country' => 'CA',
'from_name' => 'Mississauga',
'from_phone' => '19052121055',
'from_state' => 'ON',
'image_type' => 'PDF',
'length_unit' => 'CM',
'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',
'commodity_code' => '55',
),
),
'packages' =>
array (
0 =>
array (
'height' => 11,
'length' => 11,
'reference_code' => 'IN',
'reference_value' => '1234567890 | CUST_NO | 4567890',
'weight' => 0.5,
'width' => 9,
),
),
'residential' => true,
'service' => 'PurolatorGroundU.S.',
'ship_addr1' => '1300 Kamato Road',
'ship_city' => 'Mississauga',
'ship_code' => 'L4W2N2',
'ship_country' => 'CA',
'ship_name' => 'Mississauga',
'ship_phone' => '19052121055',
'ship_state' => 'ON',
'shipment_description' => 'My Custom Text',
'shipper' => 'Mississauga',
'test' => true,
'to_addr1' => '2043 Forest Street',
'to_attention_name' => 'QC',
'to_city' => 'Jacksonville',
'to_code' => '32204',
'to_company' => 'Urban Inspirations',
'to_country' => 'US',
'to_name' => 'US Jacksonville',
'to_phone' => '9042887732',
'to_state' => 'FL',
'weight_unit' => 'KG',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'Purolator',
'params': {'carrier': 'Purolator',
'customs': [{'commodity_code': '55',
'country_of_manufacture': 'US',
'customs_description': 'My Description',
'customs_line_amount': 50.0,
'customs_quantity': 1,
'customs_quantity_units': 'EA',
'customs_weight': 2.5}],
'from_addr1': '1300 Kamato Road',
'from_city': 'Mississauga',
'from_code': 'L4W2N2',
'from_country': 'CA',
'from_name': 'Mississauga',
'from_phone': '19052121055',
'from_state': 'ON',
'image_type': 'PDF',
'length_unit': 'CM',
'packages': [{'height': 11,
'length': 11,
'reference_code': 'IN',
'reference_value': '1234567890 | CUST_NO | 4567890',
'weight': 0.5,
'width': 9}],
'residential': True,
'service': 'PurolatorGroundU.S.',
'ship_addr1': '1300 Kamato Road',
'ship_city': 'Mississauga',
'ship_code': 'L4W2N2',
'ship_country': 'CA',
'ship_name': 'Mississauga',
'ship_phone': '19052121055',
'ship_state': 'ON',
'shipment_description': 'My Custom Text',
'shipper': 'Mississauga',
'test': True,
'to_addr1': '2043 Forest Street',
'to_attention_name': 'QC',
'to_city': 'Jacksonville',
'to_code': '32204',
'to_company': 'Urban Inspirations',
'to_country': 'US',
'to_name': 'US Jacksonville',
'to_phone': '9042887732',
'to_state': 'FL',
'weight_unit': 'KG'}}
)
rs.request(
{"action"=>"SubmitShipment",
"carrier"=>"Purolator",
"params"=>
{"carrier"=>"Purolator",
"from_addr1"=>"1300 Kamato Road",
"from_city"=>"Mississauga",
"from_code"=>"L4W2N2",
"from_country"=>"CA",
"from_name"=>"Mississauga",
"from_phone"=>"19052121055",
"from_state"=>"ON",
"image_type"=>"PDF",
"length_unit"=>"CM",
"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",
"commodity_code"=>"55"}],
"packages"=>
[{"height"=>11,
"length"=>11,
"reference_code"=>"IN",
"reference_value"=>"1234567890 | CUST_NO | 4567890",
"weight"=>0.5,
"width"=>9}],
"residential"=>true,
"service"=>"PurolatorGroundU.S.",
"ship_addr1"=>"1300 Kamato Road",
"ship_city"=>"Mississauga",
"ship_code"=>"L4W2N2",
"ship_country"=>"CA",
"ship_name"=>"Mississauga",
"ship_phone"=>"19052121055",
"ship_state"=>"ON",
"shipment_description"=>"My Custom Text",
"shipper"=>"Mississauga",
"test"=>true,
"to_addr1"=>"2043 Forest Street",
"to_attention_name"=>"QC",
"to_city"=>"Jacksonville",
"to_code"=>"32204",
"to_company"=>"Urban Inspirations",
"to_country"=>"US",
"to_name"=>"US Jacksonville",
"to_phone"=>"9042887732",
"to_state"=>"FL",
"weight_unit"=>"KG"}}
)
rocketshipit.request(
{
"action": "SubmitShipment",
"carrier": "Purolator",
"params": {
"carrier": "Purolator",
"from_addr1": "1300 Kamato Road",
"from_city": "Mississauga",
"from_code": "L4W2N2",
"from_country": "CA",
"from_name": "Mississauga",
"from_phone": "19052121055",
"from_state": "ON",
"image_type": "PDF",
"length_unit": "CM",
"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",
"commodity_code": "55"
}
],
"packages": [
{
"height": 11,
"length": 11,
"reference_code": "IN",
"reference_value": "1234567890 | CUST_NO | 4567890",
"weight": 0.5,
"width": 9
}
],
"residential": true,
"service": "PurolatorGroundU.S.",
"ship_addr1": "1300 Kamato Road",
"ship_city": "Mississauga",
"ship_code": "L4W2N2",
"ship_country": "CA",
"ship_name": "Mississauga",
"ship_phone": "19052121055",
"ship_state": "ON",
"shipment_description": "My Custom Text",
"shipper": "Mississauga",
"test": true,
"to_addr1": "2043 Forest Street",
"to_attention_name": "QC",
"to_city": "Jacksonville",
"to_code": "32204",
"to_company": "Urban Inspirations",
"to_country": "US",
"to_name": "US Jacksonville",
"to_phone": "9042887732",
"to_state": "FL",
"weight_unit": "KG"
}
}
)
Purolator - Label Saturday Delivery
{
"carrier": "Purolator",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_API_USER_TOKEN",
"saturday_delivery": true,
"packages": [
{
"weight": 4,
"length": 7,
"width": 5,
"height": 5
}
],
"service": "PurolatorGround",
"shipper": "RocketShipIt",
"ship_addr1": "5048 264 St",
"ship_city": "Aldergrove",
"ship_state": "BC",
"ship_code": "V4W 1N7",
"ship_phone": "1231231234",
"ship_country": "CA",
"to_name": "John Doe",
"to_addr1": "5048 264 St, Aldergrove",
"to_state": "BC",
"to_city": "Aldergrove",
"to_code": "V4W 1N7",
"to_country": "CA",
"image_type": "PDF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'Purolator',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'key' => 'YOUR_API_USER_TOKEN',
'saturday_delivery' => true,
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'width' => 5,
'height' => 5,
),
),
'service' => 'PurolatorGround',
'shipper' => 'RocketShipIt',
'ship_addr1' => '5048 264 St',
'ship_city' => 'Aldergrove',
'ship_state' => 'BC',
'ship_code' => 'V4W 1N7',
'ship_phone' => '1231231234',
'ship_country' => 'CA',
'to_name' => 'John Doe',
'to_addr1' => '5048 264 St, Aldergrove',
'to_state' => 'BC',
'to_city' => 'Aldergrove',
'to_code' => 'V4W 1N7',
'to_country' => 'CA',
'image_type' => 'PDF',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'Purolator',
'params': {'image_type': 'PDF',
'key': 'YOUR_API_USER_TOKEN',
'packages': [{'height': 5, 'length': 7, 'weight': 4, 'width': 5}],
'password': 'YOUR_PASSWORD',
'saturday_delivery': True,
'service': 'PurolatorGround',
'ship_addr1': '5048 264 St',
'ship_city': 'Aldergrove',
'ship_code': 'V4W 1N7',
'ship_country': 'CA',
'ship_phone': '1231231234',
'ship_state': 'BC',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '5048 264 St, Aldergrove',
'to_city': 'Aldergrove',
'to_code': 'V4W 1N7',
'to_country': 'CA',
'to_name': 'John Doe',
'to_state': 'BC',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"Purolator",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"key"=>"YOUR_API_USER_TOKEN",
"saturday_delivery"=>true,
"packages"=>[{"weight"=>4, "length"=>7, "width"=>5, "height"=>5}],
"service"=>"PurolatorGround",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"5048 264 St",
"ship_city"=>"Aldergrove",
"ship_state"=>"BC",
"ship_code"=>"V4W 1N7",
"ship_phone"=>"1231231234",
"ship_country"=>"CA",
"to_name"=>"John Doe",
"to_addr1"=>"5048 264 St, Aldergrove",
"to_state"=>"BC",
"to_city"=>"Aldergrove",
"to_code"=>"V4W 1N7",
"to_country"=>"CA",
"image_type"=>"PDF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "Purolator",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_API_USER_TOKEN",
"saturday_delivery": true,
"packages": [
{
"weight": 4,
"length": 7,
"width": 5,
"height": 5
}
],
"service": "PurolatorGround",
"shipper": "RocketShipIt",
"ship_addr1": "5048 264 St",
"ship_city": "Aldergrove",
"ship_state": "BC",
"ship_code": "V4W 1N7",
"ship_phone": "1231231234",
"ship_country": "CA",
"to_name": "John Doe",
"to_addr1": "5048 264 St, Aldergrove",
"to_state": "BC",
"to_city": "Aldergrove",
"to_code": "V4W 1N7",
"to_country": "CA",
"image_type": "PDF",
"test": true
}
}
)
Purolator - Label Signature Required
{
"carrier": "Purolator",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_API_USER_TOKEN",
"packages": [
{
"weight": 4,
"length": 7,
"width": 5,
"height": 5,
"signature_type": "DIRECT"
}
],
"service": "PurolatorGround",
"shipper": "RocketShipIt",
"ship_addr1": "5048 264 St",
"ship_city": "Aldergrove",
"ship_state": "BC",
"ship_code": "V4W 1N7",
"ship_phone": "1231231234",
"ship_country": "CA",
"to_name": "John Doe",
"to_addr1": "5048 264 St, Aldergrove",
"to_state": "BC",
"to_city": "Aldergrove",
"to_code": "V4W 1N7",
"to_country": "CA",
"image_type": "PDF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'Purolator',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'key' => 'YOUR_API_USER_TOKEN',
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'width' => 5,
'height' => 5,
'signature_type' => 'DIRECT',
),
),
'service' => 'PurolatorGround',
'shipper' => 'RocketShipIt',
'ship_addr1' => '5048 264 St',
'ship_city' => 'Aldergrove',
'ship_state' => 'BC',
'ship_code' => 'V4W 1N7',
'ship_phone' => '1231231234',
'ship_country' => 'CA',
'to_name' => 'John Doe',
'to_addr1' => '5048 264 St, Aldergrove',
'to_state' => 'BC',
'to_city' => 'Aldergrove',
'to_code' => 'V4W 1N7',
'to_country' => 'CA',
'image_type' => 'PDF',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'Purolator',
'params': {'image_type': 'PDF',
'key': 'YOUR_API_USER_TOKEN',
'packages': [{'height': 5,
'length': 7,
'signature_type': 'DIRECT',
'weight': 4,
'width': 5}],
'password': 'YOUR_PASSWORD',
'service': 'PurolatorGround',
'ship_addr1': '5048 264 St',
'ship_city': 'Aldergrove',
'ship_code': 'V4W 1N7',
'ship_country': 'CA',
'ship_phone': '1231231234',
'ship_state': 'BC',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '5048 264 St, Aldergrove',
'to_city': 'Aldergrove',
'to_code': 'V4W 1N7',
'to_country': 'CA',
'to_name': 'John Doe',
'to_state': 'BC',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"Purolator",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"key"=>"YOUR_API_USER_TOKEN",
"packages"=>
[{"weight"=>4,
"length"=>7,
"width"=>5,
"height"=>5,
"signature_type"=>"DIRECT"}],
"service"=>"PurolatorGround",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"5048 264 St",
"ship_city"=>"Aldergrove",
"ship_state"=>"BC",
"ship_code"=>"V4W 1N7",
"ship_phone"=>"1231231234",
"ship_country"=>"CA",
"to_name"=>"John Doe",
"to_addr1"=>"5048 264 St, Aldergrove",
"to_state"=>"BC",
"to_city"=>"Aldergrove",
"to_code"=>"V4W 1N7",
"to_country"=>"CA",
"image_type"=>"PDF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "Purolator",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_API_USER_TOKEN",
"packages": [
{
"weight": 4,
"length": 7,
"width": 5,
"height": 5,
"signature_type": "DIRECT"
}
],
"service": "PurolatorGround",
"shipper": "RocketShipIt",
"ship_addr1": "5048 264 St",
"ship_city": "Aldergrove",
"ship_state": "BC",
"ship_code": "V4W 1N7",
"ship_phone": "1231231234",
"ship_country": "CA",
"to_name": "John Doe",
"to_addr1": "5048 264 St, Aldergrove",
"to_state": "BC",
"to_city": "Aldergrove",
"to_code": "V4W 1N7",
"to_country": "CA",
"image_type": "PDF",
"test": true
}
}
)
Purolator - Label Third Party Billing
{
"carrier": "Purolator",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_API_USER_TOKEN",
"billing": [
{
"type": "transportation",
"payment_type": "third_party",
"account": "abc123"
}
],
"packages": [
{
"weight": 4,
"length": 7,
"width": 5,
"height": 5
}
],
"service": "PurolatorGround",
"shipper": "RocketShipIt",
"ship_addr1": "5048 264 St",
"ship_city": "Aldergrove",
"ship_state": "BC",
"ship_code": "V4W 1N7",
"ship_phone": "1231231234",
"ship_country": "CA",
"to_name": "John Doe",
"to_addr1": "5048 264 St, Aldergrove",
"to_state": "BC",
"to_city": "Aldergrove",
"to_code": "V4W 1N7",
"to_country": "CA",
"image_type": "PDF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'Purolator',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'key' => 'YOUR_API_USER_TOKEN',
'billing' =>
array (
0 =>
array (
'type' => 'transportation',
'payment_type' => 'third_party',
'account' => 'abc123',
),
),
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'width' => 5,
'height' => 5,
),
),
'service' => 'PurolatorGround',
'shipper' => 'RocketShipIt',
'ship_addr1' => '5048 264 St',
'ship_city' => 'Aldergrove',
'ship_state' => 'BC',
'ship_code' => 'V4W 1N7',
'ship_phone' => '1231231234',
'ship_country' => 'CA',
'to_name' => 'John Doe',
'to_addr1' => '5048 264 St, Aldergrove',
'to_state' => 'BC',
'to_city' => 'Aldergrove',
'to_code' => 'V4W 1N7',
'to_country' => 'CA',
'image_type' => 'PDF',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'Purolator',
'params': {'billing': [{'account': 'abc123',
'payment_type': 'third_party',
'type': 'transportation'}],
'image_type': 'PDF',
'key': 'YOUR_API_USER_TOKEN',
'packages': [{'height': 5, 'length': 7, 'weight': 4, 'width': 5}],
'password': 'YOUR_PASSWORD',
'service': 'PurolatorGround',
'ship_addr1': '5048 264 St',
'ship_city': 'Aldergrove',
'ship_code': 'V4W 1N7',
'ship_country': 'CA',
'ship_phone': '1231231234',
'ship_state': 'BC',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '5048 264 St, Aldergrove',
'to_city': 'Aldergrove',
'to_code': 'V4W 1N7',
'to_country': 'CA',
'to_name': 'John Doe',
'to_state': 'BC',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"Purolator",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"key"=>"YOUR_API_USER_TOKEN",
"billing"=>
[{"type"=>"transportation",
"payment_type"=>"third_party",
"account"=>"abc123"}],
"packages"=>[{"weight"=>4, "length"=>7, "width"=>5, "height"=>5}],
"service"=>"PurolatorGround",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"5048 264 St",
"ship_city"=>"Aldergrove",
"ship_state"=>"BC",
"ship_code"=>"V4W 1N7",
"ship_phone"=>"1231231234",
"ship_country"=>"CA",
"to_name"=>"John Doe",
"to_addr1"=>"5048 264 St, Aldergrove",
"to_state"=>"BC",
"to_city"=>"Aldergrove",
"to_code"=>"V4W 1N7",
"to_country"=>"CA",
"image_type"=>"PDF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "Purolator",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_API_USER_TOKEN",
"billing": [
{
"type": "transportation",
"payment_type": "third_party",
"account": "abc123"
}
],
"packages": [
{
"weight": 4,
"length": 7,
"width": 5,
"height": 5
}
],
"service": "PurolatorGround",
"shipper": "RocketShipIt",
"ship_addr1": "5048 264 St",
"ship_city": "Aldergrove",
"ship_state": "BC",
"ship_code": "V4W 1N7",
"ship_phone": "1231231234",
"ship_country": "CA",
"to_name": "John Doe",
"to_addr1": "5048 264 St, Aldergrove",
"to_state": "BC",
"to_city": "Aldergrove",
"to_code": "V4W 1N7",
"to_country": "CA",
"image_type": "PDF",
"test": true
}
}
)
Purolator - Label with References
{
"carrier": "Purolator",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_API_USER_TOKEN",
"packages": [
{
"reference_value": "test",
"reference_value2": "test2",
"reference_value3": "test3",
"weight": 4,
"length": 7,
"width": 5,
"height": 5
}
],
"service": "PurolatorGround",
"shipper": "RocketShipIt",
"ship_addr1": "5048 264 St",
"ship_city": "Aldergrove",
"ship_state": "BC",
"ship_code": "V4W 1N7",
"ship_phone": "1231231234",
"ship_country": "CA",
"to_name": "John Doe",
"to_addr1": "5048 264 St, Aldergrove",
"to_state": "BC",
"to_city": "Aldergrove",
"to_code": "V4W 1N7",
"to_country": "CA",
"image_type": "PDF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'Purolator',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'key' => 'YOUR_API_USER_TOKEN',
'packages' =>
array (
0 =>
array (
'reference_value' => 'test',
'reference_value2' => 'test2',
'reference_value3' => 'test3',
'weight' => 4,
'length' => 7,
'width' => 5,
'height' => 5,
),
),
'service' => 'PurolatorGround',
'shipper' => 'RocketShipIt',
'ship_addr1' => '5048 264 St',
'ship_city' => 'Aldergrove',
'ship_state' => 'BC',
'ship_code' => 'V4W 1N7',
'ship_phone' => '1231231234',
'ship_country' => 'CA',
'to_name' => 'John Doe',
'to_addr1' => '5048 264 St, Aldergrove',
'to_state' => 'BC',
'to_city' => 'Aldergrove',
'to_code' => 'V4W 1N7',
'to_country' => 'CA',
'image_type' => 'PDF',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'Purolator',
'params': {'image_type': 'PDF',
'key': 'YOUR_API_USER_TOKEN',
'packages': [{'height': 5,
'length': 7,
'reference_value': 'test',
'reference_value2': 'test2',
'reference_value3': 'test3',
'weight': 4,
'width': 5}],
'password': 'YOUR_PASSWORD',
'service': 'PurolatorGround',
'ship_addr1': '5048 264 St',
'ship_city': 'Aldergrove',
'ship_code': 'V4W 1N7',
'ship_country': 'CA',
'ship_phone': '1231231234',
'ship_state': 'BC',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '5048 264 St, Aldergrove',
'to_city': 'Aldergrove',
'to_code': 'V4W 1N7',
'to_country': 'CA',
'to_name': 'John Doe',
'to_state': 'BC',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"Purolator",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"key"=>"YOUR_API_USER_TOKEN",
"packages"=>
[{"reference_value"=>"test",
"reference_value2"=>"test2",
"reference_value3"=>"test3",
"weight"=>4,
"length"=>7,
"width"=>5,
"height"=>5}],
"service"=>"PurolatorGround",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"5048 264 St",
"ship_city"=>"Aldergrove",
"ship_state"=>"BC",
"ship_code"=>"V4W 1N7",
"ship_phone"=>"1231231234",
"ship_country"=>"CA",
"to_name"=>"John Doe",
"to_addr1"=>"5048 264 St, Aldergrove",
"to_state"=>"BC",
"to_city"=>"Aldergrove",
"to_code"=>"V4W 1N7",
"to_country"=>"CA",
"image_type"=>"PDF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "Purolator",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_API_USER_TOKEN",
"packages": [
{
"reference_value": "test",
"reference_value2": "test2",
"reference_value3": "test3",
"weight": 4,
"length": 7,
"width": 5,
"height": 5
}
],
"service": "PurolatorGround",
"shipper": "RocketShipIt",
"ship_addr1": "5048 264 St",
"ship_city": "Aldergrove",
"ship_state": "BC",
"ship_code": "V4W 1N7",
"ship_phone": "1231231234",
"ship_country": "CA",
"to_name": "John Doe",
"to_addr1": "5048 264 St, Aldergrove",
"to_state": "BC",
"to_city": "Aldergrove",
"to_code": "V4W 1N7",
"to_country": "CA",
"image_type": "PDF",
"test": true
}
}
)
Purolator - Rates
{
"carrier": "purolator",
"action": "GetAllRates",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_API_USER_TOKEN",
"test": true,
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5,
"packaging_type": "CustomerPackaging"
}
],
"ship_city": "BELLEVILLE",
"ship_code": "K8N5W6",
"to_country": "CA",
"to_code": "V5K0A1"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'purolator',
'action' => 'GetAllRates',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'key' => 'YOUR_API_USER_TOKEN',
'test' => true,
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 5,
'width' => 5,
'height' => 5,
'packaging_type' => 'CustomerPackaging',
),
),
'ship_city' => 'BELLEVILLE',
'ship_code' => 'K8N5W6',
'to_country' => 'CA',
'to_code' => 'V5K0A1',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'purolator',
'params': {'key': 'YOUR_API_USER_TOKEN',
'packages': [{'height': 5,
'length': 5,
'packaging_type': 'CustomerPackaging',
'weight': 5,
'width': 5}],
'password': 'YOUR_PASSWORD',
'ship_city': 'BELLEVILLE',
'ship_code': 'K8N5W6',
'test': True,
'to_code': 'V5K0A1',
'to_country': 'CA',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"purolator",
"action"=>"GetAllRates",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"key"=>"YOUR_API_USER_TOKEN",
"test"=>true,
"packages"=>
[{"weight"=>5,
"length"=>5,
"width"=>5,
"height"=>5,
"packaging_type"=>"CustomerPackaging"}],
"ship_city"=>"BELLEVILLE",
"ship_code"=>"K8N5W6",
"to_country"=>"CA",
"to_code"=>"V5K0A1"}}
)
rocketshipit.request(
{
"carrier": "purolator",
"action": "GetAllRates",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_API_USER_TOKEN",
"test": true,
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5,
"packaging_type": "CustomerPackaging"
}
],
"ship_city": "BELLEVILLE",
"ship_code": "K8N5W6",
"to_country": "CA",
"to_code": "V5K0A1"
}
}
)
Purolator - Tracking
{
"carrier": "purolator",
"action": "Track",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_API_USER_TOKEN",
"tracking_number": "1Z12345E0205271688",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'purolator',
'action' => 'Track',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'key' => 'YOUR_API_USER_TOKEN',
'tracking_number' => '1Z12345E0205271688',
'test' => true,
),
)
);
rs.request(
{'action': 'Track',
'carrier': 'purolator',
'params': {'key': 'YOUR_API_USER_TOKEN',
'password': 'YOUR_PASSWORD',
'test': True,
'tracking_number': '1Z12345E0205271688',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"purolator",
"action"=>"Track",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"key"=>"YOUR_API_USER_TOKEN",
"tracking_number"=>"1Z12345E0205271688",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "purolator",
"action": "Track",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_API_USER_TOKEN",
"tracking_number": "1Z12345E0205271688",
"test": true
}
}
)
Purolator - Void
{
"carrier": "Purolator",
"action": "VoidShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_API_USER_TOKEN",
"shipment_id": "abc123",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'Purolator',
'action' => 'VoidShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'key' => 'YOUR_API_USER_TOKEN',
'shipment_id' => 'abc123',
'test' => true,
),
)
);
rs.request(
{'action': 'VoidShipment',
'carrier': 'Purolator',
'params': {'key': 'YOUR_API_USER_TOKEN',
'password': 'YOUR_PASSWORD',
'shipment_id': 'abc123',
'test': True,
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"Purolator",
"action"=>"VoidShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"key"=>"YOUR_API_USER_TOKEN",
"shipment_id"=>"abc123",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "Purolator",
"action": "VoidShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_API_USER_TOKEN",
"shipment_id": "abc123",
"test": true
}
}
)
Royal Mail - Label Domestic
{
"carrier": "RoyalMail",
"action": "SubmitShipment",
"params": {
"application_id": "",
"client_id": "",
"client_secret": "",
"username": "",
"password": "",
"packages": [
{
"weight": 5,
"length": 7
},
{
"weight": 5,
"length": 7
}
],
"service": "1",
"service_offering": "CRL",
"service_format": "P",
"to_name": "John Doe",
"to_email": "john.doe@email.com",
"to_company": "Test Department",
"to_addr1": "6 Sovereign Road",
"to_addr2": "#103",
"to_city": "Birmingham",
"to_code": "B30 3HN",
"to_country": "GB",
"to_phone": "004407870701234",
"reference_value": "DN123456",
"image_type": "GIF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'RoyalMail',
'action' => 'SubmitShipment',
'params' =>
array (
'application_id' => '',
'client_id' => '',
'client_secret' => '',
'username' => '',
'password' => '',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 7,
),
1 =>
array (
'weight' => 5,
'length' => 7,
),
),
'service' => '1',
'service_offering' => 'CRL',
'service_format' => 'P',
'to_name' => 'John Doe',
'to_email' => 'john.doe@email.com',
'to_company' => 'Test Department',
'to_addr1' => '6 Sovereign Road',
'to_addr2' => '#103',
'to_city' => 'Birmingham',
'to_code' => 'B30 3HN',
'to_country' => 'GB',
'to_phone' => '004407870701234',
'reference_value' => 'DN123456',
'image_type' => 'GIF',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'RoyalMail',
'params': {'application_id': '',
'client_id': '',
'client_secret': '',
'image_type': 'GIF',
'packages': [{'length': 7, 'weight': 5},
{'length': 7, 'weight': 5}],
'password': '',
'reference_value': 'DN123456',
'service': '1',
'service_format': 'P',
'service_offering': 'CRL',
'test': True,
'to_addr1': '6 Sovereign Road',
'to_addr2': '#103',
'to_city': 'Birmingham',
'to_code': 'B30 3HN',
'to_company': 'Test Department',
'to_country': 'GB',
'to_email': 'john.doe@email.com',
'to_name': 'John Doe',
'to_phone': '004407870701234',
'username': ''}}
)
rs.request(
{"carrier"=>"RoyalMail",
"action"=>"SubmitShipment",
"params"=>
{"application_id"=>"",
"client_id"=>"",
"client_secret"=>"",
"username"=>"",
"password"=>"",
"packages"=>[{"weight"=>5, "length"=>7}, {"weight"=>5, "length"=>7}],
"service"=>"1",
"service_offering"=>"CRL",
"service_format"=>"P",
"to_name"=>"John Doe",
"to_email"=>"john.doe@email.com",
"to_company"=>"Test Department",
"to_addr1"=>"6 Sovereign Road",
"to_addr2"=>"#103",
"to_city"=>"Birmingham",
"to_code"=>"B30 3HN",
"to_country"=>"GB",
"to_phone"=>"004407870701234",
"reference_value"=>"DN123456",
"image_type"=>"GIF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "RoyalMail",
"action": "SubmitShipment",
"params": {
"application_id": "",
"client_id": "",
"client_secret": "",
"username": "",
"password": "",
"packages": [
{
"weight": 5,
"length": 7
},
{
"weight": 5,
"length": 7
}
],
"service": "1",
"service_offering": "CRL",
"service_format": "P",
"to_name": "John Doe",
"to_email": "john.doe@email.com",
"to_company": "Test Department",
"to_addr1": "6 Sovereign Road",
"to_addr2": "#103",
"to_city": "Birmingham",
"to_code": "B30 3HN",
"to_country": "GB",
"to_phone": "004407870701234",
"reference_value": "DN123456",
"image_type": "GIF",
"test": true
}
}
)
Spee-Dee - Rates
{
"carrier": "SpeeDee",
"action": "GetAllRates",
"params": {
"account_number": "1011",
"packages": [
{
"weight": 6
}
],
"ship_code": "56301",
"to_code": "60605"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'SpeeDee',
'action' => 'GetAllRates',
'params' =>
array (
'account_number' => '1011',
'packages' =>
array (
0 =>
array (
'weight' => 6,
),
),
'ship_code' => '56301',
'to_code' => '60605',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'SpeeDee',
'params': {'account_number': '1011',
'packages': [{'weight': 6}],
'ship_code': '56301',
'to_code': '60605'}}
)
rs.request(
{"carrier"=>"SpeeDee",
"action"=>"GetAllRates",
"params"=>
{"account_number"=>"1011",
"packages"=>[{"weight"=>6}],
"ship_code"=>"56301",
"to_code"=>"60605"}}
)
rocketshipit.request(
{
"carrier": "SpeeDee",
"action": "GetAllRates",
"params": {
"account_number": "1011",
"packages": [
{
"weight": 6
}
],
"ship_code": "56301",
"to_code": "60605"
}
}
)
{
"carrier": "stamps",
"action": "AddressValidate",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"test": true,
"to_name": "John Doe",
"to_addr1": "123 Dont ship st",
"to_state": "MT",
"to_city": "Whitehall",
"to_code": "59759"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'stamps',
'action' => 'AddressValidate',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'test' => true,
'to_name' => 'John Doe',
'to_addr1' => '123 Dont ship st',
'to_state' => 'MT',
'to_city' => 'Whitehall',
'to_code' => '59759',
),
)
);
rs.request(
{'action': 'AddressValidate',
'carrier': 'stamps',
'params': {'password': 'YOUR_PASSWORD',
'test': True,
'to_addr1': '123 Dont ship st',
'to_city': 'Whitehall',
'to_code': '59759',
'to_name': 'John Doe',
'to_state': 'MT',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"stamps",
"action"=>"AddressValidate",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"test"=>true,
"to_name"=>"John Doe",
"to_addr1"=>"123 Dont ship st",
"to_state"=>"MT",
"to_city"=>"Whitehall",
"to_code"=>"59759"}}
)
rocketshipit.request(
{
"carrier": "stamps",
"action": "AddressValidate",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"test": true,
"to_name": "John Doe",
"to_addr1": "123 Dont ship st",
"to_state": "MT",
"to_city": "Whitehall",
"to_code": "59759"
}
}
)
{
"carrier": "stamps",
"action": "CreateManifest",
"params": {
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"shipment_ids": [
"72176f7e-2679-4dad-9e6b-c71c76b1eb9e"
],
"test": false
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'stamps',
'action' => 'CreateManifest',
'params' =>
array (
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'shipment_ids' =>
array (
0 => '72176f7e-2679-4dad-9e6b-c71c76b1eb9e',
),
'test' => false,
),
)
);
rs.request(
{'action': 'CreateManifest',
'carrier': 'stamps',
'params': {'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipment_ids': ['72176f7e-2679-4dad-9e6b-c71c76b1eb9e'],
'shipper': 'RocketShipIt',
'test': False}}
)
rs.request(
{"carrier"=>"stamps",
"action"=>"CreateManifest",
"params"=>
{"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"shipment_ids"=>["72176f7e-2679-4dad-9e6b-c71c76b1eb9e"],
"test"=>false}}
)
rocketshipit.request(
{
"carrier": "stamps",
"action": "CreateManifest",
"params": {
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"shipment_ids": [
"72176f7e-2679-4dad-9e6b-c71c76b1eb9e"
],
"test": false
}
}
)
{
"carrier": "stamps",
"action": "CreateManifest",
"params": {
"print_instructions": true,
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"ship_date": "2016-06-28",
"test": false
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'stamps',
'action' => 'CreateManifest',
'params' =>
array (
'print_instructions' => true,
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'ship_date' => '2016-06-28',
'test' => false,
),
)
);
rs.request(
{'action': 'CreateManifest',
'carrier': 'stamps',
'params': {'print_instructions': True,
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_date': '2016-06-28',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': False}}
)
rs.request(
{"carrier"=>"stamps",
"action"=>"CreateManifest",
"params"=>
{"print_instructions"=>true,
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"ship_date"=>"2016-06-28",
"test"=>false}}
)
rocketshipit.request(
{
"carrier": "stamps",
"action": "CreateManifest",
"params": {
"print_instructions": true,
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"ship_date": "2016-06-28",
"test": false
}
}
)
{
"carrier": "stamps",
"action": "AccountInfo",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'stamps',
'action' => 'AccountInfo',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'test' => true,
),
)
);
rs.request(
{'action': 'AccountInfo',
'carrier': 'stamps',
'params': {'password': 'YOUR_PASSWORD',
'test': True,
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"stamps",
"action"=>"AccountInfo",
"params"=>
{"username"=>"YOUR_USERNAME", "password"=>"YOUR_PASSWORD", "test"=>true}}
)
rocketshipit.request(
{
"carrier": "stamps",
"action": "AccountInfo",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"test": true
}
}
)
{
"carrier": "stamps",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 5,
"length": 6,
"width": 7,
"height": 8,
"packaging_type": "Package"
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Dont Ship st",
"to_state": "MT",
"to_city": "Whitehall",
"to_code": "59759",
"test": true,
"service": "US-PM",
"reference_value": "\treference value 1\n second line\nthird reference line"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'stamps',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 6,
'width' => 7,
'height' => 8,
'packaging_type' => 'Package',
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Dont Ship st',
'to_state' => 'MT',
'to_city' => 'Whitehall',
'to_code' => '59759',
'test' => true,
'service' => 'US-PM',
'reference_value' => ' reference value 1
second line
third reference line',
),
)
);
rs.request(
Traceback (most recent call last):
File "<string>", line 3, in <module>
File "/usr/lib/python3.11/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
^^^^^^^^^^^^^^^^^^^^^^
json.decoder.JSONDecodeError: Invalid control character at: line 29 column 25 (char 674)
)
rs.request(
{"carrier"=>"stamps",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"packages"=>
[{"weight"=>5,
"length"=>6,
"width"=>7,
"height"=>8,
"packaging_type"=>"Package"}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Dont Ship st",
"to_state"=>"MT",
"to_city"=>"Whitehall",
"to_code"=>"59759",
"test"=>true,
"service"=>"US-PM",
"reference_value"=>
"\treference value 1\n" + " second line\n" + "third reference line"}}
)
rocketshipit.request(
{
"carrier": "stamps",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 5,
"length": 6,
"width": 7,
"height": 8,
"packaging_type": "Package"
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Dont Ship st",
"to_state": "MT",
"to_city": "Whitehall",
"to_code": "59759",
"test": true,
"service": "US-PM",
"reference_value": "\treference value 1\n second line\nthird reference line"
}
}
)
{
"carrier": "stamps",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 5,
"length": 6,
"width": 7,
"height": 8,
"packaging_type": "Package"
},
{
"weight": 5,
"length": 6,
"width": 7,
"height": 8,
"packaging_type": "Package"
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Dont ship",
"to_state": "MT",
"to_city": "Whitehall",
"to_code": "59759",
"test": true,
"service": "US-PM",
"reference_value": "asdf"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'stamps',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 6,
'width' => 7,
'height' => 8,
'packaging_type' => 'Package',
),
1 =>
array (
'weight' => 5,
'length' => 6,
'width' => 7,
'height' => 8,
'packaging_type' => 'Package',
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Dont ship',
'to_state' => 'MT',
'to_city' => 'Whitehall',
'to_code' => '59759',
'test' => true,
'service' => 'US-PM',
'reference_value' => 'asdf',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'stamps',
'params': {'packages': [{'height': 8,
'length': 6,
'packaging_type': 'Package',
'weight': 5,
'width': 7},
{'height': 8,
'length': 6,
'packaging_type': 'Package',
'weight': 5,
'width': 7}],
'password': 'YOUR_PASSWORD',
'reference_value': 'asdf',
'service': 'US-PM',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Dont ship',
'to_city': 'Whitehall',
'to_code': '59759',
'to_name': 'John Doe',
'to_state': 'MT',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"stamps",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"packages"=>
[{"weight"=>5,
"length"=>6,
"width"=>7,
"height"=>8,
"packaging_type"=>"Package"},
{"weight"=>5,
"length"=>6,
"width"=>7,
"height"=>8,
"packaging_type"=>"Package"}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Dont ship",
"to_state"=>"MT",
"to_city"=>"Whitehall",
"to_code"=>"59759",
"test"=>true,
"service"=>"US-PM",
"reference_value"=>"asdf"}}
)
rocketshipit.request(
{
"carrier": "stamps",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 5,
"length": 6,
"width": 7,
"height": 8,
"packaging_type": "Package"
},
{
"weight": 5,
"length": 6,
"width": 7,
"height": 8,
"packaging_type": "Package"
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Dont ship",
"to_state": "MT",
"to_city": "Whitehall",
"to_code": "59759",
"test": true,
"service": "US-PM",
"reference_value": "asdf"
}
}
)
{
"carrier": "stamps",
"action": "SubmitShipment",
"params": {
"username": "",
"password": "",
"packages": [
{
"weight": 5,
"length": 6,
"width": 7,
"height": 8,
"packaging_type": "Package"
}
],
"customs": [
{
"customs_description": "my shipment",
"customs_quantity": 1,
"customs_weight": 2.5,
"customs_value": 5.0,
"customs_hs_tariff": "",
"customs_origin_country": "US"
}
],
"customs_value": 200,
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "CPT JOHN DOE",
"to_addr1": "PSC 556 BOX 177",
"to_state": "AP",
"to_city": "APO",
"to_code": "96386",
"to_phone": "1231231234",
"to_country": "US",
"test": true,
"service": "US-PM",
"reference_value": "asdf",
"customs_content_type": "Commercial Sample"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'stamps',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => '',
'password' => '',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 6,
'width' => 7,
'height' => 8,
'packaging_type' => 'Package',
),
),
'customs' =>
array (
0 =>
array (
'customs_description' => 'my shipment',
'customs_quantity' => 1,
'customs_weight' => 2.5,
'customs_value' => 5.0,
'customs_hs_tariff' => '',
'customs_origin_country' => 'US',
),
),
'customs_value' => 200,
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'CPT JOHN DOE',
'to_addr1' => 'PSC 556 BOX 177',
'to_state' => 'AP',
'to_city' => 'APO',
'to_code' => '96386',
'to_phone' => '1231231234',
'to_country' => 'US',
'test' => true,
'service' => 'US-PM',
'reference_value' => 'asdf',
'customs_content_type' => 'Commercial Sample',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'stamps',
'params': {'customs': [{'customs_description': 'my shipment',
'customs_hs_tariff': '',
'customs_origin_country': 'US',
'customs_quantity': 1,
'customs_value': 5.0,
'customs_weight': 2.5}],
'customs_content_type': 'Commercial Sample',
'customs_value': 200,
'packages': [{'height': 8,
'length': 6,
'packaging_type': 'Package',
'weight': 5,
'width': 7}],
'password': '',
'reference_value': 'asdf',
'service': 'US-PM',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': 'PSC 556 BOX 177',
'to_city': 'APO',
'to_code': '96386',
'to_country': 'US',
'to_name': 'CPT JOHN DOE',
'to_phone': '1231231234',
'to_state': 'AP',
'username': ''}}
)
rs.request(
{"carrier"=>"stamps",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"",
"password"=>"",
"packages"=>
[{"weight"=>5,
"length"=>6,
"width"=>7,
"height"=>8,
"packaging_type"=>"Package"}],
"customs"=>
[{"customs_description"=>"my shipment",
"customs_quantity"=>1,
"customs_weight"=>2.5,
"customs_value"=>5.0,
"customs_hs_tariff"=>"",
"customs_origin_country"=>"US"}],
"customs_value"=>200,
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"CPT JOHN DOE",
"to_addr1"=>"PSC 556 BOX 177",
"to_state"=>"AP",
"to_city"=>"APO",
"to_code"=>"96386",
"to_phone"=>"1231231234",
"to_country"=>"US",
"test"=>true,
"service"=>"US-PM",
"reference_value"=>"asdf",
"customs_content_type"=>"Commercial Sample"}}
)
rocketshipit.request(
{
"carrier": "stamps",
"action": "SubmitShipment",
"params": {
"username": "",
"password": "",
"packages": [
{
"weight": 5,
"length": 6,
"width": 7,
"height": 8,
"packaging_type": "Package"
}
],
"customs": [
{
"customs_description": "my shipment",
"customs_quantity": 1,
"customs_weight": 2.5,
"customs_value": 5.0,
"customs_hs_tariff": "",
"customs_origin_country": "US"
}
],
"customs_value": 200,
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "CPT JOHN DOE",
"to_addr1": "PSC 556 BOX 177",
"to_state": "AP",
"to_city": "APO",
"to_code": "96386",
"to_phone": "1231231234",
"to_country": "US",
"test": true,
"service": "US-PM",
"reference_value": "asdf",
"customs_content_type": "Commercial Sample"
}
}
)
{
"carrier": "stamps",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 5,
"length": 6,
"width": 7,
"height": 8,
"signature_type": "ADULT",
"packaging_type": "Package"
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Dont ship st",
"to_state": "MT",
"to_city": "Whitehall",
"to_code": "59759",
"test": true,
"service": "US-PM",
"reference_value": "asdf"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'stamps',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 6,
'width' => 7,
'height' => 8,
'signature_type' => 'ADULT',
'packaging_type' => 'Package',
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Dont ship st',
'to_state' => 'MT',
'to_city' => 'Whitehall',
'to_code' => '59759',
'test' => true,
'service' => 'US-PM',
'reference_value' => 'asdf',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'stamps',
'params': {'packages': [{'height': 8,
'length': 6,
'packaging_type': 'Package',
'signature_type': 'ADULT',
'weight': 5,
'width': 7}],
'password': 'YOUR_PASSWORD',
'reference_value': 'asdf',
'service': 'US-PM',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Dont ship st',
'to_city': 'Whitehall',
'to_code': '59759',
'to_name': 'John Doe',
'to_state': 'MT',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"stamps",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"packages"=>
[{"weight"=>5,
"length"=>6,
"width"=>7,
"height"=>8,
"signature_type"=>"ADULT",
"packaging_type"=>"Package"}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Dont ship st",
"to_state"=>"MT",
"to_city"=>"Whitehall",
"to_code"=>"59759",
"test"=>true,
"service"=>"US-PM",
"reference_value"=>"asdf"}}
)
rocketshipit.request(
{
"carrier": "stamps",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 5,
"length": 6,
"width": 7,
"height": 8,
"signature_type": "ADULT",
"packaging_type": "Package"
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Dont ship st",
"to_state": "MT",
"to_city": "Whitehall",
"to_code": "59759",
"test": true,
"service": "US-PM",
"reference_value": "asdf"
}
}
)
{
"carrier": "Stamps",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 15
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"label": {
"printed_origin": {
"phone": "123-123-1234",
"name": "John Doe",
"addr1": "940 Presidio Ave",
"state": "CA",
"city": "San Francisco",
"code": "94112",
"country": "US"
}
},
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'Stamps',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 15,
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'to_phone' => '1231231234',
'packaging_type' => 'YOUR_PACKAGING',
'label' =>
array (
'printed_origin' =>
array (
'phone' => '123-123-1234',
'name' => 'John Doe',
'addr1' => '940 Presidio Ave',
'state' => 'CA',
'city' => 'San Francisco',
'code' => '94112',
'country' => 'US',
),
),
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'Stamps',
'params': {'label': {'printed_origin': {'addr1': '940 Presidio Ave',
'city': 'San Francisco',
'code': '94112',
'country': 'US',
'name': 'John Doe',
'phone': '123-123-1234',
'state': 'CA'}},
'packages': [{'weight': 15}],
'packaging_type': 'YOUR_PACKAGING',
'password': 'YOUR_PASSWORD',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'CA',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"Stamps",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"packages"=>[{"weight"=>15}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"to_phone"=>"1231231234",
"packaging_type"=>"YOUR_PACKAGING",
"label"=>
{"printed_origin"=>
{"phone"=>"123-123-1234",
"name"=>"John Doe",
"addr1"=>"940 Presidio Ave",
"state"=>"CA",
"city"=>"San Francisco",
"code"=>"94112",
"country"=>"US"}},
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "Stamps",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 15
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"label": {
"printed_origin": {
"phone": "123-123-1234",
"name": "John Doe",
"addr1": "940 Presidio Ave",
"state": "CA",
"city": "San Francisco",
"code": "94112",
"country": "US"
}
},
"test": true
}
}
)
{
"carrier": "stamps",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"notify": [
{
"email": "bob@email.com"
}
],
"packages": [
{
"weight": 5,
"length": 6,
"width": 7,
"height": 8,
"packaging_type": "Package"
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Dont ship",
"to_state": "MT",
"to_city": "Whitehall",
"to_code": "59759",
"test": true,
"service": "US-PM",
"reference_value": "asdf"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'stamps',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'notify' =>
array (
0 =>
array (
'email' => 'bob@email.com',
),
),
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 6,
'width' => 7,
'height' => 8,
'packaging_type' => 'Package',
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Dont ship',
'to_state' => 'MT',
'to_city' => 'Whitehall',
'to_code' => '59759',
'test' => true,
'service' => 'US-PM',
'reference_value' => 'asdf',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'stamps',
'params': {'notify': [{'email': 'bob@email.com'}],
'packages': [{'height': 8,
'length': 6,
'packaging_type': 'Package',
'weight': 5,
'width': 7}],
'password': 'YOUR_PASSWORD',
'reference_value': 'asdf',
'service': 'US-PM',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Dont ship',
'to_city': 'Whitehall',
'to_code': '59759',
'to_name': 'John Doe',
'to_state': 'MT',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"stamps",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"notify"=>[{"email"=>"bob@email.com"}],
"packages"=>
[{"weight"=>5,
"length"=>6,
"width"=>7,
"height"=>8,
"packaging_type"=>"Package"}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Dont ship",
"to_state"=>"MT",
"to_city"=>"Whitehall",
"to_code"=>"59759",
"test"=>true,
"service"=>"US-PM",
"reference_value"=>"asdf"}}
)
rocketshipit.request(
{
"carrier": "stamps",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"notify": [
{
"email": "bob@email.com"
}
],
"packages": [
{
"weight": 5,
"length": 6,
"width": 7,
"height": 8,
"packaging_type": "Package"
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Dont ship",
"to_state": "MT",
"to_city": "Whitehall",
"to_code": "59759",
"test": true,
"service": "US-PM",
"reference_value": "asdf"
}
}
)
Stamps.com - Label GlobalPost Economy
{
"carrier": "stamps",
"action": "SubmitShipment",
"params": {
"test": true,
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"service": "SC-GPE",
"packages": [
{
"weight": 4,
"length": 6,
"width": 7,
"height": 8,
"packaging_type": "Package"
}
],
"customs": [
{
"customs_description": "my shipment",
"customs_quantity": 1,
"customs_weight": 2.5,
"customs_value": 5.0,
"customs_hs_tariff": "",
"customs_origin_country": "US"
}
],
"customs_value": 200,
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "Toronto Zoo",
"to_addr1": "2000 Meadowvale Road",
"to_state": "MB",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_phone": "1231231234",
"to_country": "CA",
"reference_value": "asdf",
"customs_content_type": "Commercial Sample"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'stamps',
'action' => 'SubmitShipment',
'params' =>
array (
'test' => true,
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'service' => 'SC-GPE',
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 6,
'width' => 7,
'height' => 8,
'packaging_type' => 'Package',
),
),
'customs' =>
array (
0 =>
array (
'customs_description' => 'my shipment',
'customs_quantity' => 1,
'customs_weight' => 2.5,
'customs_value' => 5.0,
'customs_hs_tariff' => '',
'customs_origin_country' => 'US',
),
),
'customs_value' => 200,
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'Toronto Zoo',
'to_addr1' => '2000 Meadowvale Road',
'to_state' => 'MB',
'to_city' => 'Toronto',
'to_code' => 'M1B5K7',
'to_phone' => '1231231234',
'to_country' => 'CA',
'reference_value' => 'asdf',
'customs_content_type' => 'Commercial Sample',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'stamps',
'params': {'customs': [{'customs_description': 'my shipment',
'customs_hs_tariff': '',
'customs_origin_country': 'US',
'customs_quantity': 1,
'customs_value': 5.0,
'customs_weight': 2.5}],
'customs_content_type': 'Commercial Sample',
'customs_value': 200,
'packages': [{'height': 8,
'length': 6,
'packaging_type': 'Package',
'weight': 4,
'width': 7}],
'password': 'YOUR_PASSWORD',
'reference_value': 'asdf',
'service': 'SC-GPE',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '2000 Meadowvale Road',
'to_city': 'Toronto',
'to_code': 'M1B5K7',
'to_country': 'CA',
'to_name': 'Toronto Zoo',
'to_phone': '1231231234',
'to_state': 'MB',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"stamps",
"action"=>"SubmitShipment",
"params"=>
{"test"=>true,
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"service"=>"SC-GPE",
"packages"=>
[{"weight"=>4,
"length"=>6,
"width"=>7,
"height"=>8,
"packaging_type"=>"Package"}],
"customs"=>
[{"customs_description"=>"my shipment",
"customs_quantity"=>1,
"customs_weight"=>2.5,
"customs_value"=>5.0,
"customs_hs_tariff"=>"",
"customs_origin_country"=>"US"}],
"customs_value"=>200,
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"Toronto Zoo",
"to_addr1"=>"2000 Meadowvale Road",
"to_state"=>"MB",
"to_city"=>"Toronto",
"to_code"=>"M1B5K7",
"to_phone"=>"1231231234",
"to_country"=>"CA",
"reference_value"=>"asdf",
"customs_content_type"=>"Commercial Sample"}}
)
rocketshipit.request(
{
"carrier": "stamps",
"action": "SubmitShipment",
"params": {
"test": true,
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"service": "SC-GPE",
"packages": [
{
"weight": 4,
"length": 6,
"width": 7,
"height": 8,
"packaging_type": "Package"
}
],
"customs": [
{
"customs_description": "my shipment",
"customs_quantity": 1,
"customs_weight": 2.5,
"customs_value": 5.0,
"customs_hs_tariff": "",
"customs_origin_country": "US"
}
],
"customs_value": 200,
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "Toronto Zoo",
"to_addr1": "2000 Meadowvale Road",
"to_state": "MB",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_phone": "1231231234",
"to_country": "CA",
"reference_value": "asdf",
"customs_content_type": "Commercial Sample"
}
}
)
Stamps.com - Label Hidden Postage
{
"carrier": "stamps",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 5,
"length": 6,
"width": 7,
"height": 8,
"packaging_type": "Package"
}
],
"addons": [
"SC-A-HP"
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Dont ship st",
"to_state": "MT",
"to_city": "Whitehall",
"to_code": "59759",
"test": true,
"service": "US-PM",
"reference_value": "asdf"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'stamps',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 6,
'width' => 7,
'height' => 8,
'packaging_type' => 'Package',
),
),
'addons' =>
array (
0 => 'SC-A-HP',
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Dont ship st',
'to_state' => 'MT',
'to_city' => 'Whitehall',
'to_code' => '59759',
'test' => true,
'service' => 'US-PM',
'reference_value' => 'asdf',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'stamps',
'params': {'addons': ['SC-A-HP'],
'packages': [{'height': 8,
'length': 6,
'packaging_type': 'Package',
'weight': 5,
'width': 7}],
'password': 'YOUR_PASSWORD',
'reference_value': 'asdf',
'service': 'US-PM',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Dont ship st',
'to_city': 'Whitehall',
'to_code': '59759',
'to_name': 'John Doe',
'to_state': 'MT',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"stamps",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"packages"=>
[{"weight"=>5,
"length"=>6,
"width"=>7,
"height"=>8,
"packaging_type"=>"Package"}],
"addons"=>["SC-A-HP"],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Dont ship st",
"to_state"=>"MT",
"to_city"=>"Whitehall",
"to_code"=>"59759",
"test"=>true,
"service"=>"US-PM",
"reference_value"=>"asdf"}}
)
rocketshipit.request(
{
"carrier": "stamps",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 5,
"length": 6,
"width": 7,
"height": 8,
"packaging_type": "Package"
}
],
"addons": [
"SC-A-HP"
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Dont ship st",
"to_state": "MT",
"to_city": "Whitehall",
"to_code": "59759",
"test": true,
"service": "US-PM",
"reference_value": "asdf"
}
}
)
{
"carrier": "stamps",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"addons": [
"PG-A-INS"
],
"packages": [
{
"weight": 5,
"length": 6,
"width": 7,
"height": 8,
"packaging_type": "Package",
"insured_value": 2700
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Dont ship st",
"to_state": "MT",
"to_city": "Whitehall",
"to_code": "59759",
"test": true,
"service": "US-PM",
"reference_value": "\treference value 1\n second line\nthird reference line"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'stamps',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'addons' =>
array (
0 => 'PG-A-INS',
),
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 6,
'width' => 7,
'height' => 8,
'packaging_type' => 'Package',
'insured_value' => 2700,
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Dont ship st',
'to_state' => 'MT',
'to_city' => 'Whitehall',
'to_code' => '59759',
'test' => true,
'service' => 'US-PM',
'reference_value' => ' reference value 1
second line
third reference line',
),
)
);
rs.request(
Traceback (most recent call last):
File "<string>", line 3, in <module>
File "/usr/lib/python3.11/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
^^^^^^^^^^^^^^^^^^^^^^
json.decoder.JSONDecodeError: Invalid control character at: line 33 column 25 (char 745)
)
rs.request(
{"carrier"=>"stamps",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"addons"=>["PG-A-INS"],
"packages"=>
[{"weight"=>5,
"length"=>6,
"width"=>7,
"height"=>8,
"packaging_type"=>"Package",
"insured_value"=>2700}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Dont ship st",
"to_state"=>"MT",
"to_city"=>"Whitehall",
"to_code"=>"59759",
"test"=>true,
"service"=>"US-PM",
"reference_value"=>
"\treference value 1\n" + " second line\n" + "third reference line"}}
)
rocketshipit.request(
{
"carrier": "stamps",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"addons": [
"PG-A-INS"
],
"packages": [
{
"weight": 5,
"length": 6,
"width": 7,
"height": 8,
"packaging_type": "Package",
"insured_value": 2700
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Dont ship st",
"to_state": "MT",
"to_city": "Whitehall",
"to_code": "59759",
"test": true,
"service": "US-PM",
"reference_value": "\treference value 1\n second line\nthird reference line"
}
}
)
{
"carrier": "stamps",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 5,
"length": 6,
"width": 7,
"height": 8,
"packaging_type": "Package"
}
],
"customs": [
{
"customs_description": "my shipment",
"customs_quantity": 1,
"customs_weight": 2.5,
"customs_value": 5.0,
"customs_hs_tariff": "",
"customs_origin_country": "US"
}
],
"customs_value": 200,
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "Toronto Zoo",
"to_addr1": "2000 Meadowvale Road",
"to_state": "MB",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_phone": "1231231234",
"to_country": "CA",
"test": true,
"service": "US-PMI",
"reference_value": "asdf",
"customs_content_type": "Commercial Sample"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'stamps',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 6,
'width' => 7,
'height' => 8,
'packaging_type' => 'Package',
),
),
'customs' =>
array (
0 =>
array (
'customs_description' => 'my shipment',
'customs_quantity' => 1,
'customs_weight' => 2.5,
'customs_value' => 5.0,
'customs_hs_tariff' => '',
'customs_origin_country' => 'US',
),
),
'customs_value' => 200,
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'Toronto Zoo',
'to_addr1' => '2000 Meadowvale Road',
'to_state' => 'MB',
'to_city' => 'Toronto',
'to_code' => 'M1B5K7',
'to_phone' => '1231231234',
'to_country' => 'CA',
'test' => true,
'service' => 'US-PMI',
'reference_value' => 'asdf',
'customs_content_type' => 'Commercial Sample',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'stamps',
'params': {'customs': [{'customs_description': 'my shipment',
'customs_hs_tariff': '',
'customs_origin_country': 'US',
'customs_quantity': 1,
'customs_value': 5.0,
'customs_weight': 2.5}],
'customs_content_type': 'Commercial Sample',
'customs_value': 200,
'packages': [{'height': 8,
'length': 6,
'packaging_type': 'Package',
'weight': 5,
'width': 7}],
'password': 'YOUR_PASSWORD',
'reference_value': 'asdf',
'service': 'US-PMI',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '2000 Meadowvale Road',
'to_city': 'Toronto',
'to_code': 'M1B5K7',
'to_country': 'CA',
'to_name': 'Toronto Zoo',
'to_phone': '1231231234',
'to_state': 'MB',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"stamps",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"packages"=>
[{"weight"=>5,
"length"=>6,
"width"=>7,
"height"=>8,
"packaging_type"=>"Package"}],
"customs"=>
[{"customs_description"=>"my shipment",
"customs_quantity"=>1,
"customs_weight"=>2.5,
"customs_value"=>5.0,
"customs_hs_tariff"=>"",
"customs_origin_country"=>"US"}],
"customs_value"=>200,
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"Toronto Zoo",
"to_addr1"=>"2000 Meadowvale Road",
"to_state"=>"MB",
"to_city"=>"Toronto",
"to_code"=>"M1B5K7",
"to_phone"=>"1231231234",
"to_country"=>"CA",
"test"=>true,
"service"=>"US-PMI",
"reference_value"=>"asdf",
"customs_content_type"=>"Commercial Sample"}}
)
rocketshipit.request(
{
"carrier": "stamps",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 5,
"length": 6,
"width": 7,
"height": 8,
"packaging_type": "Package"
}
],
"customs": [
{
"customs_description": "my shipment",
"customs_quantity": 1,
"customs_weight": 2.5,
"customs_value": 5.0,
"customs_hs_tariff": "",
"customs_origin_country": "US"
}
],
"customs_value": 200,
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "Toronto Zoo",
"to_addr1": "2000 Meadowvale Road",
"to_state": "MB",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_phone": "1231231234",
"to_country": "CA",
"test": true,
"service": "US-PMI",
"reference_value": "asdf",
"customs_content_type": "Commercial Sample"
}
}
)
{
"carrier": "stamps",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"label_stock_type": "Normal4X6CP72",
"packages": [
{
"weight": 5,
"length": 6,
"width": 7,
"height": 8,
"packaging_type": "Package"
}
],
"customs": [
{
"customs_description": "my shipment",
"customs_quantity": 1,
"customs_weight": 2.5,
"customs_value": 5.0,
"customs_hs_tariff": "",
"customs_origin_country": "US"
}
],
"customs_value": 200,
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "Toronto Zoo",
"to_addr1": "2000 Meadowvale Road",
"to_state": "MB",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_phone": "1231231234",
"to_country": "CA",
"test": true,
"service": "US-PMI",
"reference_value": "asdf",
"customs_content_type": "Commercial Sample"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'stamps',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'label_stock_type' => 'Normal4X6CP72',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 6,
'width' => 7,
'height' => 8,
'packaging_type' => 'Package',
),
),
'customs' =>
array (
0 =>
array (
'customs_description' => 'my shipment',
'customs_quantity' => 1,
'customs_weight' => 2.5,
'customs_value' => 5.0,
'customs_hs_tariff' => '',
'customs_origin_country' => 'US',
),
),
'customs_value' => 200,
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'Toronto Zoo',
'to_addr1' => '2000 Meadowvale Road',
'to_state' => 'MB',
'to_city' => 'Toronto',
'to_code' => 'M1B5K7',
'to_phone' => '1231231234',
'to_country' => 'CA',
'test' => true,
'service' => 'US-PMI',
'reference_value' => 'asdf',
'customs_content_type' => 'Commercial Sample',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'stamps',
'params': {'customs': [{'customs_description': 'my shipment',
'customs_hs_tariff': '',
'customs_origin_country': 'US',
'customs_quantity': 1,
'customs_value': 5.0,
'customs_weight': 2.5}],
'customs_content_type': 'Commercial Sample',
'customs_value': 200,
'label_stock_type': 'Normal4X6CP72',
'packages': [{'height': 8,
'length': 6,
'packaging_type': 'Package',
'weight': 5,
'width': 7}],
'password': 'YOUR_PASSWORD',
'reference_value': 'asdf',
'service': 'US-PMI',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '2000 Meadowvale Road',
'to_city': 'Toronto',
'to_code': 'M1B5K7',
'to_country': 'CA',
'to_name': 'Toronto Zoo',
'to_phone': '1231231234',
'to_state': 'MB',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"stamps",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"label_stock_type"=>"Normal4X6CP72",
"packages"=>
[{"weight"=>5,
"length"=>6,
"width"=>7,
"height"=>8,
"packaging_type"=>"Package"}],
"customs"=>
[{"customs_description"=>"my shipment",
"customs_quantity"=>1,
"customs_weight"=>2.5,
"customs_value"=>5.0,
"customs_hs_tariff"=>"",
"customs_origin_country"=>"US"}],
"customs_value"=>200,
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"Toronto Zoo",
"to_addr1"=>"2000 Meadowvale Road",
"to_state"=>"MB",
"to_city"=>"Toronto",
"to_code"=>"M1B5K7",
"to_phone"=>"1231231234",
"to_country"=>"CA",
"test"=>true,
"service"=>"US-PMI",
"reference_value"=>"asdf",
"customs_content_type"=>"Commercial Sample"}}
)
rocketshipit.request(
{
"carrier": "stamps",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"label_stock_type": "Normal4X6CP72",
"packages": [
{
"weight": 5,
"length": 6,
"width": 7,
"height": 8,
"packaging_type": "Package"
}
],
"customs": [
{
"customs_description": "my shipment",
"customs_quantity": 1,
"customs_weight": 2.5,
"customs_value": 5.0,
"customs_hs_tariff": "",
"customs_origin_country": "US"
}
],
"customs_value": 200,
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "Toronto Zoo",
"to_addr1": "2000 Meadowvale Road",
"to_state": "MB",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_phone": "1231231234",
"to_country": "CA",
"test": true,
"service": "US-PMI",
"reference_value": "asdf",
"customs_content_type": "Commercial Sample"
}
}
)
{
"carrier": "stamps",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 5,
"length": 6,
"width": 7,
"height": 8,
"non_machinable": true,
"packaging_type": "Package"
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Dont ship st",
"to_state": "MT",
"to_city": "Whitehall",
"to_code": "59759",
"test": true,
"service": "US-PM",
"reference_value": "asdf"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'stamps',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 6,
'width' => 7,
'height' => 8,
'non_machinable' => true,
'packaging_type' => 'Package',
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Dont ship st',
'to_state' => 'MT',
'to_city' => 'Whitehall',
'to_code' => '59759',
'test' => true,
'service' => 'US-PM',
'reference_value' => 'asdf',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'stamps',
'params': {'packages': [{'height': 8,
'length': 6,
'non_machinable': True,
'packaging_type': 'Package',
'weight': 5,
'width': 7}],
'password': 'YOUR_PASSWORD',
'reference_value': 'asdf',
'service': 'US-PM',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Dont ship st',
'to_city': 'Whitehall',
'to_code': '59759',
'to_name': 'John Doe',
'to_state': 'MT',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"stamps",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"packages"=>
[{"weight"=>5,
"length"=>6,
"width"=>7,
"height"=>8,
"non_machinable"=>true,
"packaging_type"=>"Package"}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Dont ship st",
"to_state"=>"MT",
"to_city"=>"Whitehall",
"to_code"=>"59759",
"test"=>true,
"service"=>"US-PM",
"reference_value"=>"asdf"}}
)
rocketshipit.request(
{
"carrier": "stamps",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 5,
"length": 6,
"width": 7,
"height": 8,
"non_machinable": true,
"packaging_type": "Package"
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Dont ship st",
"to_state": "MT",
"to_city": "Whitehall",
"to_code": "59759",
"test": true,
"service": "US-PM",
"reference_value": "asdf"
}
}
)
{
"carrier": "stamps",
"action": "SubmitShipment",
"params": {
"addons": [
"US-A-POUR"
],
"packages": [
{
"weight": 0.4,
"length": 6,
"width": 7,
"height": 8,
"packaging_type": "Package"
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Dont Ship st",
"to_state": "MT",
"to_city": "Whitehall",
"to_code": "59759",
"test": true,
"service": "US-FC"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'stamps',
'action' => 'SubmitShipment',
'params' =>
array (
'addons' =>
array (
0 => 'US-A-POUR',
),
'packages' =>
array (
0 =>
array (
'weight' => 0.4,
'length' => 6,
'width' => 7,
'height' => 8,
'packaging_type' => 'Package',
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Dont Ship st',
'to_state' => 'MT',
'to_city' => 'Whitehall',
'to_code' => '59759',
'test' => true,
'service' => 'US-FC',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'stamps',
'params': {'addons': ['US-A-POUR'],
'packages': [{'height': 8,
'length': 6,
'packaging_type': 'Package',
'weight': 0.4,
'width': 7}],
'service': 'US-FC',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Dont Ship st',
'to_city': 'Whitehall',
'to_code': '59759',
'to_name': 'John Doe',
'to_state': 'MT'}}
)
rs.request(
{"carrier"=>"stamps",
"action"=>"SubmitShipment",
"params"=>
{"addons"=>["US-A-POUR"],
"packages"=>
[{"weight"=>0.4,
"length"=>6,
"width"=>7,
"height"=>8,
"packaging_type"=>"Package"}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Dont Ship st",
"to_state"=>"MT",
"to_city"=>"Whitehall",
"to_code"=>"59759",
"test"=>true,
"service"=>"US-FC"}}
)
rocketshipit.request(
{
"carrier": "stamps",
"action": "SubmitShipment",
"params": {
"addons": [
"US-A-POUR"
],
"packages": [
{
"weight": 0.4,
"length": 6,
"width": 7,
"height": 8,
"packaging_type": "Package"
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Dont Ship st",
"to_state": "MT",
"to_city": "Whitehall",
"to_code": "59759",
"test": true,
"service": "US-FC"
}
}
)
{
"carrier": "stamps",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 5,
"length": 6,
"width": 7,
"height": 8,
"signature_type": "DIRECT",
"packaging_type": "Package"
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Dont ship st",
"to_state": "MT",
"to_city": "Whitehall",
"to_code": "59759",
"test": true,
"service": "US-PM",
"reference_value": "asdf"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'stamps',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 6,
'width' => 7,
'height' => 8,
'signature_type' => 'DIRECT',
'packaging_type' => 'Package',
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Dont ship st',
'to_state' => 'MT',
'to_city' => 'Whitehall',
'to_code' => '59759',
'test' => true,
'service' => 'US-PM',
'reference_value' => 'asdf',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'stamps',
'params': {'packages': [{'height': 8,
'length': 6,
'packaging_type': 'Package',
'signature_type': 'DIRECT',
'weight': 5,
'width': 7}],
'password': 'YOUR_PASSWORD',
'reference_value': 'asdf',
'service': 'US-PM',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Dont ship st',
'to_city': 'Whitehall',
'to_code': '59759',
'to_name': 'John Doe',
'to_state': 'MT',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"stamps",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"packages"=>
[{"weight"=>5,
"length"=>6,
"width"=>7,
"height"=>8,
"signature_type"=>"DIRECT",
"packaging_type"=>"Package"}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Dont ship st",
"to_state"=>"MT",
"to_city"=>"Whitehall",
"to_code"=>"59759",
"test"=>true,
"service"=>"US-PM",
"reference_value"=>"asdf"}}
)
rocketshipit.request(
{
"carrier": "stamps",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 5,
"length": 6,
"width": 7,
"height": 8,
"signature_type": "DIRECT",
"packaging_type": "Package"
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Dont ship st",
"to_state": "MT",
"to_city": "Whitehall",
"to_code": "59759",
"test": true,
"service": "US-PM",
"reference_value": "asdf"
}
}
)
{
"carrier": "stamps",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"image_type": "azpl",
"label": {
"transformations": [
{
"type": "flip_180"
}
]
},
"packages": [
{
"weight": 5,
"length": 6,
"width": 7,
"height": 8,
"packaging_type": "Package"
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Dont ship st",
"to_state": "MT",
"to_city": "Whitehall",
"to_code": "59759",
"test": true,
"service": "US-PM",
"reference_value": "\treference value 1\n second line\nthird reference line"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'stamps',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'image_type' => 'azpl',
'label' =>
array (
'transformations' =>
array (
0 =>
array (
'type' => 'flip_180',
),
),
),
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 6,
'width' => 7,
'height' => 8,
'packaging_type' => 'Package',
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Dont ship st',
'to_state' => 'MT',
'to_city' => 'Whitehall',
'to_code' => '59759',
'test' => true,
'service' => 'US-PM',
'reference_value' => ' reference value 1
second line
third reference line',
),
)
);
rs.request(
Traceback (most recent call last):
File "<string>", line 3, in <module>
File "/usr/lib/python3.11/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
^^^^^^^^^^^^^^^^^^^^^^
json.decoder.JSONDecodeError: Invalid control character at: line 37 column 25 (char 806)
)
rs.request(
{"carrier"=>"stamps",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"image_type"=>"azpl",
"label"=>{"transformations"=>[{"type"=>"flip_180"}]},
"packages"=>
[{"weight"=>5,
"length"=>6,
"width"=>7,
"height"=>8,
"packaging_type"=>"Package"}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Dont ship st",
"to_state"=>"MT",
"to_city"=>"Whitehall",
"to_code"=>"59759",
"test"=>true,
"service"=>"US-PM",
"reference_value"=>
"\treference value 1\n" + " second line\n" + "third reference line"}}
)
rocketshipit.request(
{
"carrier": "stamps",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"image_type": "azpl",
"label": {
"transformations": [
{
"type": "flip_180"
}
]
},
"packages": [
{
"weight": 5,
"length": 6,
"width": 7,
"height": 8,
"packaging_type": "Package"
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Dont ship st",
"to_state": "MT",
"to_city": "Whitehall",
"to_code": "59759",
"test": true,
"service": "US-PM",
"reference_value": "\treference value 1\n second line\nthird reference line"
}
}
)
{
"carrier": "Stamps",
"action": "CancelPickup",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"pickup_id": "WTC199744224",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'Stamps',
'action' => 'CancelPickup',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'pickup_id' => 'WTC199744224',
'test' => true,
),
)
);
rs.request(
{'action': 'CancelPickup',
'carrier': 'Stamps',
'params': {'password': 'YOUR_PASSWORD',
'pickup_id': 'WTC199744224',
'test': True,
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"Stamps",
"action"=>"CancelPickup",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"pickup_id"=>"WTC199744224",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "Stamps",
"action": "CancelPickup",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"pickup_id": "WTC199744224",
"test": true
}
}
)
{
"carrier": "stamps",
"action": "CreatePickup",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"number_of_priority_mail_pieces": 1,
"pickup_total_weight": 20,
"pickup_location": "FrontDoor",
"pickup_company_name": "Acme Inc",
"pickup_contact_name": "Mark Sanborn",
"pickup_addr1": "940 Presidio Ave",
"pickup_addr2": "Apt 103",
"pickup_city": "San Francisco",
"pickup_state": "CA",
"pickup_code": "94115",
"pickup_phone": "1231231234",
"special_instructions": "Ring the door at the gate",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'stamps',
'action' => 'CreatePickup',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'number_of_priority_mail_pieces' => 1,
'pickup_total_weight' => 20,
'pickup_location' => 'FrontDoor',
'pickup_company_name' => 'Acme Inc',
'pickup_contact_name' => 'Mark Sanborn',
'pickup_addr1' => '940 Presidio Ave',
'pickup_addr2' => 'Apt 103',
'pickup_city' => 'San Francisco',
'pickup_state' => 'CA',
'pickup_code' => '94115',
'pickup_phone' => '1231231234',
'special_instructions' => 'Ring the door at the gate',
'test' => true,
),
)
);
rs.request(
{'action': 'CreatePickup',
'carrier': 'stamps',
'params': {'number_of_priority_mail_pieces': 1,
'password': 'YOUR_PASSWORD',
'pickup_addr1': '940 Presidio Ave',
'pickup_addr2': 'Apt 103',
'pickup_city': 'San Francisco',
'pickup_code': '94115',
'pickup_company_name': 'Acme Inc',
'pickup_contact_name': 'Mark Sanborn',
'pickup_location': 'FrontDoor',
'pickup_phone': '1231231234',
'pickup_state': 'CA',
'pickup_total_weight': 20,
'special_instructions': 'Ring the door at the gate',
'test': True,
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"stamps",
"action"=>"CreatePickup",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"number_of_priority_mail_pieces"=>1,
"pickup_total_weight"=>20,
"pickup_location"=>"FrontDoor",
"pickup_company_name"=>"Acme Inc",
"pickup_contact_name"=>"Mark Sanborn",
"pickup_addr1"=>"940 Presidio Ave",
"pickup_addr2"=>"Apt 103",
"pickup_city"=>"San Francisco",
"pickup_state"=>"CA",
"pickup_code"=>"94115",
"pickup_phone"=>"1231231234",
"special_instructions"=>"Ring the door at the gate",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "stamps",
"action": "CreatePickup",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"number_of_priority_mail_pieces": 1,
"pickup_total_weight": 20,
"pickup_location": "FrontDoor",
"pickup_company_name": "Acme Inc",
"pickup_contact_name": "Mark Sanborn",
"pickup_addr1": "940 Presidio Ave",
"pickup_addr2": "Apt 103",
"pickup_city": "San Francisco",
"pickup_state": "CA",
"pickup_code": "94115",
"pickup_phone": "1231231234",
"special_instructions": "Ring the door at the gate",
"test": true
}
}
)
Stamps.com - Purchase Postage
{
"carrier": "stamps",
"action": "PurchasePostage",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"amount": 10.00,
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'stamps',
'action' => 'PurchasePostage',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'amount' => 10.0,
'test' => true,
),
)
);
rs.request(
{'action': 'PurchasePostage',
'carrier': 'stamps',
'params': {'amount': 10.0,
'password': 'YOUR_PASSWORD',
'test': True,
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"stamps",
"action"=>"PurchasePostage",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"amount"=>10.0,
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "stamps",
"action": "PurchasePostage",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"amount": 10.00,
"test": true
}
}
)
{
"carrier": "stamps",
"action": "GetAllRates",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 20
}
],
"ship_code": "59759",
"to_code": "90210"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'stamps',
'action' => 'GetAllRates',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 20,
),
),
'ship_code' => '59759',
'to_code' => '90210',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'stamps',
'params': {'packages': [{'weight': 20}],
'password': 'YOUR_PASSWORD',
'ship_code': '59759',
'to_code': '90210',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"stamps",
"action"=>"GetAllRates",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"packages"=>[{"weight"=>20}],
"ship_code"=>"59759",
"to_code"=>"90210"}}
)
rocketshipit.request(
{
"carrier": "stamps",
"action": "GetAllRates",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 20
}
],
"ship_code": "59759",
"to_code": "90210"
}
}
)
Stamps.com - Rates GlobalPost Economy
{
"carrier": "stamps",
"action": "GetAllRates",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 4
}
],
"service": "SC-GPE",
"ship_code": "59759",
"to_country": "CA"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'stamps',
'action' => 'GetAllRates',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 4,
),
),
'service' => 'SC-GPE',
'ship_code' => '59759',
'to_country' => 'CA',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'stamps',
'params': {'packages': [{'weight': 4}],
'password': 'YOUR_PASSWORD',
'service': 'SC-GPE',
'ship_code': '59759',
'to_country': 'CA',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"stamps",
"action"=>"GetAllRates",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"packages"=>[{"weight"=>4}],
"service"=>"SC-GPE",
"ship_code"=>"59759",
"to_country"=>"CA"}}
)
rocketshipit.request(
{
"carrier": "stamps",
"action": "GetAllRates",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 4
}
],
"service": "SC-GPE",
"ship_code": "59759",
"to_country": "CA"
}
}
)
{
"carrier": "Stamps",
"action": "GetAllRates",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5,
"insured_value": 700
}
],
"test": true,
"residential": true,
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_code": "90210",
"weight_unit": "LBS",
"length_unit": "IN"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'Stamps',
'action' => 'GetAllRates',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 5,
'width' => 5,
'height' => 5,
'insured_value' => 700,
),
),
'test' => true,
'residential' => true,
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_country' => 'US',
'to_code' => '90210',
'weight_unit' => 'LBS',
'length_unit' => 'IN',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'Stamps',
'params': {'customs': [],
'length_unit': 'IN',
'packages': [{'height': 5,
'insured_value': 700,
'length': 5,
'weight': 5,
'width': 5}],
'password': 'YOUR_PASSWORD',
'residential': True,
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_code': '90210',
'to_country': 'US',
'username': 'YOUR_USERNAME',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"Stamps",
"action"=>"GetAllRates",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"packages"=>
[{"weight"=>5,
"length"=>5,
"width"=>5,
"height"=>5,
"insured_value"=>700}],
"test"=>true,
"residential"=>true,
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_country"=>"US",
"to_code"=>"90210",
"weight_unit"=>"LBS",
"length_unit"=>"IN"}}
)
rocketshipit.request(
{
"carrier": "Stamps",
"action": "GetAllRates",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5,
"insured_value": 700
}
],
"test": true,
"residential": true,
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_code": "90210",
"weight_unit": "LBS",
"length_unit": "IN"
}
}
)
{
"carrier": "stamps",
"action": "GetAllRates",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 20,
"signature_type": "DIRECT"
}
],
"ship_code": "59759",
"signature_required": true,
"to_code": "90210"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'stamps',
'action' => 'GetAllRates',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 20,
'signature_type' => 'DIRECT',
),
),
'ship_code' => '59759',
'signature_required' => true,
'to_code' => '90210',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'stamps',
'params': {'packages': [{'signature_type': 'DIRECT', 'weight': 20}],
'password': 'YOUR_PASSWORD',
'ship_code': '59759',
'signature_required': True,
'to_code': '90210',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"stamps",
"action"=>"GetAllRates",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"packages"=>[{"weight"=>20, "signature_type"=>"DIRECT"}],
"ship_code"=>"59759",
"signature_required"=>true,
"to_code"=>"90210"}}
)
rocketshipit.request(
{
"carrier": "stamps",
"action": "GetAllRates",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 20,
"signature_type": "DIRECT"
}
],
"ship_code": "59759",
"signature_required": true,
"to_code": "90210"
}
}
)
{
"carrier": "stamps",
"action": "track",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"tracking_number": "9374889878102610545694"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'stamps',
'action' => 'track',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'tracking_number' => '9374889878102610545694',
),
)
);
rs.request(
{'action': 'track',
'carrier': 'stamps',
'params': {'password': 'YOUR_PASSWORD',
'tracking_number': '9374889878102610545694',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"stamps",
"action"=>"track",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"tracking_number"=>"9374889878102610545694"}}
)
rocketshipit.request(
{
"carrier": "stamps",
"action": "track",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"tracking_number": "9374889878102610545694"
}
}
)
{
"carrier": "stamps",
"action": "VoidShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"shipment_id": "c605aec1-322e-48d5-bf81-b0bb820f9c22",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'stamps',
'action' => 'VoidShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'shipment_id' => 'c605aec1-322e-48d5-bf81-b0bb820f9c22',
'test' => true,
),
)
);
rs.request(
{'action': 'VoidShipment',
'carrier': 'stamps',
'params': {'password': 'YOUR_PASSWORD',
'shipment_id': 'c605aec1-322e-48d5-bf81-b0bb820f9c22',
'test': True,
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"stamps",
"action"=>"VoidShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"shipment_id"=>"c605aec1-322e-48d5-bf81-b0bb820f9c22",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "stamps",
"action": "VoidShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"shipment_id": "c605aec1-322e-48d5-bf81-b0bb820f9c22",
"test": true
}
}
)
UPS - Address Validation
{
"carrier": "UPS",
"action": "AddressValidate",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_KEY",
"to_name": "John Doe",
"to_addr1": "2920 Zoo Drive",
"to_state": "CA",
"to_city": "San Diego",
"to_code": "92112",
"to_country": "US",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'AddressValidate',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'key' => 'YOUR_KEY',
'to_name' => 'John Doe',
'to_addr1' => '2920 Zoo Drive',
'to_state' => 'CA',
'to_city' => 'San Diego',
'to_code' => '92112',
'to_country' => 'US',
'test' => true,
),
)
);
rs.request(
{'action': 'AddressValidate',
'carrier': 'UPS',
'params': {'key': 'YOUR_KEY',
'password': 'YOUR_PASSWORD',
'test': True,
'to_addr1': '2920 Zoo Drive',
'to_city': 'San Diego',
'to_code': '92112',
'to_country': 'US',
'to_name': 'John Doe',
'to_state': 'CA',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"AddressValidate",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"key"=>"YOUR_KEY",
"to_name"=>"John Doe",
"to_addr1"=>"2920 Zoo Drive",
"to_state"=>"CA",
"to_city"=>"San Diego",
"to_code"=>"92112",
"to_country"=>"US",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "AddressValidate",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_KEY",
"to_name": "John Doe",
"to_addr1": "2920 Zoo Drive",
"to_state": "CA",
"to_city": "San Diego",
"to_code": "92112",
"to_country": "US",
"test": true
}
}
)
UPS - Download CSV
{
"carrier": "UPS",
"action": "GetSubscription",
"params": {
"key": "YOUR_KEY",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"begin_date": "20160426000000",
"end_date": "20160429154400",
"subscription_name": "Test"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'GetSubscription',
'params' =>
array (
'key' => 'YOUR_KEY',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'begin_date' => '20160426000000',
'end_date' => '20160429154400',
'subscription_name' => 'Test',
),
)
);
rs.request(
{'action': 'GetSubscription',
'carrier': 'UPS',
'params': {'begin_date': '20160426000000',
'end_date': '20160429154400',
'key': 'YOUR_KEY',
'password': 'YOUR_PASSWORD',
'subscription_name': 'Test',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"GetSubscription",
"params"=>
{"key"=>"YOUR_KEY",
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"begin_date"=>"20160426000000",
"end_date"=>"20160429154400",
"subscription_name"=>"Test"}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "GetSubscription",
"params": {
"key": "YOUR_KEY",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"begin_date": "20160426000000",
"end_date": "20160429154400",
"subscription_name": "Test"
}
}
)
UPS - Freight Rate
{
"carrier": "UPS",
"action": "GetAllRates",
"params": {
"freight_account_number": "YOUR_ACCOUNT_NUMBER",
"packages": [
{
"weight": 200,
"freight_class": "50",
"description": "bailing wire"
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "1202 Chalet Ln",
"ship_addr2": "Do Not Delete - Test Account",
"ship_city": "Harrison",
"ship_state": "AR",
"ship_code": "72601",
"ship_country": "US",
"to_country": "US",
"to_city": "Akron",
"to_state": "OH",
"to_code": "44333",
"weight_unit": "LB",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'GetAllRates',
'params' =>
array (
'freight_account_number' => 'YOUR_ACCOUNT_NUMBER',
'packages' =>
array (
0 =>
array (
'weight' => 200,
'freight_class' => '50',
'description' => 'bailing wire',
),
),
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '1202 Chalet Ln',
'ship_addr2' => 'Do Not Delete - Test Account',
'ship_city' => 'Harrison',
'ship_state' => 'AR',
'ship_code' => '72601',
'ship_country' => 'US',
'to_country' => 'US',
'to_city' => 'Akron',
'to_state' => 'OH',
'to_code' => '44333',
'weight_unit' => 'LB',
'test' => true,
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'UPS',
'params': {'customs': [],
'freight_account_number': 'YOUR_ACCOUNT_NUMBER',
'packages': [{'description': 'bailing wire',
'freight_class': '50',
'weight': 200}],
'ship_addr1': '1202 Chalet Ln',
'ship_addr2': 'Do Not Delete - Test Account',
'ship_city': 'Harrison',
'ship_code': '72601',
'ship_country': 'US',
'ship_state': 'AR',
'shipper': 'RocketShipIt',
'test': True,
'to_city': 'Akron',
'to_code': '44333',
'to_country': 'US',
'to_state': 'OH',
'weight_unit': 'LB'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"GetAllRates",
"params"=>
{"freight_account_number"=>"YOUR_ACCOUNT_NUMBER",
"packages"=>
[{"weight"=>200, "freight_class"=>"50", "description"=>"bailing wire"}],
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"1202 Chalet Ln",
"ship_addr2"=>"Do Not Delete - Test Account",
"ship_city"=>"Harrison",
"ship_state"=>"AR",
"ship_code"=>"72601",
"ship_country"=>"US",
"to_country"=>"US",
"to_city"=>"Akron",
"to_state"=>"OH",
"to_code"=>"44333",
"weight_unit"=>"LB",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "GetAllRates",
"params": {
"freight_account_number": "YOUR_ACCOUNT_NUMBER",
"packages": [
{
"weight": 200,
"freight_class": "50",
"description": "bailing wire"
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "1202 Chalet Ln",
"ship_addr2": "Do Not Delete - Test Account",
"ship_city": "Harrison",
"ship_state": "AR",
"ship_code": "72601",
"ship_country": "US",
"to_country": "US",
"to_city": "Akron",
"to_state": "OH",
"to_code": "44333",
"weight_unit": "LB",
"test": true
}
}
)
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"test": true,
"special_instructions": "this ends up in additional comments",
"account_number": "YOUR_ACCOUNT",
"key": "YOUR_KEY",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"customs_forms": "01",
"currency": "CAD",
"invoice_date": "20160910",
"reason_for_export": "SALE",
"invoice_line_total": 100,
"packages": [
{
"weight": 1,
"reference_code": "TN",
"reference_value": "12345678"
}
],
"customs": [
{
"invoice_line_number": "1",
"invoice_line_part_number": "123",
"invoice_line_description": "My Description",
"invoice_line_value": "1",
"invoice_line_origin_country_code": "CA",
"customs_quantity_units": "EA"
}
],
"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": "11",
"to_name": "John Doe",
"to_attention_name": "John Doe",
"to_addr1": "2000 Meadowvale Rd",
"to_city": "Toronto",
"to_state": "ON",
"to_code": "M1B5K7",
"to_country": "CA",
"to_phone": "1231231234",
"ship_contact": "John Doe",
"shipper": "John Doe",
"ship_addr1": "2300 Southern Blvd",
"ship_state": "NY",
"ship_city": "Bronx",
"ship_code": "10460",
"ship_country": "US",
"ship_phone": "1231231234",
"image_type": "PNG",
"shipment_description": "xxx",
"packaging_type": "02",
"pickup_type": "02",
"weight_unit": "LBS",
"length_unit": "IN"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'SubmitShipment',
'params' =>
array (
'test' => true,
'special_instructions' => 'this ends up in additional comments',
'account_number' => 'YOUR_ACCOUNT',
'key' => 'YOUR_KEY',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'customs_forms' => '01',
'currency' => 'CAD',
'invoice_date' => '20160910',
'reason_for_export' => 'SALE',
'invoice_line_total' => 100,
'packages' =>
array (
0 =>
array (
'weight' => 1,
'reference_code' => 'TN',
'reference_value' => '12345678',
),
),
'customs' =>
array (
0 =>
array (
'invoice_line_number' => '1',
'invoice_line_part_number' => '123',
'invoice_line_description' => 'My Description',
'invoice_line_value' => '1',
'invoice_line_origin_country_code' => 'CA',
'customs_quantity_units' => 'EA',
),
),
'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' => '11',
'to_name' => 'John Doe',
'to_attention_name' => 'John Doe',
'to_addr1' => '2000 Meadowvale Rd',
'to_city' => 'Toronto',
'to_state' => 'ON',
'to_code' => 'M1B5K7',
'to_country' => 'CA',
'to_phone' => '1231231234',
'ship_contact' => 'John Doe',
'shipper' => 'John Doe',
'ship_addr1' => '2300 Southern Blvd',
'ship_state' => 'NY',
'ship_city' => 'Bronx',
'ship_code' => '10460',
'ship_country' => 'US',
'ship_phone' => '1231231234',
'image_type' => 'PNG',
'shipment_description' => 'xxx',
'packaging_type' => '02',
'pickup_type' => '02',
'weight_unit' => 'LBS',
'length_unit' => 'IN',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS',
'params': {'account_number': 'YOUR_ACCOUNT',
'currency': 'CAD',
'customs': [{'customs_quantity_units': 'EA',
'invoice_line_description': 'My Description',
'invoice_line_number': '1',
'invoice_line_origin_country_code': 'CA',
'invoice_line_part_number': '123',
'invoice_line_value': '1'}],
'customs_forms': '01',
'image_type': 'PNG',
'invoice_date': '20160910',
'invoice_line_total': 100,
'key': 'YOUR_KEY',
'length_unit': 'IN',
'packages': [{'reference_code': 'TN',
'reference_value': '12345678',
'weight': 1}],
'packaging_type': '02',
'password': 'YOUR_PASSWORD',
'pickup_type': '02',
'reason_for_export': 'SALE',
'service': '11',
'ship_addr1': '2300 Southern Blvd',
'ship_city': 'Bronx',
'ship_code': '10460',
'ship_contact': 'John Doe',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'NY',
'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',
'special_instructions': 'this ends up in additional comments',
'test': True,
'to_addr1': '2000 Meadowvale Rd',
'to_attention_name': 'John Doe',
'to_city': 'Toronto',
'to_code': 'M1B5K7',
'to_country': 'CA',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'ON',
'username': 'YOUR_USERNAME',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"SubmitShipment",
"params"=>
{"test"=>true,
"special_instructions"=>"this ends up in additional comments",
"account_number"=>"YOUR_ACCOUNT",
"key"=>"YOUR_KEY",
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"customs_forms"=>"01",
"currency"=>"CAD",
"invoice_date"=>"20160910",
"reason_for_export"=>"SALE",
"invoice_line_total"=>100,
"packages"=>
[{"weight"=>1, "reference_code"=>"TN", "reference_value"=>"12345678"}],
"customs"=>
[{"invoice_line_number"=>"1",
"invoice_line_part_number"=>"123",
"invoice_line_description"=>"My Description",
"invoice_line_value"=>"1",
"invoice_line_origin_country_code"=>"CA",
"customs_quantity_units"=>"EA"}],
"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"=>"11",
"to_name"=>"John Doe",
"to_attention_name"=>"John Doe",
"to_addr1"=>"2000 Meadowvale Rd",
"to_city"=>"Toronto",
"to_state"=>"ON",
"to_code"=>"M1B5K7",
"to_country"=>"CA",
"to_phone"=>"1231231234",
"ship_contact"=>"John Doe",
"shipper"=>"John Doe",
"ship_addr1"=>"2300 Southern Blvd",
"ship_state"=>"NY",
"ship_city"=>"Bronx",
"ship_code"=>"10460",
"ship_country"=>"US",
"ship_phone"=>"1231231234",
"image_type"=>"PNG",
"shipment_description"=>"xxx",
"packaging_type"=>"02",
"pickup_type"=>"02",
"weight_unit"=>"LBS",
"length_unit"=>"IN"}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"test": true,
"special_instructions": "this ends up in additional comments",
"account_number": "YOUR_ACCOUNT",
"key": "YOUR_KEY",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"customs_forms": "01",
"currency": "CAD",
"invoice_date": "20160910",
"reason_for_export": "SALE",
"invoice_line_total": 100,
"packages": [
{
"weight": 1,
"reference_code": "TN",
"reference_value": "12345678"
}
],
"customs": [
{
"invoice_line_number": "1",
"invoice_line_part_number": "123",
"invoice_line_description": "My Description",
"invoice_line_value": "1",
"invoice_line_origin_country_code": "CA",
"customs_quantity_units": "EA"
}
],
"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": "11",
"to_name": "John Doe",
"to_attention_name": "John Doe",
"to_addr1": "2000 Meadowvale Rd",
"to_city": "Toronto",
"to_state": "ON",
"to_code": "M1B5K7",
"to_country": "CA",
"to_phone": "1231231234",
"ship_contact": "John Doe",
"shipper": "John Doe",
"ship_addr1": "2300 Southern Blvd",
"ship_state": "NY",
"ship_city": "Bronx",
"ship_code": "10460",
"ship_country": "US",
"ship_phone": "1231231234",
"image_type": "PNG",
"shipment_description": "xxx",
"packaging_type": "02",
"pickup_type": "02",
"weight_unit": "LBS",
"length_unit": "IN"
}
}
)
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"test": true,
"account_number": "YOUR_ACCOUNT",
"key": "YOUR_KEY",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"customs_forms": "01,11",
"currency": "CAD",
"invoice_date": "20170610",
"reason_for_export": "SALE",
"invoice_line_total": 100,
"packages": [
{
"weight": 1,
"length": 1,
"width": 1,
"height": 1,
"reference_code": "TN",
"reference_value": "12345678"
}
],
"customs": [
{
"invoice_line_number": "1",
"invoice_line_part_number": "123",
"invoice_line_description": "My Description",
"invoice_line_value": "1",
"invoice_line_origin_country_code": "CA",
"customs_quantity_units": "EA",
"commodity_code": "240110"
}
],
"invoice": "12345",
"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": "65",
"shipper": "John Doe",
"ship_contact": "John Doe",
"ship_name": "John Doe",
"ship_addr1": "2300 Southern Blvd",
"ship_state": "NY",
"ship_city": "Bronx",
"ship_code": "10460",
"ship_country": "US",
"ship_phone": "1231231234",
"to_company": "Acme Inc.",
"to_attention_name": "John Doe",
"to_addr1": "2000 Meadowvale Rd",
"to_city": "Toronto",
"to_state": "ON",
"to_code": "M1B5K7",
"to_country": "CA",
"to_phone": "1231231234",
"image_type": "PNG",
"shipment_description": "xxx",
"packaging_type": "02",
"pickup_type": "02",
"weight_unit": "LBS",
"length_unit": "IN"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'SubmitShipment',
'params' =>
array (
'test' => true,
'account_number' => 'YOUR_ACCOUNT',
'key' => 'YOUR_KEY',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'customs_forms' => '01,11',
'currency' => 'CAD',
'invoice_date' => '20170610',
'reason_for_export' => 'SALE',
'invoice_line_total' => 100,
'packages' =>
array (
0 =>
array (
'weight' => 1,
'length' => 1,
'width' => 1,
'height' => 1,
'reference_code' => 'TN',
'reference_value' => '12345678',
),
),
'customs' =>
array (
0 =>
array (
'invoice_line_number' => '1',
'invoice_line_part_number' => '123',
'invoice_line_description' => 'My Description',
'invoice_line_value' => '1',
'invoice_line_origin_country_code' => 'CA',
'customs_quantity_units' => 'EA',
'commodity_code' => '240110',
),
),
'invoice' => '12345',
'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' => '65',
'shipper' => 'John Doe',
'ship_contact' => 'John Doe',
'ship_name' => 'John Doe',
'ship_addr1' => '2300 Southern Blvd',
'ship_state' => 'NY',
'ship_city' => 'Bronx',
'ship_code' => '10460',
'ship_country' => 'US',
'ship_phone' => '1231231234',
'to_company' => 'Acme Inc.',
'to_attention_name' => 'John Doe',
'to_addr1' => '2000 Meadowvale Rd',
'to_city' => 'Toronto',
'to_state' => 'ON',
'to_code' => 'M1B5K7',
'to_country' => 'CA',
'to_phone' => '1231231234',
'image_type' => 'PNG',
'shipment_description' => 'xxx',
'packaging_type' => '02',
'pickup_type' => '02',
'weight_unit' => 'LBS',
'length_unit' => 'IN',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS',
'params': {'account_number': 'YOUR_ACCOUNT',
'currency': 'CAD',
'customs': [{'commodity_code': '240110',
'customs_quantity_units': 'EA',
'invoice_line_description': 'My Description',
'invoice_line_number': '1',
'invoice_line_origin_country_code': 'CA',
'invoice_line_part_number': '123',
'invoice_line_value': '1'}],
'customs_forms': '01,11',
'image_type': 'PNG',
'invoice': '12345',
'invoice_date': '20170610',
'invoice_line_total': 100,
'key': 'YOUR_KEY',
'length_unit': 'IN',
'packages': [{'height': 1,
'length': 1,
'reference_code': 'TN',
'reference_value': '12345678',
'weight': 1,
'width': 1}],
'packaging_type': '02',
'password': 'YOUR_PASSWORD',
'pickup_type': '02',
'reason_for_export': 'SALE',
'service': '65',
'ship_addr1': '2300 Southern Blvd',
'ship_city': 'Bronx',
'ship_code': '10460',
'ship_contact': 'John Doe',
'ship_country': 'US',
'ship_name': 'John Doe',
'ship_phone': '1231231234',
'ship_state': 'NY',
'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': '2000 Meadowvale Rd',
'to_attention_name': 'John Doe',
'to_city': 'Toronto',
'to_code': 'M1B5K7',
'to_company': 'Acme Inc.',
'to_country': 'CA',
'to_phone': '1231231234',
'to_state': 'ON',
'username': 'YOUR_USERNAME',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"SubmitShipment",
"params"=>
{"test"=>true,
"account_number"=>"YOUR_ACCOUNT",
"key"=>"YOUR_KEY",
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"customs_forms"=>"01,11",
"currency"=>"CAD",
"invoice_date"=>"20170610",
"reason_for_export"=>"SALE",
"invoice_line_total"=>100,
"packages"=>
[{"weight"=>1,
"length"=>1,
"width"=>1,
"height"=>1,
"reference_code"=>"TN",
"reference_value"=>"12345678"}],
"customs"=>
[{"invoice_line_number"=>"1",
"invoice_line_part_number"=>"123",
"invoice_line_description"=>"My Description",
"invoice_line_value"=>"1",
"invoice_line_origin_country_code"=>"CA",
"customs_quantity_units"=>"EA",
"commodity_code"=>"240110"}],
"invoice"=>"12345",
"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"=>"65",
"shipper"=>"John Doe",
"ship_contact"=>"John Doe",
"ship_name"=>"John Doe",
"ship_addr1"=>"2300 Southern Blvd",
"ship_state"=>"NY",
"ship_city"=>"Bronx",
"ship_code"=>"10460",
"ship_country"=>"US",
"ship_phone"=>"1231231234",
"to_company"=>"Acme Inc.",
"to_attention_name"=>"John Doe",
"to_addr1"=>"2000 Meadowvale Rd",
"to_city"=>"Toronto",
"to_state"=>"ON",
"to_code"=>"M1B5K7",
"to_country"=>"CA",
"to_phone"=>"1231231234",
"image_type"=>"PNG",
"shipment_description"=>"xxx",
"packaging_type"=>"02",
"pickup_type"=>"02",
"weight_unit"=>"LBS",
"length_unit"=>"IN"}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"test": true,
"account_number": "YOUR_ACCOUNT",
"key": "YOUR_KEY",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"customs_forms": "01,11",
"currency": "CAD",
"invoice_date": "20170610",
"reason_for_export": "SALE",
"invoice_line_total": 100,
"packages": [
{
"weight": 1,
"length": 1,
"width": 1,
"height": 1,
"reference_code": "TN",
"reference_value": "12345678"
}
],
"customs": [
{
"invoice_line_number": "1",
"invoice_line_part_number": "123",
"invoice_line_description": "My Description",
"invoice_line_value": "1",
"invoice_line_origin_country_code": "CA",
"customs_quantity_units": "EA",
"commodity_code": "240110"
}
],
"invoice": "12345",
"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": "65",
"shipper": "John Doe",
"ship_contact": "John Doe",
"ship_name": "John Doe",
"ship_addr1": "2300 Southern Blvd",
"ship_state": "NY",
"ship_city": "Bronx",
"ship_code": "10460",
"ship_country": "US",
"ship_phone": "1231231234",
"to_company": "Acme Inc.",
"to_attention_name": "John Doe",
"to_addr1": "2000 Meadowvale Rd",
"to_city": "Toronto",
"to_state": "ON",
"to_code": "M1B5K7",
"to_country": "CA",
"to_phone": "1231231234",
"image_type": "PNG",
"shipment_description": "xxx",
"packaging_type": "02",
"pickup_type": "02",
"weight_unit": "LBS",
"length_unit": "IN"
}
}
)
UPS - International w/ discount, freight charges
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"test": true,
"account_number": "YOUR_ACCOUNT",
"key": "YOUR_KEY",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"customs_forms": "01",
"customs_discount": 5.12,
"freight_charges": 10,
"currency": "CAD",
"invoice_date": "20160910",
"reason_for_export": "SALE",
"invoice_line_total": 100,
"packages": [
{
"weight": 1,
"length": 1,
"width": 1,
"height": 1,
"reference_code": "TN",
"reference_value": "12345678"
}
],
"customs": [
{
"invoice_line_number": "1",
"invoice_line_part_number": "123",
"invoice_line_description": "My Description",
"invoice_line_value": "1",
"invoice_line_origin_country_code": "CA",
"customs_quantity_units": "EA"
}
],
"invoice": "12345",
"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": "14",
"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": "02",
"pickup_type": "02",
"weight_unit": "LBS",
"length_unit": "IN"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'SubmitShipment',
'params' =>
array (
'test' => true,
'account_number' => 'YOUR_ACCOUNT',
'key' => 'YOUR_KEY',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'customs_forms' => '01',
'customs_discount' => 5.12,
'freight_charges' => 10,
'currency' => 'CAD',
'invoice_date' => '20160910',
'reason_for_export' => 'SALE',
'invoice_line_total' => 100,
'packages' =>
array (
0 =>
array (
'weight' => 1,
'length' => 1,
'width' => 1,
'height' => 1,
'reference_code' => 'TN',
'reference_value' => '12345678',
),
),
'customs' =>
array (
0 =>
array (
'invoice_line_number' => '1',
'invoice_line_part_number' => '123',
'invoice_line_description' => 'My Description',
'invoice_line_value' => '1',
'invoice_line_origin_country_code' => 'CA',
'customs_quantity_units' => 'EA',
),
),
'invoice' => '12345',
'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' => '14',
'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' => '02',
'pickup_type' => '02',
'weight_unit' => 'LBS',
'length_unit' => 'IN',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS',
'params': {'account_number': 'YOUR_ACCOUNT',
'currency': 'CAD',
'customs': [{'customs_quantity_units': 'EA',
'invoice_line_description': 'My Description',
'invoice_line_number': '1',
'invoice_line_origin_country_code': 'CA',
'invoice_line_part_number': '123',
'invoice_line_value': '1'}],
'customs_discount': 5.12,
'customs_forms': '01',
'freight_charges': 10,
'image_type': 'PNG',
'invoice': '12345',
'invoice_date': '20160910',
'invoice_line_total': 100,
'key': 'YOUR_KEY',
'length_unit': 'IN',
'packages': [{'height': 1,
'length': 1,
'reference_code': 'TN',
'reference_value': '12345678',
'weight': 1,
'width': 1}],
'packaging_type': '02',
'password': 'YOUR_PASSWORD',
'pickup_type': '02',
'reason_for_export': 'SALE',
'service': '14',
'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',
'username': 'YOUR_USERNAME',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"SubmitShipment",
"params"=>
{"test"=>true,
"account_number"=>"YOUR_ACCOUNT",
"key"=>"YOUR_KEY",
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"customs_forms"=>"01",
"customs_discount"=>5.12,
"freight_charges"=>10,
"currency"=>"CAD",
"invoice_date"=>"20160910",
"reason_for_export"=>"SALE",
"invoice_line_total"=>100,
"packages"=>
[{"weight"=>1,
"length"=>1,
"width"=>1,
"height"=>1,
"reference_code"=>"TN",
"reference_value"=>"12345678"}],
"customs"=>
[{"invoice_line_number"=>"1",
"invoice_line_part_number"=>"123",
"invoice_line_description"=>"My Description",
"invoice_line_value"=>"1",
"invoice_line_origin_country_code"=>"CA",
"customs_quantity_units"=>"EA"}],
"invoice"=>"12345",
"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"=>"14",
"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"=>"02",
"pickup_type"=>"02",
"weight_unit"=>"LBS",
"length_unit"=>"IN"}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"test": true,
"account_number": "YOUR_ACCOUNT",
"key": "YOUR_KEY",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"customs_forms": "01",
"customs_discount": 5.12,
"freight_charges": 10,
"currency": "CAD",
"invoice_date": "20160910",
"reason_for_export": "SALE",
"invoice_line_total": 100,
"packages": [
{
"weight": 1,
"length": 1,
"width": 1,
"height": 1,
"reference_code": "TN",
"reference_value": "12345678"
}
],
"customs": [
{
"invoice_line_number": "1",
"invoice_line_part_number": "123",
"invoice_line_description": "My Description",
"invoice_line_value": "1",
"invoice_line_origin_country_code": "CA",
"customs_quantity_units": "EA"
}
],
"invoice": "12345",
"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": "14",
"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": "02",
"pickup_type": "02",
"weight_unit": "LBS",
"length_unit": "IN"
}
}
)
UPS - Label
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"key": "YOUR_UPS_KEY",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 4,
"length": 7,
"width": 5,
"height": 5
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PNG",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'SubmitShipment',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'key' => 'YOUR_UPS_KEY',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'width' => 5,
'height' => 5,
),
),
'service' => '03',
'shipper' => '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_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'PNG',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'image_type': 'PNG',
'key': 'YOUR_UPS_KEY',
'packages': [{'height': 5, 'length': 7, 'weight': 4, 'width': 5}],
'password': 'YOUR_PASSWORD',
'service': '03',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'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',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"SubmitShipment",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"key"=>"YOUR_UPS_KEY",
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"packages"=>[{"weight"=>4, "length"=>7, "width"=>5, "height"=>5}],
"service"=>"03",
"shipper"=>"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_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"PNG",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"key": "YOUR_UPS_KEY",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 4,
"length": 7,
"width": 5,
"height": 5
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PNG",
"test": true
}
}
)
UPS - Label Additional Handling
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"key": "YOUR_UPS_KEY",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 4,
"length": 7,
"width": 5,
"height": 5,
"additional_handling": true
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PNG",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'SubmitShipment',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'key' => 'YOUR_UPS_KEY',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'width' => 5,
'height' => 5,
'additional_handling' => true,
),
),
'service' => '03',
'shipper' => '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_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'PNG',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'image_type': 'PNG',
'key': 'YOUR_UPS_KEY',
'packages': [{'additional_handling': True,
'height': 5,
'length': 7,
'weight': 4,
'width': 5}],
'password': 'YOUR_PASSWORD',
'service': '03',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'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',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"SubmitShipment",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"key"=>"YOUR_UPS_KEY",
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"packages"=>
[{"weight"=>4,
"length"=>7,
"width"=>5,
"height"=>5,
"additional_handling"=>true}],
"service"=>"03",
"shipper"=>"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_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"PNG",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"key": "YOUR_UPS_KEY",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 4,
"length": 7,
"width": 5,
"height": 5,
"additional_handling": true
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PNG",
"test": true
}
}
)
UPS - Label COD
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"packages": [
{
"weight": 4,
"length": 7,
"cod_amount": 5.12,
"cod_fund_type": "0"
}
],
"currency": "USD",
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PNG",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'SubmitShipment',
'params' =>
array (
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'cod_amount' => 5.12,
'cod_fund_type' => '0',
),
),
'currency' => 'USD',
'service' => '03',
'shipper' => '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_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'PNG',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS',
'params': {'currency': 'USD',
'image_type': 'PNG',
'packages': [{'cod_amount': 5.12,
'cod_fund_type': '0',
'length': 7,
'weight': 4}],
'service': '03',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'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'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"SubmitShipment",
"params"=>
{"packages"=>
[{"weight"=>4, "length"=>7, "cod_amount"=>5.12, "cod_fund_type"=>"0"}],
"currency"=>"USD",
"service"=>"03",
"shipper"=>"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_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"PNG",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"packages": [
{
"weight": 4,
"length": 7,
"cod_amount": 5.12,
"cod_fund_type": "0"
}
],
"currency": "USD",
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PNG",
"test": true
}
}
)
UPS - Label DDP/DDU
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_KEY",
"test": true,
"trade_terms": "DDP",
"master_carton": true,
"customs_forms": "01",
"currency": "CAD",
"invoice_date": "20170610",
"reason_for_export": "SALE",
"invoice_line_total": 100,
"packages": [
{
"weight": 1,
"length": 1,
"width": 1,
"height": 1,
"reference_code": "TN",
"reference_value": "12345678"
}
],
"customs": [
{
"invoice_line_number": "1",
"invoice_line_part_number": "123",
"invoice_line_description": "My Description",
"invoice_line_value": "1",
"invoice_line_origin_country_code": "CA",
"customs_quantity_units": "EA",
"commodity_code": "240110"
}
],
"invoice": "12345",
"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": "17",
"shipper": "John Doe",
"ship_contact": "John Doe",
"ship_name": "John Doe",
"ship_addr1": "2300 Southern Blvd",
"ship_state": "NY",
"ship_city": "Bronx",
"ship_code": "10460",
"ship_country": "US",
"ship_phone": "1231231234",
"to_company": "Acme Inc.",
"to_attention_name": "John Doe",
"to_addr1": "2000 Meadowvale Rd",
"to_city": "Toronto",
"to_state": "ON",
"to_code": "M1B5K7",
"to_country": "CA",
"to_phone": "1231231234",
"image_type": "PNG",
"shipment_description": "xxx",
"packaging_type": "02",
"pickup_type": "02",
"weight_unit": "LBS",
"length_unit": "IN"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'key' => 'YOUR_KEY',
'test' => true,
'trade_terms' => 'DDP',
'master_carton' => true,
'customs_forms' => '01',
'currency' => 'CAD',
'invoice_date' => '20170610',
'reason_for_export' => 'SALE',
'invoice_line_total' => 100,
'packages' =>
array (
0 =>
array (
'weight' => 1,
'length' => 1,
'width' => 1,
'height' => 1,
'reference_code' => 'TN',
'reference_value' => '12345678',
),
),
'customs' =>
array (
0 =>
array (
'invoice_line_number' => '1',
'invoice_line_part_number' => '123',
'invoice_line_description' => 'My Description',
'invoice_line_value' => '1',
'invoice_line_origin_country_code' => 'CA',
'customs_quantity_units' => 'EA',
'commodity_code' => '240110',
),
),
'invoice' => '12345',
'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' => '17',
'shipper' => 'John Doe',
'ship_contact' => 'John Doe',
'ship_name' => 'John Doe',
'ship_addr1' => '2300 Southern Blvd',
'ship_state' => 'NY',
'ship_city' => 'Bronx',
'ship_code' => '10460',
'ship_country' => 'US',
'ship_phone' => '1231231234',
'to_company' => 'Acme Inc.',
'to_attention_name' => 'John Doe',
'to_addr1' => '2000 Meadowvale Rd',
'to_city' => 'Toronto',
'to_state' => 'ON',
'to_code' => 'M1B5K7',
'to_country' => 'CA',
'to_phone' => '1231231234',
'image_type' => 'PNG',
'shipment_description' => 'xxx',
'packaging_type' => '02',
'pickup_type' => '02',
'weight_unit' => 'LBS',
'length_unit' => 'IN',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS',
'params': {'currency': 'CAD',
'customs': [{'commodity_code': '240110',
'customs_quantity_units': 'EA',
'invoice_line_description': 'My Description',
'invoice_line_number': '1',
'invoice_line_origin_country_code': 'CA',
'invoice_line_part_number': '123',
'invoice_line_value': '1'}],
'customs_forms': '01',
'image_type': 'PNG',
'invoice': '12345',
'invoice_date': '20170610',
'invoice_line_total': 100,
'key': 'YOUR_KEY',
'length_unit': 'IN',
'master_carton': True,
'packages': [{'height': 1,
'length': 1,
'reference_code': 'TN',
'reference_value': '12345678',
'weight': 1,
'width': 1}],
'packaging_type': '02',
'password': 'YOUR_PASSWORD',
'pickup_type': '02',
'reason_for_export': 'SALE',
'service': '17',
'ship_addr1': '2300 Southern Blvd',
'ship_city': 'Bronx',
'ship_code': '10460',
'ship_contact': 'John Doe',
'ship_country': 'US',
'ship_name': 'John Doe',
'ship_phone': '1231231234',
'ship_state': 'NY',
'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': '2000 Meadowvale Rd',
'to_attention_name': 'John Doe',
'to_city': 'Toronto',
'to_code': 'M1B5K7',
'to_company': 'Acme Inc.',
'to_country': 'CA',
'to_phone': '1231231234',
'to_state': 'ON',
'trade_terms': 'DDP',
'username': 'YOUR_USERNAME',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"key"=>"YOUR_KEY",
"test"=>true,
"trade_terms"=>"DDP",
"master_carton"=>true,
"customs_forms"=>"01",
"currency"=>"CAD",
"invoice_date"=>"20170610",
"reason_for_export"=>"SALE",
"invoice_line_total"=>100,
"packages"=>
[{"weight"=>1,
"length"=>1,
"width"=>1,
"height"=>1,
"reference_code"=>"TN",
"reference_value"=>"12345678"}],
"customs"=>
[{"invoice_line_number"=>"1",
"invoice_line_part_number"=>"123",
"invoice_line_description"=>"My Description",
"invoice_line_value"=>"1",
"invoice_line_origin_country_code"=>"CA",
"customs_quantity_units"=>"EA",
"commodity_code"=>"240110"}],
"invoice"=>"12345",
"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"=>"17",
"shipper"=>"John Doe",
"ship_contact"=>"John Doe",
"ship_name"=>"John Doe",
"ship_addr1"=>"2300 Southern Blvd",
"ship_state"=>"NY",
"ship_city"=>"Bronx",
"ship_code"=>"10460",
"ship_country"=>"US",
"ship_phone"=>"1231231234",
"to_company"=>"Acme Inc.",
"to_attention_name"=>"John Doe",
"to_addr1"=>"2000 Meadowvale Rd",
"to_city"=>"Toronto",
"to_state"=>"ON",
"to_code"=>"M1B5K7",
"to_country"=>"CA",
"to_phone"=>"1231231234",
"image_type"=>"PNG",
"shipment_description"=>"xxx",
"packaging_type"=>"02",
"pickup_type"=>"02",
"weight_unit"=>"LBS",
"length_unit"=>"IN"}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_KEY",
"test": true,
"trade_terms": "DDP",
"master_carton": true,
"customs_forms": "01",
"currency": "CAD",
"invoice_date": "20170610",
"reason_for_export": "SALE",
"invoice_line_total": 100,
"packages": [
{
"weight": 1,
"length": 1,
"width": 1,
"height": 1,
"reference_code": "TN",
"reference_value": "12345678"
}
],
"customs": [
{
"invoice_line_number": "1",
"invoice_line_part_number": "123",
"invoice_line_description": "My Description",
"invoice_line_value": "1",
"invoice_line_origin_country_code": "CA",
"customs_quantity_units": "EA",
"commodity_code": "240110"
}
],
"invoice": "12345",
"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": "17",
"shipper": "John Doe",
"ship_contact": "John Doe",
"ship_name": "John Doe",
"ship_addr1": "2300 Southern Blvd",
"ship_state": "NY",
"ship_city": "Bronx",
"ship_code": "10460",
"ship_country": "US",
"ship_phone": "1231231234",
"to_company": "Acme Inc.",
"to_attention_name": "John Doe",
"to_addr1": "2000 Meadowvale Rd",
"to_city": "Toronto",
"to_state": "ON",
"to_code": "M1B5K7",
"to_country": "CA",
"to_phone": "1231231234",
"image_type": "PNG",
"shipment_description": "xxx",
"packaging_type": "02",
"pickup_type": "02",
"weight_unit": "LBS",
"length_unit": "IN"
}
}
)
UPS - Label Direct Signature
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"key": "YOUR_KEY",
"account_number": "YOUR_ACCOUNT_NUMBER",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 4,
"length": 7,
"signature_type": "DIRECT"
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "GIF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'YOUR_KEY',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'signature_type' => 'DIRECT',
),
),
'service' => '03',
'shipper' => '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_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'GIF',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'image_type': 'GIF',
'key': 'YOUR_KEY',
'packages': [{'length': 7,
'signature_type': 'DIRECT',
'weight': 4}],
'password': 'YOUR_PASSWORD',
'service': '03',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'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',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"YOUR_KEY",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"packages"=>[{"weight"=>4, "length"=>7, "signature_type"=>"DIRECT"}],
"service"=>"03",
"shipper"=>"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_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"GIF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"key": "YOUR_KEY",
"account_number": "YOUR_ACCOUNT_NUMBER",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 4,
"length": 7,
"signature_type": "DIRECT"
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "GIF",
"test": true
}
}
)
UPS - Label EU IOSS
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"test": true,
"account_number": "YOUR_ACCOUNT",
"key": "YOUR_KEY",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"ship_tax_id": "IMDEU1234567",
"ship_tax_id_type": "0356",
"customs_forms": "01",
"currency": "CAD",
"invoice_date": "20170610",
"reason_for_export": "SALE",
"invoice_line_total": 100,
"packages": [
{
"weight": 1,
"length": 1,
"width": 1,
"height": 1,
"reference_code": "TN",
"reference_value": "12345678"
}
],
"customs": [
{
"invoice_line_number": "1",
"invoice_line_part_number": "123",
"invoice_line_description": "My Description",
"invoice_line_value": "1",
"invoice_line_origin_country_code": "CA",
"customs_quantity_units": "EA",
"commodity_code": "240110"
}
],
"invoice": "12345",
"sold_company": "Acme Inc.",
"sold_name": "John Doe",
"sold_tax_id": "123abc",
"sold_phone": "1231231234",
"sold_addr1": "2000 Meadowvale Rd",
"sold_city": "London",
"sold_code": "NW14RY",
"sold_country": "GB",
"service": "65",
"shipper": "John Doe",
"ship_contact": "John Doe",
"ship_name": "John Doe",
"ship_addr1": "2300 Southern Blvd",
"ship_state": "NY",
"ship_city": "Bronx",
"ship_code": "10460",
"ship_country": "US",
"ship_phone": "1231231234",
"to_company": "Acme Inc.",
"to_attention_name": "John Doe",
"to_addr1": "Outer Cir",
"to_city": "London",
"to_code": "NW14RY",
"to_country": "GB",
"to_phone": "1231231234",
"image_type": "PNG",
"shipment_description": "xxx",
"packaging_type": "02",
"pickup_type": "02",
"weight_unit": "LBS",
"length_unit": "IN"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'SubmitShipment',
'params' =>
array (
'test' => true,
'account_number' => 'YOUR_ACCOUNT',
'key' => 'YOUR_KEY',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'ship_tax_id' => 'IMDEU1234567',
'ship_tax_id_type' => '0356',
'customs_forms' => '01',
'currency' => 'CAD',
'invoice_date' => '20170610',
'reason_for_export' => 'SALE',
'invoice_line_total' => 100,
'packages' =>
array (
0 =>
array (
'weight' => 1,
'length' => 1,
'width' => 1,
'height' => 1,
'reference_code' => 'TN',
'reference_value' => '12345678',
),
),
'customs' =>
array (
0 =>
array (
'invoice_line_number' => '1',
'invoice_line_part_number' => '123',
'invoice_line_description' => 'My Description',
'invoice_line_value' => '1',
'invoice_line_origin_country_code' => 'CA',
'customs_quantity_units' => 'EA',
'commodity_code' => '240110',
),
),
'invoice' => '12345',
'sold_company' => 'Acme Inc.',
'sold_name' => 'John Doe',
'sold_tax_id' => '123abc',
'sold_phone' => '1231231234',
'sold_addr1' => '2000 Meadowvale Rd',
'sold_city' => 'London',
'sold_code' => 'NW14RY',
'sold_country' => 'GB',
'service' => '65',
'shipper' => 'John Doe',
'ship_contact' => 'John Doe',
'ship_name' => 'John Doe',
'ship_addr1' => '2300 Southern Blvd',
'ship_state' => 'NY',
'ship_city' => 'Bronx',
'ship_code' => '10460',
'ship_country' => 'US',
'ship_phone' => '1231231234',
'to_company' => 'Acme Inc.',
'to_attention_name' => 'John Doe',
'to_addr1' => 'Outer Cir',
'to_city' => 'London',
'to_code' => 'NW14RY',
'to_country' => 'GB',
'to_phone' => '1231231234',
'image_type' => 'PNG',
'shipment_description' => 'xxx',
'packaging_type' => '02',
'pickup_type' => '02',
'weight_unit' => 'LBS',
'length_unit' => 'IN',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS',
'params': {'account_number': 'YOUR_ACCOUNT',
'currency': 'CAD',
'customs': [{'commodity_code': '240110',
'customs_quantity_units': 'EA',
'invoice_line_description': 'My Description',
'invoice_line_number': '1',
'invoice_line_origin_country_code': 'CA',
'invoice_line_part_number': '123',
'invoice_line_value': '1'}],
'customs_forms': '01',
'image_type': 'PNG',
'invoice': '12345',
'invoice_date': '20170610',
'invoice_line_total': 100,
'key': 'YOUR_KEY',
'length_unit': 'IN',
'packages': [{'height': 1,
'length': 1,
'reference_code': 'TN',
'reference_value': '12345678',
'weight': 1,
'width': 1}],
'packaging_type': '02',
'password': 'YOUR_PASSWORD',
'pickup_type': '02',
'reason_for_export': 'SALE',
'service': '65',
'ship_addr1': '2300 Southern Blvd',
'ship_city': 'Bronx',
'ship_code': '10460',
'ship_contact': 'John Doe',
'ship_country': 'US',
'ship_name': 'John Doe',
'ship_phone': '1231231234',
'ship_state': 'NY',
'ship_tax_id': 'IMDEU1234567',
'ship_tax_id_type': '0356',
'shipment_description': 'xxx',
'shipper': 'John Doe',
'sold_addr1': '2000 Meadowvale Rd',
'sold_city': 'London',
'sold_code': 'NW14RY',
'sold_company': 'Acme Inc.',
'sold_country': 'GB',
'sold_name': 'John Doe',
'sold_phone': '1231231234',
'sold_tax_id': '123abc',
'test': True,
'to_addr1': 'Outer Cir',
'to_attention_name': 'John Doe',
'to_city': 'London',
'to_code': 'NW14RY',
'to_company': 'Acme Inc.',
'to_country': 'GB',
'to_phone': '1231231234',
'username': 'YOUR_USERNAME',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"SubmitShipment",
"params"=>
{"test"=>true,
"account_number"=>"YOUR_ACCOUNT",
"key"=>"YOUR_KEY",
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"ship_tax_id"=>"IMDEU1234567",
"ship_tax_id_type"=>"0356",
"customs_forms"=>"01",
"currency"=>"CAD",
"invoice_date"=>"20170610",
"reason_for_export"=>"SALE",
"invoice_line_total"=>100,
"packages"=>
[{"weight"=>1,
"length"=>1,
"width"=>1,
"height"=>1,
"reference_code"=>"TN",
"reference_value"=>"12345678"}],
"customs"=>
[{"invoice_line_number"=>"1",
"invoice_line_part_number"=>"123",
"invoice_line_description"=>"My Description",
"invoice_line_value"=>"1",
"invoice_line_origin_country_code"=>"CA",
"customs_quantity_units"=>"EA",
"commodity_code"=>"240110"}],
"invoice"=>"12345",
"sold_company"=>"Acme Inc.",
"sold_name"=>"John Doe",
"sold_tax_id"=>"123abc",
"sold_phone"=>"1231231234",
"sold_addr1"=>"2000 Meadowvale Rd",
"sold_city"=>"London",
"sold_code"=>"NW14RY",
"sold_country"=>"GB",
"service"=>"65",
"shipper"=>"John Doe",
"ship_contact"=>"John Doe",
"ship_name"=>"John Doe",
"ship_addr1"=>"2300 Southern Blvd",
"ship_state"=>"NY",
"ship_city"=>"Bronx",
"ship_code"=>"10460",
"ship_country"=>"US",
"ship_phone"=>"1231231234",
"to_company"=>"Acme Inc.",
"to_attention_name"=>"John Doe",
"to_addr1"=>"Outer Cir",
"to_city"=>"London",
"to_code"=>"NW14RY",
"to_country"=>"GB",
"to_phone"=>"1231231234",
"image_type"=>"PNG",
"shipment_description"=>"xxx",
"packaging_type"=>"02",
"pickup_type"=>"02",
"weight_unit"=>"LBS",
"length_unit"=>"IN"}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"test": true,
"account_number": "YOUR_ACCOUNT",
"key": "YOUR_KEY",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"ship_tax_id": "IMDEU1234567",
"ship_tax_id_type": "0356",
"customs_forms": "01",
"currency": "CAD",
"invoice_date": "20170610",
"reason_for_export": "SALE",
"invoice_line_total": 100,
"packages": [
{
"weight": 1,
"length": 1,
"width": 1,
"height": 1,
"reference_code": "TN",
"reference_value": "12345678"
}
],
"customs": [
{
"invoice_line_number": "1",
"invoice_line_part_number": "123",
"invoice_line_description": "My Description",
"invoice_line_value": "1",
"invoice_line_origin_country_code": "CA",
"customs_quantity_units": "EA",
"commodity_code": "240110"
}
],
"invoice": "12345",
"sold_company": "Acme Inc.",
"sold_name": "John Doe",
"sold_tax_id": "123abc",
"sold_phone": "1231231234",
"sold_addr1": "2000 Meadowvale Rd",
"sold_city": "London",
"sold_code": "NW14RY",
"sold_country": "GB",
"service": "65",
"shipper": "John Doe",
"ship_contact": "John Doe",
"ship_name": "John Doe",
"ship_addr1": "2300 Southern Blvd",
"ship_state": "NY",
"ship_city": "Bronx",
"ship_code": "10460",
"ship_country": "US",
"ship_phone": "1231231234",
"to_company": "Acme Inc.",
"to_attention_name": "John Doe",
"to_addr1": "Outer Cir",
"to_city": "London",
"to_code": "NW14RY",
"to_country": "GB",
"to_phone": "1231231234",
"image_type": "PNG",
"shipment_description": "xxx",
"packaging_type": "02",
"pickup_type": "02",
"weight_unit": "LBS",
"length_unit": "IN"
}
}
)
UPS - Label Email Notifications
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"key": "YOUR_UPS_API_KEY",
"account_number": "YOUR_ACCOUNT_NUMBER",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"notify": [
{
"email": "bob@email.com",
"type": "6"
}
],
"packages": [
{
"weight": 4,
"length": 7
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "GIF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'YOUR_UPS_API_KEY',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'notify' =>
array (
0 =>
array (
'email' => 'bob@email.com',
'type' => '6',
),
),
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
),
),
'service' => '03',
'shipper' => '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_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'GIF',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'image_type': 'GIF',
'key': 'YOUR_UPS_API_KEY',
'notify': [{'email': 'bob@email.com', 'type': '6'}],
'packages': [{'length': 7, 'weight': 4}],
'password': 'YOUR_PASSWORD',
'service': '03',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'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',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"YOUR_UPS_API_KEY",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"notify"=>[{"email"=>"bob@email.com", "type"=>"6"}],
"packages"=>[{"weight"=>4, "length"=>7}],
"service"=>"03",
"shipper"=>"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_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"GIF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"key": "YOUR_UPS_API_KEY",
"account_number": "YOUR_ACCOUNT_NUMBER",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"notify": [
{
"email": "bob@email.com",
"type": "6"
}
],
"packages": [
{
"weight": 4,
"length": 7
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "GIF",
"test": true
}
}
)
UPS - Label Ground Freight Pricing
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_KEY",
"test": true,
"packages": [
{
"weight": 4,
"length": 7,
"freight_class": "55"
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "GIF",
"account_number": "YOUR_ACCOUNT_NUMBER",
"frs_shipment": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'key' => 'YOUR_KEY',
'test' => true,
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'freight_class' => '55',
),
),
'service' => '03',
'shipper' => '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_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'GIF',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'frs_shipment' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'frs_shipment': True,
'image_type': 'GIF',
'key': 'YOUR_KEY',
'packages': [{'freight_class': '55', 'length': 7, 'weight': 4}],
'password': 'YOUR_PASSWORD',
'service': '03',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'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',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"key"=>"YOUR_KEY",
"test"=>true,
"packages"=>[{"weight"=>4, "length"=>7, "freight_class"=>"55"}],
"service"=>"03",
"shipper"=>"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_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"GIF",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"frs_shipment"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_KEY",
"test": true,
"packages": [
{
"weight": 4,
"length": 7,
"freight_class": "55"
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "GIF",
"account_number": "YOUR_ACCOUNT_NUMBER",
"frs_shipment": true
}
}
)
UPS - Label Ground Freight Pricing Third Party Billing
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_KEY",
"test": true,
"service": "03",
"billing": [
{
"type": "transportation",
"payment_type": "third_party",
"company": "Acme Inc",
"account": "ABC123",
"postal_code": "14609",
"country_code": "US"
}
],
"image_type": "PNG",
"frs_shipment": true,
"customs": [],
"weight_unit": "LBS",
"length_unit": "IN",
"pickup_type": "01",
"packaging_type": "02",
"customer_classification": "01",
"ground_freight": true,
"country_code": "US",
"shipper": "kkk",
"ship_phone": "13800138000",
"ship_addr1": "4969 sereno dr",
"ship_city": "Temple City",
"ship_state": "CA",
"ship_code": "91780",
"to_country": "US",
"to_name": "kkk",
"to_phone": "13800138000",
"to_addr1": "4969 sereno dr",
"to_addr2": "",
"to_city": "Temple City",
"to_state": "CA",
"to_code": "91780",
"packages": [
{
"weight": 11.0,
"length": 11.0,
"width": 11.0,
"height": 11.0,
"freight_class": "50",
"reference_value": "ID:11525",
"reference_value2": "",
"reference_value3": ""
}
]
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'key' => 'YOUR_KEY',
'test' => true,
'service' => '03',
'billing' =>
array (
0 =>
array (
'type' => 'transportation',
'payment_type' => 'third_party',
'company' => 'Acme Inc',
'account' => 'ABC123',
'postal_code' => '14609',
'country_code' => 'US',
),
),
'image_type' => 'PNG',
'frs_shipment' => true,
'customs' =>
array (
),
'weight_unit' => 'LBS',
'length_unit' => 'IN',
'pickup_type' => '01',
'packaging_type' => '02',
'customer_classification' => '01',
'ground_freight' => true,
'country_code' => 'US',
'shipper' => 'kkk',
'ship_phone' => '13800138000',
'ship_addr1' => '4969 sereno dr',
'ship_city' => 'Temple City',
'ship_state' => 'CA',
'ship_code' => '91780',
'to_country' => 'US',
'to_name' => 'kkk',
'to_phone' => '13800138000',
'to_addr1' => '4969 sereno dr',
'to_addr2' => '',
'to_city' => 'Temple City',
'to_state' => 'CA',
'to_code' => '91780',
'packages' =>
array (
0 =>
array (
'weight' => 11.0,
'length' => 11.0,
'width' => 11.0,
'height' => 11.0,
'freight_class' => '50',
'reference_value' => 'ID:11525',
'reference_value2' => '',
'reference_value3' => '',
),
),
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS',
'params': {'billing': [{'account': 'ABC123',
'company': 'Acme Inc',
'country_code': 'US',
'payment_type': 'third_party',
'postal_code': '14609',
'type': 'transportation'}],
'country_code': 'US',
'customer_classification': '01',
'customs': [],
'frs_shipment': True,
'ground_freight': True,
'image_type': 'PNG',
'key': 'YOUR_KEY',
'length_unit': 'IN',
'packages': [{'freight_class': '50',
'height': 11.0,
'length': 11.0,
'reference_value': 'ID:11525',
'reference_value2': '',
'reference_value3': '',
'weight': 11.0,
'width': 11.0}],
'packaging_type': '02',
'password': 'YOUR_PASSWORD',
'pickup_type': '01',
'service': '03',
'ship_addr1': '4969 sereno dr',
'ship_city': 'Temple City',
'ship_code': '91780',
'ship_phone': '13800138000',
'ship_state': 'CA',
'shipper': 'kkk',
'test': True,
'to_addr1': '4969 sereno dr',
'to_addr2': '',
'to_city': 'Temple City',
'to_code': '91780',
'to_country': 'US',
'to_name': 'kkk',
'to_phone': '13800138000',
'to_state': 'CA',
'username': 'YOUR_USERNAME',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"key"=>"YOUR_KEY",
"test"=>true,
"service"=>"03",
"billing"=>
[{"type"=>"transportation",
"payment_type"=>"third_party",
"company"=>"Acme Inc",
"account"=>"ABC123",
"postal_code"=>"14609",
"country_code"=>"US"}],
"image_type"=>"PNG",
"frs_shipment"=>true,
"customs"=>[],
"weight_unit"=>"LBS",
"length_unit"=>"IN",
"pickup_type"=>"01",
"packaging_type"=>"02",
"customer_classification"=>"01",
"ground_freight"=>true,
"country_code"=>"US",
"shipper"=>"kkk",
"ship_phone"=>"13800138000",
"ship_addr1"=>"4969 sereno dr",
"ship_city"=>"Temple City",
"ship_state"=>"CA",
"ship_code"=>"91780",
"to_country"=>"US",
"to_name"=>"kkk",
"to_phone"=>"13800138000",
"to_addr1"=>"4969 sereno dr",
"to_addr2"=>"",
"to_city"=>"Temple City",
"to_state"=>"CA",
"to_code"=>"91780",
"packages"=>
[{"weight"=>11.0,
"length"=>11.0,
"width"=>11.0,
"height"=>11.0,
"freight_class"=>"50",
"reference_value"=>"ID:11525",
"reference_value2"=>"",
"reference_value3"=>""}]}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_KEY",
"test": true,
"service": "03",
"billing": [
{
"type": "transportation",
"payment_type": "third_party",
"company": "Acme Inc",
"account": "ABC123",
"postal_code": "14609",
"country_code": "US"
}
],
"image_type": "PNG",
"frs_shipment": true,
"customs": [],
"weight_unit": "LBS",
"length_unit": "IN",
"pickup_type": "01",
"packaging_type": "02",
"customer_classification": "01",
"ground_freight": true,
"country_code": "US",
"shipper": "kkk",
"ship_phone": "13800138000",
"ship_addr1": "4969 sereno dr",
"ship_city": "Temple City",
"ship_state": "CA",
"ship_code": "91780",
"to_country": "US",
"to_name": "kkk",
"to_phone": "13800138000",
"to_addr1": "4969 sereno dr",
"to_addr2": "",
"to_city": "Temple City",
"to_state": "CA",
"to_code": "91780",
"packages": [
{
"weight": 11.0,
"length": 11.0,
"width": 11.0,
"height": 11.0,
"freight_class": "50",
"reference_value": "ID:11525",
"reference_value2": "",
"reference_value3": ""
}
]
}
}
)
UPS - Label Insurance
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"key": "YOUR_KEY",
"account_number": "YOUR_ACCOUNT_NUMBER",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 4,
"length": 7,
"insured_value": 700,
"insured_currency": "USD"
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "GIF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'YOUR_KEY',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'insured_value' => 700,
'insured_currency' => 'USD',
),
),
'service' => '03',
'shipper' => '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_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'GIF',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'image_type': 'GIF',
'key': 'YOUR_KEY',
'packages': [{'insured_currency': 'USD',
'insured_value': 700,
'length': 7,
'weight': 4}],
'password': 'YOUR_PASSWORD',
'service': '03',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'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',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"YOUR_KEY",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"packages"=>
[{"weight"=>4,
"length"=>7,
"insured_value"=>700,
"insured_currency"=>"USD"}],
"service"=>"03",
"shipper"=>"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_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"GIF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"key": "YOUR_KEY",
"account_number": "YOUR_ACCOUNT_NUMBER",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 4,
"length": 7,
"insured_value": 700,
"insured_currency": "USD"
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "GIF",
"test": true
}
}
)
UPS - Label International Bill Receiver
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"test": true,
"customs_account_number": "abc123",
"customs_payment_type": "RECIPIENT",
"customs_forms": "01",
"currency": "CAD",
"invoice_date": "20160910",
"reason_for_export": "SALE",
"invoice_line_total": 100,
"billing": [
{
"type": "duties",
"payment_type": "recipient",
"account": "abc123"
},
{
"type": "transportation",
"payment_type": "sender"
}
],
"packages": [
{
"weight": 1,
"length": 1,
"width": 1,
"height": 1,
"reference_code": "TN",
"reference_value": "12345678"
}
],
"customs": [
{
"invoice_line_number": "1",
"invoice_line_part_number": "123",
"invoice_line_description": "My Description",
"invoice_line_value": "1",
"invoice_line_origin_country_code": "CA",
"customs_quantity_units": "EA"
}
],
"invoice": "12345",
"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": "14",
"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": "02",
"pickup_type": "02",
"weight_unit": "LBS",
"length_unit": "IN"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'SubmitShipment',
'params' =>
array (
'test' => true,
'customs_account_number' => 'abc123',
'customs_payment_type' => 'RECIPIENT',
'customs_forms' => '01',
'currency' => 'CAD',
'invoice_date' => '20160910',
'reason_for_export' => 'SALE',
'invoice_line_total' => 100,
'billing' =>
array (
0 =>
array (
'type' => 'duties',
'payment_type' => 'recipient',
'account' => 'abc123',
),
1 =>
array (
'type' => 'transportation',
'payment_type' => 'sender',
),
),
'packages' =>
array (
0 =>
array (
'weight' => 1,
'length' => 1,
'width' => 1,
'height' => 1,
'reference_code' => 'TN',
'reference_value' => '12345678',
),
),
'customs' =>
array (
0 =>
array (
'invoice_line_number' => '1',
'invoice_line_part_number' => '123',
'invoice_line_description' => 'My Description',
'invoice_line_value' => '1',
'invoice_line_origin_country_code' => 'CA',
'customs_quantity_units' => 'EA',
),
),
'invoice' => '12345',
'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' => '14',
'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' => '02',
'pickup_type' => '02',
'weight_unit' => 'LBS',
'length_unit' => 'IN',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS',
'params': {'billing': [{'account': 'abc123',
'payment_type': 'recipient',
'type': 'duties'},
{'payment_type': 'sender', 'type': 'transportation'}],
'currency': 'CAD',
'customs': [{'customs_quantity_units': 'EA',
'invoice_line_description': 'My Description',
'invoice_line_number': '1',
'invoice_line_origin_country_code': 'CA',
'invoice_line_part_number': '123',
'invoice_line_value': '1'}],
'customs_account_number': 'abc123',
'customs_forms': '01',
'customs_payment_type': 'RECIPIENT',
'image_type': 'PNG',
'invoice': '12345',
'invoice_date': '20160910',
'invoice_line_total': 100,
'length_unit': 'IN',
'packages': [{'height': 1,
'length': 1,
'reference_code': 'TN',
'reference_value': '12345678',
'weight': 1,
'width': 1}],
'packaging_type': '02',
'pickup_type': '02',
'reason_for_export': 'SALE',
'service': '14',
'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': 'LBS'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"SubmitShipment",
"params"=>
{"test"=>true,
"customs_account_number"=>"abc123",
"customs_payment_type"=>"RECIPIENT",
"customs_forms"=>"01",
"currency"=>"CAD",
"invoice_date"=>"20160910",
"reason_for_export"=>"SALE",
"invoice_line_total"=>100,
"billing"=>
[{"type"=>"duties", "payment_type"=>"recipient", "account"=>"abc123"},
{"type"=>"transportation", "payment_type"=>"sender"}],
"packages"=>
[{"weight"=>1,
"length"=>1,
"width"=>1,
"height"=>1,
"reference_code"=>"TN",
"reference_value"=>"12345678"}],
"customs"=>
[{"invoice_line_number"=>"1",
"invoice_line_part_number"=>"123",
"invoice_line_description"=>"My Description",
"invoice_line_value"=>"1",
"invoice_line_origin_country_code"=>"CA",
"customs_quantity_units"=>"EA"}],
"invoice"=>"12345",
"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"=>"14",
"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"=>"02",
"pickup_type"=>"02",
"weight_unit"=>"LBS",
"length_unit"=>"IN"}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"test": true,
"customs_account_number": "abc123",
"customs_payment_type": "RECIPIENT",
"customs_forms": "01",
"currency": "CAD",
"invoice_date": "20160910",
"reason_for_export": "SALE",
"invoice_line_total": 100,
"billing": [
{
"type": "duties",
"payment_type": "recipient",
"account": "abc123"
},
{
"type": "transportation",
"payment_type": "sender"
}
],
"packages": [
{
"weight": 1,
"length": 1,
"width": 1,
"height": 1,
"reference_code": "TN",
"reference_value": "12345678"
}
],
"customs": [
{
"invoice_line_number": "1",
"invoice_line_part_number": "123",
"invoice_line_description": "My Description",
"invoice_line_value": "1",
"invoice_line_origin_country_code": "CA",
"customs_quantity_units": "EA"
}
],
"invoice": "12345",
"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": "14",
"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": "02",
"pickup_type": "02",
"weight_unit": "LBS",
"length_unit": "IN"
}
}
)
UPS - Label International Minimal no paperwork
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT",
"currency": "USD",
"invoice_date": "20230525",
"reason_for_export": "SALE",
"invoice_line_total": 100,
"packages": [
{
"weight": 1,
"reference_code": "TN",
"reference_value": "12345678"
}
],
"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": "11",
"to_name": "John Doe",
"to_attention_name": "John Doe",
"to_addr1": "2000 Meadowvale Rd",
"to_city": "Toronto",
"to_state": "ON",
"to_code": "M1B5K7",
"to_country": "CA",
"to_phone": "1231231234",
"ship_contact": "John Doe",
"shipper": "John Doe",
"ship_addr1": "2300 Southern Blvd",
"ship_state": "NY",
"ship_city": "Bronx",
"ship_code": "10460",
"ship_country": "US",
"ship_phone": "1231231234",
"image_type": "PNG",
"shipment_description": "xxx",
"packaging_type": "02",
"pickup_type": "02",
"weight_unit": "LBS",
"length_unit": "IN"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'test' => true,
'key' => 'your-key-from-authenticate-request',
'account_number' => 'YOUR_ACCOUNT',
'currency' => 'USD',
'invoice_date' => '20230525',
'reason_for_export' => 'SALE',
'invoice_line_total' => 100,
'packages' =>
array (
0 =>
array (
'weight' => 1,
'reference_code' => 'TN',
'reference_value' => '12345678',
),
),
'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' => '11',
'to_name' => 'John Doe',
'to_attention_name' => 'John Doe',
'to_addr1' => '2000 Meadowvale Rd',
'to_city' => 'Toronto',
'to_state' => 'ON',
'to_code' => 'M1B5K7',
'to_country' => 'CA',
'to_phone' => '1231231234',
'ship_contact' => 'John Doe',
'shipper' => 'John Doe',
'ship_addr1' => '2300 Southern Blvd',
'ship_state' => 'NY',
'ship_city' => 'Bronx',
'ship_code' => '10460',
'ship_country' => 'US',
'ship_phone' => '1231231234',
'image_type' => 'PNG',
'shipment_description' => 'xxx',
'packaging_type' => '02',
'pickup_type' => '02',
'weight_unit' => 'LBS',
'length_unit' => 'IN',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS-REST',
'params': {'account_number': 'YOUR_ACCOUNT',
'currency': 'USD',
'image_type': 'PNG',
'invoice_date': '20230525',
'invoice_line_total': 100,
'key': 'your-key-from-authenticate-request',
'length_unit': 'IN',
'packages': [{'reference_code': 'TN',
'reference_value': '12345678',
'weight': 1}],
'packaging_type': '02',
'pickup_type': '02',
'reason_for_export': 'SALE',
'service': '11',
'ship_addr1': '2300 Southern Blvd',
'ship_city': 'Bronx',
'ship_code': '10460',
'ship_contact': 'John Doe',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'NY',
'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': '2000 Meadowvale Rd',
'to_attention_name': 'John Doe',
'to_city': 'Toronto',
'to_code': 'M1B5K7',
'to_country': 'CA',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'ON',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"SubmitShipment",
"params"=>
{"test"=>true,
"key"=>"your-key-from-authenticate-request",
"account_number"=>"YOUR_ACCOUNT",
"currency"=>"USD",
"invoice_date"=>"20230525",
"reason_for_export"=>"SALE",
"invoice_line_total"=>100,
"packages"=>
[{"weight"=>1, "reference_code"=>"TN", "reference_value"=>"12345678"}],
"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"=>"11",
"to_name"=>"John Doe",
"to_attention_name"=>"John Doe",
"to_addr1"=>"2000 Meadowvale Rd",
"to_city"=>"Toronto",
"to_state"=>"ON",
"to_code"=>"M1B5K7",
"to_country"=>"CA",
"to_phone"=>"1231231234",
"ship_contact"=>"John Doe",
"shipper"=>"John Doe",
"ship_addr1"=>"2300 Southern Blvd",
"ship_state"=>"NY",
"ship_city"=>"Bronx",
"ship_code"=>"10460",
"ship_country"=>"US",
"ship_phone"=>"1231231234",
"image_type"=>"PNG",
"shipment_description"=>"xxx",
"packaging_type"=>"02",
"pickup_type"=>"02",
"weight_unit"=>"LBS",
"length_unit"=>"IN"}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT",
"currency": "USD",
"invoice_date": "20230525",
"reason_for_export": "SALE",
"invoice_line_total": 100,
"packages": [
{
"weight": 1,
"reference_code": "TN",
"reference_value": "12345678"
}
],
"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": "11",
"to_name": "John Doe",
"to_attention_name": "John Doe",
"to_addr1": "2000 Meadowvale Rd",
"to_city": "Toronto",
"to_state": "ON",
"to_code": "M1B5K7",
"to_country": "CA",
"to_phone": "1231231234",
"ship_contact": "John Doe",
"shipper": "John Doe",
"ship_addr1": "2300 Southern Blvd",
"ship_state": "NY",
"ship_city": "Bronx",
"ship_code": "10460",
"ship_country": "US",
"ship_phone": "1231231234",
"image_type": "PNG",
"shipment_description": "xxx",
"packaging_type": "02",
"pickup_type": "02",
"weight_unit": "LBS",
"length_unit": "IN"
}
}
)
UPS - Label Letter
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT",
"key": "YOUR_KEY",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 1,
"reference_code": "TN",
"reference_value": "12345678"
}
],
"service": "14",
"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": "Etty Klein",
"to_name": "Etty Klein",
"to_addr1": "6050 Blvd East",
"to_state": "NJ",
"to_city": "West New York",
"to_code": "07093",
"to_country": "US",
"to_phone": "1231231234",
"image_type": "PNG",
"shipment_description": "xxx",
"packaging_type": "01",
"pickup_type": "02",
"weight_unit": "LBS",
"length_unit": "IN",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'SubmitShipment',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT',
'key' => 'YOUR_KEY',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 1,
'reference_code' => 'TN',
'reference_value' => '12345678',
),
),
'service' => '14',
'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' => 'Etty Klein',
'to_name' => 'Etty Klein',
'to_addr1' => '6050 Blvd East',
'to_state' => 'NJ',
'to_city' => 'West New York',
'to_code' => '07093',
'to_country' => 'US',
'to_phone' => '1231231234',
'image_type' => 'PNG',
'shipment_description' => 'xxx',
'packaging_type' => '01',
'pickup_type' => '02',
'weight_unit' => 'LBS',
'length_unit' => 'IN',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS',
'params': {'account_number': 'YOUR_ACCOUNT',
'image_type': 'PNG',
'key': 'YOUR_KEY',
'length_unit': 'IN',
'packages': [{'reference_code': 'TN',
'reference_value': '12345678',
'weight': 1}],
'packaging_type': '01',
'password': 'YOUR_PASSWORD',
'pickup_type': '02',
'service': '14',
'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',
'test': True,
'to_addr1': '6050 Blvd East',
'to_attention_name': 'Etty Klein',
'to_city': 'West New York',
'to_code': '07093',
'to_country': 'US',
'to_name': 'Etty Klein',
'to_phone': '1231231234',
'to_state': 'NJ',
'username': 'YOUR_USERNAME',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"SubmitShipment",
"params"=>
{"account_number"=>"YOUR_ACCOUNT",
"key"=>"YOUR_KEY",
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"packages"=>
[{"weight"=>1, "reference_code"=>"TN", "reference_value"=>"12345678"}],
"service"=>"14",
"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"=>"Etty Klein",
"to_name"=>"Etty Klein",
"to_addr1"=>"6050 Blvd East",
"to_state"=>"NJ",
"to_city"=>"West New York",
"to_code"=>"07093",
"to_country"=>"US",
"to_phone"=>"1231231234",
"image_type"=>"PNG",
"shipment_description"=>"xxx",
"packaging_type"=>"01",
"pickup_type"=>"02",
"weight_unit"=>"LBS",
"length_unit"=>"IN",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT",
"key": "YOUR_KEY",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 1,
"reference_code": "TN",
"reference_value": "12345678"
}
],
"service": "14",
"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": "Etty Klein",
"to_name": "Etty Klein",
"to_addr1": "6050 Blvd East",
"to_state": "NJ",
"to_city": "West New York",
"to_code": "07093",
"to_country": "US",
"to_phone": "1231231234",
"image_type": "PNG",
"shipment_description": "xxx",
"packaging_type": "01",
"pickup_type": "02",
"weight_unit": "LBS",
"length_unit": "IN",
"test": true
}
}
)
UPS - Label Mail Innovations
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"key": "YOUR_UPS_API_KEY",
"account_number": "YOUR_ACCOUNT_NUMBER",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"usps_endorsement": "1",
"cost_center": "00000",
"package_id": "1",
"packaging_type": "62",
"packages": [
{
"weight": 4,
"length": 7
}
],
"service": "M4",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "GIF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'YOUR_UPS_API_KEY',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'usps_endorsement' => '1',
'cost_center' => '00000',
'package_id' => '1',
'packaging_type' => '62',
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
),
),
'service' => 'M4',
'shipper' => '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_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'GIF',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'cost_center': '00000',
'image_type': 'GIF',
'key': 'YOUR_UPS_API_KEY',
'package_id': '1',
'packages': [{'length': 7, 'weight': 4}],
'packaging_type': '62',
'password': 'YOUR_PASSWORD',
'service': 'M4',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'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',
'username': 'YOUR_USERNAME',
'usps_endorsement': '1'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"YOUR_UPS_API_KEY",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"usps_endorsement"=>"1",
"cost_center"=>"00000",
"package_id"=>"1",
"packaging_type"=>"62",
"packages"=>[{"weight"=>4, "length"=>7}],
"service"=>"M4",
"shipper"=>"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_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"GIF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"key": "YOUR_UPS_API_KEY",
"account_number": "YOUR_ACCOUNT_NUMBER",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"usps_endorsement": "1",
"cost_center": "00000",
"package_id": "1",
"packaging_type": "62",
"packages": [
{
"weight": 4,
"length": 7
}
],
"service": "M4",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "GIF",
"test": true
}
}
)
UPS - Label Mail Innovations International
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"test": true,
"key": "YOUR_UPS_API_KEY",
"account_number": "YOUR_ACCOUNT_NUMBER",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"customs_forms": "09",
"currency": "USD",
"invoice_date": "20190423",
"reason_for_export": "SALE",
"invoice_line_total": 100,
"packages": [
{
"weight": 1
}
],
"customs": [
{
"invoice_line_number": "1",
"invoice_line_part_number": "123",
"invoice_line_description": "My Description",
"invoice_line_value": "1",
"invoice_line_origin_country_code": "CA",
"customs_quantity_units": "EA",
"commodity_code": "240110"
}
],
"service": "M6",
"packaging_type": "57",
"customs_content_type": "Merchandise",
"usps_endorsement": "5",
"cost_center": "5",
"package_id": "5",
"invoice": "12345",
"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",
"shipper": "John Doe",
"ship_contact": "John Doe",
"ship_name": "John Doe",
"ship_addr1": "2300 Southern Blvd",
"ship_state": "NY",
"ship_city": "Bronx",
"ship_code": "10460",
"ship_country": "US",
"ship_phone": "1231231234",
"to_company": "Acme Inc.",
"to_attention_name": "John Doe",
"to_addr1": "2000 Meadowvale Rd",
"to_city": "Toronto",
"to_state": "ON",
"to_code": "M1B5K7",
"to_country": "CA",
"to_phone": "1231231234",
"image_type": "GIF",
"shipment_description": "xxx",
"pickup_type": "02",
"weight_unit": "LBS"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'SubmitShipment',
'params' =>
array (
'test' => true,
'key' => 'YOUR_UPS_API_KEY',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'customs_forms' => '09',
'currency' => 'USD',
'invoice_date' => '20190423',
'reason_for_export' => 'SALE',
'invoice_line_total' => 100,
'packages' =>
array (
0 =>
array (
'weight' => 1,
),
),
'customs' =>
array (
0 =>
array (
'invoice_line_number' => '1',
'invoice_line_part_number' => '123',
'invoice_line_description' => 'My Description',
'invoice_line_value' => '1',
'invoice_line_origin_country_code' => 'CA',
'customs_quantity_units' => 'EA',
'commodity_code' => '240110',
),
),
'service' => 'M6',
'packaging_type' => '57',
'customs_content_type' => 'Merchandise',
'usps_endorsement' => '5',
'cost_center' => '5',
'package_id' => '5',
'invoice' => '12345',
'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',
'shipper' => 'John Doe',
'ship_contact' => 'John Doe',
'ship_name' => 'John Doe',
'ship_addr1' => '2300 Southern Blvd',
'ship_state' => 'NY',
'ship_city' => 'Bronx',
'ship_code' => '10460',
'ship_country' => 'US',
'ship_phone' => '1231231234',
'to_company' => 'Acme Inc.',
'to_attention_name' => 'John Doe',
'to_addr1' => '2000 Meadowvale Rd',
'to_city' => 'Toronto',
'to_state' => 'ON',
'to_code' => 'M1B5K7',
'to_country' => 'CA',
'to_phone' => '1231231234',
'image_type' => 'GIF',
'shipment_description' => 'xxx',
'pickup_type' => '02',
'weight_unit' => 'LBS',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'cost_center': '5',
'currency': 'USD',
'customs': [{'commodity_code': '240110',
'customs_quantity_units': 'EA',
'invoice_line_description': 'My Description',
'invoice_line_number': '1',
'invoice_line_origin_country_code': 'CA',
'invoice_line_part_number': '123',
'invoice_line_value': '1'}],
'customs_content_type': 'Merchandise',
'customs_forms': '09',
'image_type': 'GIF',
'invoice': '12345',
'invoice_date': '20190423',
'invoice_line_total': 100,
'key': 'YOUR_UPS_API_KEY',
'package_id': '5',
'packages': [{'weight': 1}],
'packaging_type': '57',
'password': 'YOUR_PASSWORD',
'pickup_type': '02',
'reason_for_export': 'SALE',
'service': 'M6',
'ship_addr1': '2300 Southern Blvd',
'ship_city': 'Bronx',
'ship_code': '10460',
'ship_contact': 'John Doe',
'ship_country': 'US',
'ship_name': 'John Doe',
'ship_phone': '1231231234',
'ship_state': 'NY',
'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': '2000 Meadowvale Rd',
'to_attention_name': 'John Doe',
'to_city': 'Toronto',
'to_code': 'M1B5K7',
'to_company': 'Acme Inc.',
'to_country': 'CA',
'to_phone': '1231231234',
'to_state': 'ON',
'username': 'YOUR_USERNAME',
'usps_endorsement': '5',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"SubmitShipment",
"params"=>
{"test"=>true,
"key"=>"YOUR_UPS_API_KEY",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"customs_forms"=>"09",
"currency"=>"USD",
"invoice_date"=>"20190423",
"reason_for_export"=>"SALE",
"invoice_line_total"=>100,
"packages"=>[{"weight"=>1}],
"customs"=>
[{"invoice_line_number"=>"1",
"invoice_line_part_number"=>"123",
"invoice_line_description"=>"My Description",
"invoice_line_value"=>"1",
"invoice_line_origin_country_code"=>"CA",
"customs_quantity_units"=>"EA",
"commodity_code"=>"240110"}],
"service"=>"M6",
"packaging_type"=>"57",
"customs_content_type"=>"Merchandise",
"usps_endorsement"=>"5",
"cost_center"=>"5",
"package_id"=>"5",
"invoice"=>"12345",
"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",
"shipper"=>"John Doe",
"ship_contact"=>"John Doe",
"ship_name"=>"John Doe",
"ship_addr1"=>"2300 Southern Blvd",
"ship_state"=>"NY",
"ship_city"=>"Bronx",
"ship_code"=>"10460",
"ship_country"=>"US",
"ship_phone"=>"1231231234",
"to_company"=>"Acme Inc.",
"to_attention_name"=>"John Doe",
"to_addr1"=>"2000 Meadowvale Rd",
"to_city"=>"Toronto",
"to_state"=>"ON",
"to_code"=>"M1B5K7",
"to_country"=>"CA",
"to_phone"=>"1231231234",
"image_type"=>"GIF",
"shipment_description"=>"xxx",
"pickup_type"=>"02",
"weight_unit"=>"LBS"}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"test": true,
"key": "YOUR_UPS_API_KEY",
"account_number": "YOUR_ACCOUNT_NUMBER",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"customs_forms": "09",
"currency": "USD",
"invoice_date": "20190423",
"reason_for_export": "SALE",
"invoice_line_total": 100,
"packages": [
{
"weight": 1
}
],
"customs": [
{
"invoice_line_number": "1",
"invoice_line_part_number": "123",
"invoice_line_description": "My Description",
"invoice_line_value": "1",
"invoice_line_origin_country_code": "CA",
"customs_quantity_units": "EA",
"commodity_code": "240110"
}
],
"service": "M6",
"packaging_type": "57",
"customs_content_type": "Merchandise",
"usps_endorsement": "5",
"cost_center": "5",
"package_id": "5",
"invoice": "12345",
"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",
"shipper": "John Doe",
"ship_contact": "John Doe",
"ship_name": "John Doe",
"ship_addr1": "2300 Southern Blvd",
"ship_state": "NY",
"ship_city": "Bronx",
"ship_code": "10460",
"ship_country": "US",
"ship_phone": "1231231234",
"to_company": "Acme Inc.",
"to_attention_name": "John Doe",
"to_addr1": "2000 Meadowvale Rd",
"to_city": "Toronto",
"to_state": "ON",
"to_code": "M1B5K7",
"to_country": "CA",
"to_phone": "1231231234",
"image_type": "GIF",
"shipment_description": "xxx",
"pickup_type": "02",
"weight_unit": "LBS"
}
}
)
UPS - Label Medical Dry Ice
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_KEY",
"test": true,
"packages": [
{
"weight": 6,
"length": 7
}
],
"dry_ice": {
"regulation_set": "CFR",
"weight": 2,
"medical_use": true
},
"currency": "USD",
"service": "02",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PNG"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'key' => 'YOUR_KEY',
'test' => true,
'packages' =>
array (
0 =>
array (
'weight' => 6,
'length' => 7,
),
),
'dry_ice' =>
array (
'regulation_set' => 'CFR',
'weight' => 2,
'medical_use' => true,
),
'currency' => 'USD',
'service' => '02',
'shipper' => '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_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'PNG',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS',
'params': {'currency': 'USD',
'dry_ice': {'medical_use': True,
'regulation_set': 'CFR',
'weight': 2},
'image_type': 'PNG',
'key': 'YOUR_KEY',
'packages': [{'length': 7, 'weight': 6}],
'password': 'YOUR_PASSWORD',
'service': '02',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'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',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"key"=>"YOUR_KEY",
"test"=>true,
"packages"=>[{"weight"=>6, "length"=>7}],
"dry_ice"=>{"regulation_set"=>"CFR", "weight"=>2, "medical_use"=>true},
"currency"=>"USD",
"service"=>"02",
"shipper"=>"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_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"PNG"}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_KEY",
"test": true,
"packages": [
{
"weight": 6,
"length": 7
}
],
"dry_ice": {
"regulation_set": "CFR",
"weight": 2,
"medical_use": true
},
"currency": "USD",
"service": "02",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PNG"
}
}
)
UPS - Label Recovery
{
"carrier": "UPS",
"action": "LabelRecovery",
"params": {
"tracking_number": "1Z12345E8791315413",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'LabelRecovery',
'params' =>
array (
'tracking_number' => '1Z12345E8791315413',
'test' => true,
),
)
);
rs.request(
{'action': 'LabelRecovery',
'carrier': 'UPS',
'params': {'test': True, 'tracking_number': '1Z12345E8791315413'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"LabelRecovery",
"params"=>{"tracking_number"=>"1Z12345E8791315413", "test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "LabelRecovery",
"params": {
"tracking_number": "1Z12345E8791315413",
"test": true
}
}
)
UPS - Label Reference Values
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"key": "YOUR_UPS_API_KEY",
"account_number": "YOUR_ACCOUNT_NUMBER",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 4,
"reference_code": "PO",
"reference_value": "12382871",
"reference_barcode": true,
"reference_code2": "IN",
"reference_value2": "10000"
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "Png",
"from_company": "RocketShipIt",
"from_name": "Mark Sanborn",
"from_addr1": "940 Presidio Ave",
"from_addr2": "#103",
"from_city": "San Francisco",
"from_state": "CA",
"from_code": "94115",
"return_code": "9",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'YOUR_UPS_API_KEY',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 4,
'reference_code' => 'PO',
'reference_value' => '12382871',
'reference_barcode' => true,
'reference_code2' => 'IN',
'reference_value2' => '10000',
),
),
'service' => '03',
'shipper' => '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_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'Png',
'from_company' => 'RocketShipIt',
'from_name' => 'Mark Sanborn',
'from_addr1' => '940 Presidio Ave',
'from_addr2' => '#103',
'from_city' => 'San Francisco',
'from_state' => 'CA',
'from_code' => '94115',
'return_code' => '9',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'from_addr1': '940 Presidio Ave',
'from_addr2': '#103',
'from_city': 'San Francisco',
'from_code': '94115',
'from_company': 'RocketShipIt',
'from_name': 'Mark Sanborn',
'from_state': 'CA',
'image_type': 'Png',
'key': 'YOUR_UPS_API_KEY',
'packages': [{'reference_barcode': True,
'reference_code': 'PO',
'reference_code2': 'IN',
'reference_value': '12382871',
'reference_value2': '10000',
'weight': 4}],
'password': 'YOUR_PASSWORD',
'return_code': '9',
'service': '03',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'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',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"YOUR_UPS_API_KEY",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"packages"=>
[{"weight"=>4,
"reference_code"=>"PO",
"reference_value"=>"12382871",
"reference_barcode"=>true,
"reference_code2"=>"IN",
"reference_value2"=>"10000"}],
"service"=>"03",
"shipper"=>"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_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"Png",
"from_company"=>"RocketShipIt",
"from_name"=>"Mark Sanborn",
"from_addr1"=>"940 Presidio Ave",
"from_addr2"=>"#103",
"from_city"=>"San Francisco",
"from_state"=>"CA",
"from_code"=>"94115",
"return_code"=>"9",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"key": "YOUR_UPS_API_KEY",
"account_number": "YOUR_ACCOUNT_NUMBER",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 4,
"reference_code": "PO",
"reference_value": "12382871",
"reference_barcode": true,
"reference_code2": "IN",
"reference_value2": "10000"
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "Png",
"from_company": "RocketShipIt",
"from_name": "Mark Sanborn",
"from_addr1": "940 Presidio Ave",
"from_addr2": "#103",
"from_city": "San Francisco",
"from_state": "CA",
"from_code": "94115",
"return_code": "9",
"test": true
}
}
)
UPS - Label Return
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_KEY",
"account_number": "YOUR_ACCOUNT_NUMBER",
"packages": [
{
"weight": 4
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "GIF",
"from_company": "RocketShipIt",
"from_name": "Mark Sanborn",
"from_addr1": "940 Presidio Ave",
"from_addr2": "#103",
"from_city": "San Francisco",
"from_state": "CA",
"from_code": "94115",
"return_code": "9",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'key' => 'YOUR_KEY',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'packages' =>
array (
0 =>
array (
'weight' => 4,
),
),
'service' => '03',
'shipper' => '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_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'GIF',
'from_company' => 'RocketShipIt',
'from_name' => 'Mark Sanborn',
'from_addr1' => '940 Presidio Ave',
'from_addr2' => '#103',
'from_city' => 'San Francisco',
'from_state' => 'CA',
'from_code' => '94115',
'return_code' => '9',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'from_addr1': '940 Presidio Ave',
'from_addr2': '#103',
'from_city': 'San Francisco',
'from_code': '94115',
'from_company': 'RocketShipIt',
'from_name': 'Mark Sanborn',
'from_state': 'CA',
'image_type': 'GIF',
'key': 'YOUR_KEY',
'packages': [{'weight': 4}],
'password': 'YOUR_PASSWORD',
'return_code': '9',
'service': '03',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'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',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"key"=>"YOUR_KEY",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"packages"=>[{"weight"=>4}],
"service"=>"03",
"shipper"=>"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_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"GIF",
"from_company"=>"RocketShipIt",
"from_name"=>"Mark Sanborn",
"from_addr1"=>"940 Presidio Ave",
"from_addr2"=>"#103",
"from_city"=>"San Francisco",
"from_state"=>"CA",
"from_code"=>"94115",
"return_code"=>"9",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_KEY",
"account_number": "YOUR_ACCOUNT_NUMBER",
"packages": [
{
"weight": 4
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "GIF",
"from_company": "RocketShipIt",
"from_name": "Mark Sanborn",
"from_addr1": "940 Presidio Ave",
"from_addr2": "#103",
"from_city": "San Francisco",
"from_state": "CA",
"from_code": "94115",
"return_code": "9",
"test": true
}
}
)
UPS - Label Return w/ Email Delivery
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"key": "YOUR_UPS_KEY",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"return_code": "8",
"notify": [
{
"type": "RETURN",
"email": "bob@email.com",
"undeliverable_email": "foo@bar.com",
"from_email": "blah@email.com",
"from_name": "John Doe"
}
],
"packages": [
{
"weight": 4
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "GIF",
"from_company": "RocketShipIt",
"from_name": "Mark Sanborn",
"from_addr1": "940 Presidio Ave",
"from_addr2": "#103",
"from_city": "San Francisco",
"from_state": "CA",
"from_code": "94115",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'SubmitShipment',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'key' => 'YOUR_UPS_KEY',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'return_code' => '8',
'notify' =>
array (
0 =>
array (
'type' => 'RETURN',
'email' => 'bob@email.com',
'undeliverable_email' => 'foo@bar.com',
'from_email' => 'blah@email.com',
'from_name' => 'John Doe',
),
),
'packages' =>
array (
0 =>
array (
'weight' => 4,
),
),
'service' => '03',
'shipper' => '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_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'GIF',
'from_company' => 'RocketShipIt',
'from_name' => 'Mark Sanborn',
'from_addr1' => '940 Presidio Ave',
'from_addr2' => '#103',
'from_city' => 'San Francisco',
'from_state' => 'CA',
'from_code' => '94115',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'from_addr1': '940 Presidio Ave',
'from_addr2': '#103',
'from_city': 'San Francisco',
'from_code': '94115',
'from_company': 'RocketShipIt',
'from_name': 'Mark Sanborn',
'from_state': 'CA',
'image_type': 'GIF',
'key': 'YOUR_UPS_KEY',
'notify': [{'email': 'bob@email.com',
'from_email': 'blah@email.com',
'from_name': 'John Doe',
'type': 'RETURN',
'undeliverable_email': 'foo@bar.com'}],
'packages': [{'weight': 4}],
'password': 'YOUR_PASSWORD',
'return_code': '8',
'service': '03',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'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',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"SubmitShipment",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"key"=>"YOUR_UPS_KEY",
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"return_code"=>"8",
"notify"=>
[{"type"=>"RETURN",
"email"=>"bob@email.com",
"undeliverable_email"=>"foo@bar.com",
"from_email"=>"blah@email.com",
"from_name"=>"John Doe"}],
"packages"=>[{"weight"=>4}],
"service"=>"03",
"shipper"=>"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_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"GIF",
"from_company"=>"RocketShipIt",
"from_name"=>"Mark Sanborn",
"from_addr1"=>"940 Presidio Ave",
"from_addr2"=>"#103",
"from_city"=>"San Francisco",
"from_state"=>"CA",
"from_code"=>"94115",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"key": "YOUR_UPS_KEY",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"return_code": "8",
"notify": [
{
"type": "RETURN",
"email": "bob@email.com",
"undeliverable_email": "foo@bar.com",
"from_email": "blah@email.com",
"from_name": "John Doe"
}
],
"packages": [
{
"weight": 4
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "GIF",
"from_company": "RocketShipIt",
"from_name": "Mark Sanborn",
"from_addr1": "940 Presidio Ave",
"from_addr2": "#103",
"from_city": "San Francisco",
"from_state": "CA",
"from_code": "94115",
"test": true
}
}
)
UPS - Label SurePost
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"key": "YOUR_UPS_KEY",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 4,
"length": 7
}
],
"service": "93",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "GIF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'SubmitShipment',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'key' => 'YOUR_UPS_KEY',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
),
),
'service' => '93',
'shipper' => '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_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'GIF',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'image_type': 'GIF',
'key': 'YOUR_UPS_KEY',
'packages': [{'length': 7, 'weight': 4}],
'password': 'YOUR_PASSWORD',
'service': '93',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'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',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"SubmitShipment",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"key"=>"YOUR_UPS_KEY",
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"packages"=>[{"weight"=>4, "length"=>7}],
"service"=>"93",
"shipper"=>"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_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"GIF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"key": "YOUR_UPS_KEY",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 4,
"length": 7
}
],
"service": "93",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "GIF",
"test": true
}
}
)
UPS - Label Third Party Billing
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"key": "YOUR_UPS_API_KEY",
"account_number": "YOUR_ACCOUNT_NUMBER",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"billing": [
{
"type": "transportation",
"payment_type": "third_party",
"account": "abc123",
"postal_code": "94608",
"country_code": "US"
}
],
"packages": [
{
"weight": 4,
"length": 7
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "GIF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'YOUR_UPS_API_KEY',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'billing' =>
array (
0 =>
array (
'type' => 'transportation',
'payment_type' => 'third_party',
'account' => 'abc123',
'postal_code' => '94608',
'country_code' => 'US',
),
),
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
),
),
'service' => '03',
'shipper' => '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_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'GIF',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'billing': [{'account': 'abc123',
'country_code': 'US',
'payment_type': 'third_party',
'postal_code': '94608',
'type': 'transportation'}],
'image_type': 'GIF',
'key': 'YOUR_UPS_API_KEY',
'packages': [{'length': 7, 'weight': 4}],
'password': 'YOUR_PASSWORD',
'service': '03',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'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',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"YOUR_UPS_API_KEY",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"billing"=>
[{"type"=>"transportation",
"payment_type"=>"third_party",
"account"=>"abc123",
"postal_code"=>"94608",
"country_code"=>"US"}],
"packages"=>[{"weight"=>4, "length"=>7}],
"service"=>"03",
"shipper"=>"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_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"GIF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"key": "YOUR_UPS_API_KEY",
"account_number": "YOUR_ACCOUNT_NUMBER",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"billing": [
{
"type": "transportation",
"payment_type": "third_party",
"account": "abc123",
"postal_code": "94608",
"country_code": "US"
}
],
"packages": [
{
"weight": 4,
"length": 7
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "GIF",
"test": true
}
}
)
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"key": "YOUR_UPS_KEY",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"discount": {
"code": "adsf",
"alias": "1231"
},
"packages": [
{
"weight": 4,
"length": 7,
"width": 5,
"height": 5
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PNG",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'SubmitShipment',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'key' => 'YOUR_UPS_KEY',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'discount' =>
array (
'code' => 'adsf',
'alias' => '1231',
),
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'width' => 5,
'height' => 5,
),
),
'service' => '03',
'shipper' => '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_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'PNG',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'discount': {'alias': '1231', 'code': 'adsf'},
'image_type': 'PNG',
'key': 'YOUR_UPS_KEY',
'packages': [{'height': 5, 'length': 7, 'weight': 4, 'width': 5}],
'password': 'YOUR_PASSWORD',
'service': '03',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'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',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"SubmitShipment",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"key"=>"YOUR_UPS_KEY",
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"discount"=>{"code"=>"adsf", "alias"=>"1231"},
"packages"=>[{"weight"=>4, "length"=>7, "width"=>5, "height"=>5}],
"service"=>"03",
"shipper"=>"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_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"PNG",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"key": "YOUR_UPS_KEY",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"discount": {
"code": "adsf",
"alias": "1231"
},
"packages": [
{
"weight": 4,
"length": 7,
"width": 5,
"height": 5
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PNG",
"test": true
}
}
)
UPS - Label w/ Access Point
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"to_email": "customer@email.com",
"packages": [
{
"weight": 4,
"length": 7
}
],
"service": "03",
"shipper": "Acme Inc",
"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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"alt_name": "G&R MARKET DELI",
"alt_addr1": "2601 Sutter St",
"alt_state": "CA",
"alt_city": "San Francisco",
"alt_code": "94115",
"alt_country": "US",
"image_type": "GIF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'SubmitShipment',
'params' =>
array (
'to_email' => 'customer@email.com',
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
),
),
'service' => '03',
'shipper' => 'Acme Inc',
'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_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'alt_name' => 'G&R MARKET DELI',
'alt_addr1' => '2601 Sutter St',
'alt_state' => 'CA',
'alt_city' => 'San Francisco',
'alt_code' => '94115',
'alt_country' => 'US',
'image_type' => 'GIF',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS',
'params': {'alt_addr1': '2601 Sutter St',
'alt_city': 'San Francisco',
'alt_code': '94115',
'alt_country': 'US',
'alt_name': 'G&R MARKET DELI',
'alt_state': 'CA',
'image_type': 'GIF',
'packages': [{'length': 7, 'weight': 4}],
'service': '03',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'Acme Inc',
'test': True,
'to_addr1': '940 Presidio Ave',
'to_addr2': '#103',
'to_city': 'San Francisco',
'to_code': '94115',
'to_country': 'US',
'to_email': 'customer@email.com',
'to_name': 'John Doe',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"SubmitShipment",
"params"=>
{"to_email"=>"customer@email.com",
"packages"=>[{"weight"=>4, "length"=>7}],
"service"=>"03",
"shipper"=>"Acme Inc",
"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_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"alt_name"=>"G&R MARKET DELI",
"alt_addr1"=>"2601 Sutter St",
"alt_state"=>"CA",
"alt_city"=>"San Francisco",
"alt_code"=>"94115",
"alt_country"=>"US",
"image_type"=>"GIF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"to_email": "customer@email.com",
"packages": [
{
"weight": 4,
"length": 7
}
],
"service": "03",
"shipper": "Acme Inc",
"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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"alt_name": "G&R MARKET DELI",
"alt_addr1": "2601 Sutter St",
"alt_state": "CA",
"alt_city": "San Francisco",
"alt_code": "94115",
"alt_country": "US",
"image_type": "GIF",
"test": true
}
}
)
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"test": true,
"account_number": "YOUR_ACCOUNT",
"key": "YOUR_KEY",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"customs_forms": "01",
"currency": "CAD",
"invoice_date": "20160910",
"reason_for_export": "SALE",
"invoice_line_total": 100,
"documents_only": true,
"packages": [
{
"weight": 1,
"reference_code": "TN",
"reference_value": "12345678"
}
],
"customs": [
{
"invoice_line_number": "1",
"invoice_line_part_number": "123",
"invoice_line_description": "My Description",
"invoice_line_value": "1",
"invoice_line_origin_country_code": "CA",
"customs_quantity_units": "EA"
}
],
"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": "14",
"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": "01",
"pickup_type": "02",
"weight_unit": "LBS",
"length_unit": "IN"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'SubmitShipment',
'params' =>
array (
'test' => true,
'account_number' => 'YOUR_ACCOUNT',
'key' => 'YOUR_KEY',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'customs_forms' => '01',
'currency' => 'CAD',
'invoice_date' => '20160910',
'reason_for_export' => 'SALE',
'invoice_line_total' => 100,
'documents_only' => true,
'packages' =>
array (
0 =>
array (
'weight' => 1,
'reference_code' => 'TN',
'reference_value' => '12345678',
),
),
'customs' =>
array (
0 =>
array (
'invoice_line_number' => '1',
'invoice_line_part_number' => '123',
'invoice_line_description' => 'My Description',
'invoice_line_value' => '1',
'invoice_line_origin_country_code' => 'CA',
'customs_quantity_units' => 'EA',
),
),
'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' => '14',
'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' => '01',
'pickup_type' => '02',
'weight_unit' => 'LBS',
'length_unit' => 'IN',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS',
'params': {'account_number': 'YOUR_ACCOUNT',
'currency': 'CAD',
'customs': [{'customs_quantity_units': 'EA',
'invoice_line_description': 'My Description',
'invoice_line_number': '1',
'invoice_line_origin_country_code': 'CA',
'invoice_line_part_number': '123',
'invoice_line_value': '1'}],
'customs_forms': '01',
'documents_only': True,
'image_type': 'PNG',
'invoice_date': '20160910',
'invoice_line_total': 100,
'key': 'YOUR_KEY',
'length_unit': 'IN',
'packages': [{'reference_code': 'TN',
'reference_value': '12345678',
'weight': 1}],
'packaging_type': '01',
'password': 'YOUR_PASSWORD',
'pickup_type': '02',
'reason_for_export': 'SALE',
'service': '14',
'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',
'username': 'YOUR_USERNAME',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"SubmitShipment",
"params"=>
{"test"=>true,
"account_number"=>"YOUR_ACCOUNT",
"key"=>"YOUR_KEY",
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"customs_forms"=>"01",
"currency"=>"CAD",
"invoice_date"=>"20160910",
"reason_for_export"=>"SALE",
"invoice_line_total"=>100,
"documents_only"=>true,
"packages"=>
[{"weight"=>1, "reference_code"=>"TN", "reference_value"=>"12345678"}],
"customs"=>
[{"invoice_line_number"=>"1",
"invoice_line_part_number"=>"123",
"invoice_line_description"=>"My Description",
"invoice_line_value"=>"1",
"invoice_line_origin_country_code"=>"CA",
"customs_quantity_units"=>"EA"}],
"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"=>"14",
"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"=>"01",
"pickup_type"=>"02",
"weight_unit"=>"LBS",
"length_unit"=>"IN"}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "SubmitShipment",
"params": {
"test": true,
"account_number": "YOUR_ACCOUNT",
"key": "YOUR_KEY",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"customs_forms": "01",
"currency": "CAD",
"invoice_date": "20160910",
"reason_for_export": "SALE",
"invoice_line_total": 100,
"documents_only": true,
"packages": [
{
"weight": 1,
"reference_code": "TN",
"reference_value": "12345678"
}
],
"customs": [
{
"invoice_line_number": "1",
"invoice_line_part_number": "123",
"invoice_line_description": "My Description",
"invoice_line_value": "1",
"invoice_line_origin_country_code": "CA",
"customs_quantity_units": "EA"
}
],
"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": "14",
"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": "01",
"pickup_type": "02",
"weight_unit": "LBS",
"length_unit": "IN"
}
}
)
UPS - Locator
{
"carrier": "UPS",
"action": "FindLocations",
"params": {
"request_option": "64",
"ship_city": "Atlanta",
"ship_state": "GA",
"ship_code": "85281",
"ship_code_extended": "4510",
"ship_country": "US",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'FindLocations',
'params' =>
array (
'request_option' => '64',
'ship_city' => 'Atlanta',
'ship_state' => 'GA',
'ship_code' => '85281',
'ship_code_extended' => '4510',
'ship_country' => 'US',
'test' => true,
),
)
);
rs.request(
{'action': 'FindLocations',
'carrier': 'UPS',
'params': {'request_option': '64',
'ship_city': 'Atlanta',
'ship_code': '85281',
'ship_code_extended': '4510',
'ship_country': 'US',
'ship_state': 'GA',
'test': True}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"FindLocations",
"params"=>
{"request_option"=>"64",
"ship_city"=>"Atlanta",
"ship_state"=>"GA",
"ship_code"=>"85281",
"ship_code_extended"=>"4510",
"ship_country"=>"US",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "FindLocations",
"params": {
"request_option": "64",
"ship_city": "Atlanta",
"ship_state": "GA",
"ship_code": "85281",
"ship_code_extended": "4510",
"ship_country": "US",
"test": true
}
}
)
UPS - Pickup Cancel
{
"carrier": "UPS",
"action": "CancelPickup",
"params": {
"pickup_id": "2929AONCALL",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_KEY",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'CancelPickup',
'params' =>
array (
'pickup_id' => '2929AONCALL',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'key' => 'YOUR_KEY',
'test' => true,
),
)
);
rs.request(
{'action': 'CancelPickup',
'carrier': 'UPS',
'params': {'key': 'YOUR_KEY',
'password': 'YOUR_PASSWORD',
'pickup_id': '2929AONCALL',
'test': True,
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"CancelPickup",
"params"=>
{"pickup_id"=>"2929AONCALL",
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"key"=>"YOUR_KEY",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "CancelPickup",
"params": {
"pickup_id": "2929AONCALL",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_KEY",
"test": true
}
}
)
UPS - Pickup Freight
{
"carrier": "UPS",
"action": "CreatePickup",
"params": {
"packaging_type": "PLT",
"packages": [
{
"weight": 100
}
],
"weight": 100,
"ground_freight": true,
"pickup_company_name": "Acme Inc",
"pickup_contact_name": "Mark Sanborn",
"pickup_addr1": "940 Presidio Ave",
"pickup_city": "San Francisco",
"pickup_state": "CA",
"pickup_code": "94115",
"pickup_country": "US",
"pickup_phone": "123-123-1234",
"pickup_email": "john@company.com",
"to_name": "John Doe",
"to_addr1": "2920 Zoo Drive",
"to_state": "CA",
"to_city": "San Diego",
"to_code": "92112",
"to_country": "US",
"pickup_date": "20190212",
"close_time": "1600",
"ready_time": "0800",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'CreatePickup',
'params' =>
array (
'packaging_type' => 'PLT',
'packages' =>
array (
0 =>
array (
'weight' => 100,
),
),
'weight' => 100,
'ground_freight' => true,
'pickup_company_name' => 'Acme Inc',
'pickup_contact_name' => 'Mark Sanborn',
'pickup_addr1' => '940 Presidio Ave',
'pickup_city' => 'San Francisco',
'pickup_state' => 'CA',
'pickup_code' => '94115',
'pickup_country' => 'US',
'pickup_phone' => '123-123-1234',
'pickup_email' => 'john@company.com',
'to_name' => 'John Doe',
'to_addr1' => '2920 Zoo Drive',
'to_state' => 'CA',
'to_city' => 'San Diego',
'to_code' => '92112',
'to_country' => 'US',
'pickup_date' => '20190212',
'close_time' => '1600',
'ready_time' => '0800',
'test' => true,
),
)
);
rs.request(
{'action': 'CreatePickup',
'carrier': 'UPS',
'params': {'close_time': '1600',
'ground_freight': True,
'packages': [{'weight': 100}],
'packaging_type': 'PLT',
'pickup_addr1': '940 Presidio Ave',
'pickup_city': 'San Francisco',
'pickup_code': '94115',
'pickup_company_name': 'Acme Inc',
'pickup_contact_name': 'Mark Sanborn',
'pickup_country': 'US',
'pickup_date': '20190212',
'pickup_email': 'john@company.com',
'pickup_phone': '123-123-1234',
'pickup_state': 'CA',
'ready_time': '0800',
'test': True,
'to_addr1': '2920 Zoo Drive',
'to_city': 'San Diego',
'to_code': '92112',
'to_country': 'US',
'to_name': 'John Doe',
'to_state': 'CA',
'weight': 100}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"CreatePickup",
"params"=>
{"packaging_type"=>"PLT",
"packages"=>[{"weight"=>100}],
"weight"=>100,
"ground_freight"=>true,
"pickup_company_name"=>"Acme Inc",
"pickup_contact_name"=>"Mark Sanborn",
"pickup_addr1"=>"940 Presidio Ave",
"pickup_city"=>"San Francisco",
"pickup_state"=>"CA",
"pickup_code"=>"94115",
"pickup_country"=>"US",
"pickup_phone"=>"123-123-1234",
"pickup_email"=>"john@company.com",
"to_name"=>"John Doe",
"to_addr1"=>"2920 Zoo Drive",
"to_state"=>"CA",
"to_city"=>"San Diego",
"to_code"=>"92112",
"to_country"=>"US",
"pickup_date"=>"20190212",
"close_time"=>"1600",
"ready_time"=>"0800",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "CreatePickup",
"params": {
"packaging_type": "PLT",
"packages": [
{
"weight": 100
}
],
"weight": 100,
"ground_freight": true,
"pickup_company_name": "Acme Inc",
"pickup_contact_name": "Mark Sanborn",
"pickup_addr1": "940 Presidio Ave",
"pickup_city": "San Francisco",
"pickup_state": "CA",
"pickup_code": "94115",
"pickup_country": "US",
"pickup_phone": "123-123-1234",
"pickup_email": "john@company.com",
"to_name": "John Doe",
"to_addr1": "2920 Zoo Drive",
"to_state": "CA",
"to_city": "San Diego",
"to_code": "92112",
"to_country": "US",
"pickup_date": "20190212",
"close_time": "1600",
"ready_time": "0800",
"test": true
}
}
)
UPS - Pickup Rate
{
"carrier": "UPS",
"action": "PickupRate",
"params": {
"key": "YOUR_KEY",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"pickup_addr1": "940 Presidio Ave",
"pickup_city": "San Francisco",
"pickup_state": "CA",
"pickup_code": "94115",
"pickup_country": "US",
"to_name": "John Doe",
"to_addr1": "2920 Zoo Drive",
"to_state": "CA",
"to_city": "San Diego",
"to_code": "92112",
"to_country": "US",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'PickupRate',
'params' =>
array (
'key' => 'YOUR_KEY',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'pickup_addr1' => '940 Presidio Ave',
'pickup_city' => 'San Francisco',
'pickup_state' => 'CA',
'pickup_code' => '94115',
'pickup_country' => 'US',
'to_name' => 'John Doe',
'to_addr1' => '2920 Zoo Drive',
'to_state' => 'CA',
'to_city' => 'San Diego',
'to_code' => '92112',
'to_country' => 'US',
'test' => true,
),
)
);
rs.request(
{'action': 'PickupRate',
'carrier': 'UPS',
'params': {'key': 'YOUR_KEY',
'password': 'YOUR_PASSWORD',
'pickup_addr1': '940 Presidio Ave',
'pickup_city': 'San Francisco',
'pickup_code': '94115',
'pickup_country': 'US',
'pickup_state': 'CA',
'test': True,
'to_addr1': '2920 Zoo Drive',
'to_city': 'San Diego',
'to_code': '92112',
'to_country': 'US',
'to_name': 'John Doe',
'to_state': 'CA',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"PickupRate",
"params"=>
{"key"=>"YOUR_KEY",
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"pickup_addr1"=>"940 Presidio Ave",
"pickup_city"=>"San Francisco",
"pickup_state"=>"CA",
"pickup_code"=>"94115",
"pickup_country"=>"US",
"to_name"=>"John Doe",
"to_addr1"=>"2920 Zoo Drive",
"to_state"=>"CA",
"to_city"=>"San Diego",
"to_code"=>"92112",
"to_country"=>"US",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "PickupRate",
"params": {
"key": "YOUR_KEY",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"pickup_addr1": "940 Presidio Ave",
"pickup_city": "San Francisco",
"pickup_state": "CA",
"pickup_code": "94115",
"pickup_country": "US",
"to_name": "John Doe",
"to_addr1": "2920 Zoo Drive",
"to_state": "CA",
"to_city": "San Diego",
"to_code": "92112",
"to_country": "US",
"test": true
}
}
)
UPS - Pickup Schedule
{
"carrier": "UPS",
"action": "CreatePickup",
"params": {
"key": "YOUR_KEY",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"pickup_company_name": "Acme Inc",
"pickup_contact_name": "Mark Sanborn",
"pickup_addr1": "940 Presidio Ave",
"pickup_city": "San Francisco",
"pickup_state": "CA",
"pickup_code": "94115",
"pickup_room": "A",
"pickup_floor": "2",
"pickup_country": "US",
"pickup_phone": "123-123-1234",
"pickup_service_code": "002",
"pickup_container_code": "01",
"pickup_quantity": 1,
"pickup_destination": "US",
"payment_method": "00",
"to_name": "John Doe",
"to_addr1": "2920 Zoo Drive",
"to_state": "CA",
"to_city": "San Diego",
"to_code": "92112",
"to_country": "US",
"pickup_date": "20160112",
"close_time": "0900",
"ready_time": "0800",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'CreatePickup',
'params' =>
array (
'key' => 'YOUR_KEY',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'pickup_company_name' => 'Acme Inc',
'pickup_contact_name' => 'Mark Sanborn',
'pickup_addr1' => '940 Presidio Ave',
'pickup_city' => 'San Francisco',
'pickup_state' => 'CA',
'pickup_code' => '94115',
'pickup_room' => 'A',
'pickup_floor' => '2',
'pickup_country' => 'US',
'pickup_phone' => '123-123-1234',
'pickup_service_code' => '002',
'pickup_container_code' => '01',
'pickup_quantity' => 1,
'pickup_destination' => 'US',
'payment_method' => '00',
'to_name' => 'John Doe',
'to_addr1' => '2920 Zoo Drive',
'to_state' => 'CA',
'to_city' => 'San Diego',
'to_code' => '92112',
'to_country' => 'US',
'pickup_date' => '20160112',
'close_time' => '0900',
'ready_time' => '0800',
'test' => true,
),
)
);
rs.request(
{'action': 'CreatePickup',
'carrier': 'UPS',
'params': {'close_time': '0900',
'key': 'YOUR_KEY',
'password': 'YOUR_PASSWORD',
'payment_method': '00',
'pickup_addr1': '940 Presidio Ave',
'pickup_city': 'San Francisco',
'pickup_code': '94115',
'pickup_company_name': 'Acme Inc',
'pickup_contact_name': 'Mark Sanborn',
'pickup_container_code': '01',
'pickup_country': 'US',
'pickup_date': '20160112',
'pickup_destination': 'US',
'pickup_floor': '2',
'pickup_phone': '123-123-1234',
'pickup_quantity': 1,
'pickup_room': 'A',
'pickup_service_code': '002',
'pickup_state': 'CA',
'ready_time': '0800',
'test': True,
'to_addr1': '2920 Zoo Drive',
'to_city': 'San Diego',
'to_code': '92112',
'to_country': 'US',
'to_name': 'John Doe',
'to_state': 'CA',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"CreatePickup",
"params"=>
{"key"=>"YOUR_KEY",
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"pickup_company_name"=>"Acme Inc",
"pickup_contact_name"=>"Mark Sanborn",
"pickup_addr1"=>"940 Presidio Ave",
"pickup_city"=>"San Francisco",
"pickup_state"=>"CA",
"pickup_code"=>"94115",
"pickup_room"=>"A",
"pickup_floor"=>"2",
"pickup_country"=>"US",
"pickup_phone"=>"123-123-1234",
"pickup_service_code"=>"002",
"pickup_container_code"=>"01",
"pickup_quantity"=>1,
"pickup_destination"=>"US",
"payment_method"=>"00",
"to_name"=>"John Doe",
"to_addr1"=>"2920 Zoo Drive",
"to_state"=>"CA",
"to_city"=>"San Diego",
"to_code"=>"92112",
"to_country"=>"US",
"pickup_date"=>"20160112",
"close_time"=>"0900",
"ready_time"=>"0800",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "CreatePickup",
"params": {
"key": "YOUR_KEY",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"pickup_company_name": "Acme Inc",
"pickup_contact_name": "Mark Sanborn",
"pickup_addr1": "940 Presidio Ave",
"pickup_city": "San Francisco",
"pickup_state": "CA",
"pickup_code": "94115",
"pickup_room": "A",
"pickup_floor": "2",
"pickup_country": "US",
"pickup_phone": "123-123-1234",
"pickup_service_code": "002",
"pickup_container_code": "01",
"pickup_quantity": 1,
"pickup_destination": "US",
"payment_method": "00",
"to_name": "John Doe",
"to_addr1": "2920 Zoo Drive",
"to_state": "CA",
"to_city": "San Diego",
"to_code": "92112",
"to_country": "US",
"pickup_date": "20160112",
"close_time": "0900",
"ready_time": "0800",
"test": true
}
}
)
UPS - Pickup Schedule Various Services
{
"carrier": "UPS",
"action": "CreatePickup",
"params": {
"key": "YOUR_KEY",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"packaging_type": "01",
"pieces": 1,
"service": "003"
},
{
"packaging_type": "01",
"pieces": 1,
"service": "002"
}
],
"pickup_company_name": "Acme Inc",
"pickup_contact_name": "Mark Sanborn",
"pickup_addr1": "940 Presidio Ave",
"pickup_city": "San Francisco",
"pickup_state": "CA",
"pickup_code": "94115",
"pickup_country": "US",
"pickup_phone": "123-123-1234",
"pickup_destination": "US",
"payment_method": "00",
"to_name": "John Doe",
"to_addr1": "2920 Zoo Drive",
"to_state": "CA",
"to_city": "San Diego",
"to_code": "92112",
"to_country": "US",
"pickup_date": "20160112",
"close_time": "0900",
"ready_time": "0800",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'CreatePickup',
'params' =>
array (
'key' => 'YOUR_KEY',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'packaging_type' => '01',
'pieces' => 1,
'service' => '003',
),
1 =>
array (
'packaging_type' => '01',
'pieces' => 1,
'service' => '002',
),
),
'pickup_company_name' => 'Acme Inc',
'pickup_contact_name' => 'Mark Sanborn',
'pickup_addr1' => '940 Presidio Ave',
'pickup_city' => 'San Francisco',
'pickup_state' => 'CA',
'pickup_code' => '94115',
'pickup_country' => 'US',
'pickup_phone' => '123-123-1234',
'pickup_destination' => 'US',
'payment_method' => '00',
'to_name' => 'John Doe',
'to_addr1' => '2920 Zoo Drive',
'to_state' => 'CA',
'to_city' => 'San Diego',
'to_code' => '92112',
'to_country' => 'US',
'pickup_date' => '20160112',
'close_time' => '0900',
'ready_time' => '0800',
'test' => true,
),
)
);
rs.request(
{'action': 'CreatePickup',
'carrier': 'UPS',
'params': {'close_time': '0900',
'key': 'YOUR_KEY',
'packages': [{'packaging_type': '01',
'pieces': 1,
'service': '003'},
{'packaging_type': '01',
'pieces': 1,
'service': '002'}],
'password': 'YOUR_PASSWORD',
'payment_method': '00',
'pickup_addr1': '940 Presidio Ave',
'pickup_city': 'San Francisco',
'pickup_code': '94115',
'pickup_company_name': 'Acme Inc',
'pickup_contact_name': 'Mark Sanborn',
'pickup_country': 'US',
'pickup_date': '20160112',
'pickup_destination': 'US',
'pickup_phone': '123-123-1234',
'pickup_state': 'CA',
'ready_time': '0800',
'test': True,
'to_addr1': '2920 Zoo Drive',
'to_city': 'San Diego',
'to_code': '92112',
'to_country': 'US',
'to_name': 'John Doe',
'to_state': 'CA',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"CreatePickup",
"params"=>
{"key"=>"YOUR_KEY",
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"packages"=>
[{"packaging_type"=>"01", "pieces"=>1, "service"=>"003"},
{"packaging_type"=>"01", "pieces"=>1, "service"=>"002"}],
"pickup_company_name"=>"Acme Inc",
"pickup_contact_name"=>"Mark Sanborn",
"pickup_addr1"=>"940 Presidio Ave",
"pickup_city"=>"San Francisco",
"pickup_state"=>"CA",
"pickup_code"=>"94115",
"pickup_country"=>"US",
"pickup_phone"=>"123-123-1234",
"pickup_destination"=>"US",
"payment_method"=>"00",
"to_name"=>"John Doe",
"to_addr1"=>"2920 Zoo Drive",
"to_state"=>"CA",
"to_city"=>"San Diego",
"to_code"=>"92112",
"to_country"=>"US",
"pickup_date"=>"20160112",
"close_time"=>"0900",
"ready_time"=>"0800",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "CreatePickup",
"params": {
"key": "YOUR_KEY",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"packaging_type": "01",
"pieces": 1,
"service": "003"
},
{
"packaging_type": "01",
"pieces": 1,
"service": "002"
}
],
"pickup_company_name": "Acme Inc",
"pickup_contact_name": "Mark Sanborn",
"pickup_addr1": "940 Presidio Ave",
"pickup_city": "San Francisco",
"pickup_state": "CA",
"pickup_code": "94115",
"pickup_country": "US",
"pickup_phone": "123-123-1234",
"pickup_destination": "US",
"payment_method": "00",
"to_name": "John Doe",
"to_addr1": "2920 Zoo Drive",
"to_state": "CA",
"to_city": "San Diego",
"to_code": "92112",
"to_country": "US",
"pickup_date": "20160112",
"close_time": "0900",
"ready_time": "0800",
"test": true
}
}
)
UPS - Pickup Status
{
"carrier": "UPS",
"action": "PickupStatus",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_KEY",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'PickupStatus',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'key' => 'YOUR_KEY',
'test' => true,
),
)
);
rs.request(
{'action': 'PickupStatus',
'carrier': 'UPS',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'key': 'YOUR_KEY',
'password': 'YOUR_PASSWORD',
'test': True,
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"PickupStatus",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"key"=>"YOUR_KEY",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "PickupStatus",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_KEY",
"test": true
}
}
)
UPS - Rates Additional Handling
{
"carrier": "UPS",
"action": "GetAllRates",
"params": {
"password": "YOUR_PASSWORD",
"username": "YOUR_USERNAME",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5,
"additional_handling": true
}
],
"test": true,
"residential": true,
"customs": [],
"shipper": "RocketShipIt",
"account_number": "YOUR_ACCOUNT_NUMBER",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_code": "90210",
"weight_unit": "LBS",
"pickup_type": "01",
"customer_classification": "01",
"length_unit": "IN",
"key": "YOUR_KEY",
"packaging_type": "02"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'GetAllRates',
'params' =>
array (
'password' => 'YOUR_PASSWORD',
'username' => 'YOUR_USERNAME',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 5,
'width' => 5,
'height' => 5,
'additional_handling' => true,
),
),
'test' => true,
'residential' => true,
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_country' => 'US',
'to_code' => '90210',
'weight_unit' => 'LBS',
'pickup_type' => '01',
'customer_classification' => '01',
'length_unit' => 'IN',
'key' => 'YOUR_KEY',
'packaging_type' => '02',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'UPS',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'customer_classification': '01',
'customs': [],
'key': 'YOUR_KEY',
'length_unit': 'IN',
'packages': [{'additional_handling': True,
'height': 5,
'length': 5,
'weight': 5,
'width': 5}],
'packaging_type': '02',
'password': 'YOUR_PASSWORD',
'pickup_type': '01',
'residential': True,
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_code': '90210',
'to_country': 'US',
'username': 'YOUR_USERNAME',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"GetAllRates",
"params"=>
{"password"=>"YOUR_PASSWORD",
"username"=>"YOUR_USERNAME",
"packages"=>
[{"weight"=>5,
"length"=>5,
"width"=>5,
"height"=>5,
"additional_handling"=>true}],
"test"=>true,
"residential"=>true,
"customs"=>[],
"shipper"=>"RocketShipIt",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_country"=>"US",
"to_code"=>"90210",
"weight_unit"=>"LBS",
"pickup_type"=>"01",
"customer_classification"=>"01",
"length_unit"=>"IN",
"key"=>"YOUR_KEY",
"packaging_type"=>"02"}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "GetAllRates",
"params": {
"password": "YOUR_PASSWORD",
"username": "YOUR_USERNAME",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5,
"additional_handling": true
}
],
"test": true,
"residential": true,
"customs": [],
"shipper": "RocketShipIt",
"account_number": "YOUR_ACCOUNT_NUMBER",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_code": "90210",
"weight_unit": "LBS",
"pickup_type": "01",
"customer_classification": "01",
"length_unit": "IN",
"key": "YOUR_KEY",
"packaging_type": "02"
}
}
)
UPS - Rates DDP/DDU
{
"carrier": "UPS",
"action": "GetAllRates",
"params": {
"service": "17",
"request_option": "Shop",
"customs": [],
"shipper": "Acme Inc",
"ship_addr1": "123 Main Ave",
"ship_addr2": "",
"ship_city": "Portland",
"ship_state": "OR",
"ship_code": "97227",
"ship_country": "US",
"from_addr1": "123 Main Ave",
"from_addr2": "",
"from_city": "Portland",
"from_state": "OR",
"from_code": "97227",
"from_country": "US",
"to_name": "John Doe",
"to_company": "Test",
"to_addr1": "1 Main Road",
"to_addr2": "",
"to_city": "Montreal",
"to_state": "QC",
"to_code": "H2T 3E2",
"to_country": "CA",
"to_phone": "1231231234",
"ship_phone": "1231231234",
"packages": [
{
"weight": 3,
"height": 6,
"width": 11,
"length": 8,
"packaging_type": "Package",
"insured_currency": "USD"
}
],
"negotiated_rates": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'GetAllRates',
'params' =>
array (
'service' => '17',
'request_option' => 'Shop',
'customs' =>
array (
),
'shipper' => 'Acme Inc',
'ship_addr1' => '123 Main Ave',
'ship_addr2' => '',
'ship_city' => 'Portland',
'ship_state' => 'OR',
'ship_code' => '97227',
'ship_country' => 'US',
'from_addr1' => '123 Main Ave',
'from_addr2' => '',
'from_city' => 'Portland',
'from_state' => 'OR',
'from_code' => '97227',
'from_country' => 'US',
'to_name' => 'John Doe',
'to_company' => 'Test',
'to_addr1' => '1 Main Road',
'to_addr2' => '',
'to_city' => 'Montreal',
'to_state' => 'QC',
'to_code' => 'H2T 3E2',
'to_country' => 'CA',
'to_phone' => '1231231234',
'ship_phone' => '1231231234',
'packages' =>
array (
0 =>
array (
'weight' => 3,
'height' => 6,
'width' => 11,
'length' => 8,
'packaging_type' => 'Package',
'insured_currency' => 'USD',
),
),
'negotiated_rates' => true,
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'UPS',
'params': {'customs': [],
'from_addr1': '123 Main Ave',
'from_addr2': '',
'from_city': 'Portland',
'from_code': '97227',
'from_country': 'US',
'from_state': 'OR',
'negotiated_rates': True,
'packages': [{'height': 6,
'insured_currency': 'USD',
'length': 8,
'packaging_type': 'Package',
'weight': 3,
'width': 11}],
'request_option': 'Shop',
'service': '17',
'ship_addr1': '123 Main Ave',
'ship_addr2': '',
'ship_city': 'Portland',
'ship_code': '97227',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'OR',
'shipper': 'Acme Inc',
'to_addr1': '1 Main Road',
'to_addr2': '',
'to_city': 'Montreal',
'to_code': 'H2T 3E2',
'to_company': 'Test',
'to_country': 'CA',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'QC'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"GetAllRates",
"params"=>
{"service"=>"17",
"request_option"=>"Shop",
"customs"=>[],
"shipper"=>"Acme Inc",
"ship_addr1"=>"123 Main Ave",
"ship_addr2"=>"",
"ship_city"=>"Portland",
"ship_state"=>"OR",
"ship_code"=>"97227",
"ship_country"=>"US",
"from_addr1"=>"123 Main Ave",
"from_addr2"=>"",
"from_city"=>"Portland",
"from_state"=>"OR",
"from_code"=>"97227",
"from_country"=>"US",
"to_name"=>"John Doe",
"to_company"=>"Test",
"to_addr1"=>"1 Main Road",
"to_addr2"=>"",
"to_city"=>"Montreal",
"to_state"=>"QC",
"to_code"=>"H2T 3E2",
"to_country"=>"CA",
"to_phone"=>"1231231234",
"ship_phone"=>"1231231234",
"packages"=>
[{"weight"=>3,
"height"=>6,
"width"=>11,
"length"=>8,
"packaging_type"=>"Package",
"insured_currency"=>"USD"}],
"negotiated_rates"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "GetAllRates",
"params": {
"service": "17",
"request_option": "Shop",
"customs": [],
"shipper": "Acme Inc",
"ship_addr1": "123 Main Ave",
"ship_addr2": "",
"ship_city": "Portland",
"ship_state": "OR",
"ship_code": "97227",
"ship_country": "US",
"from_addr1": "123 Main Ave",
"from_addr2": "",
"from_city": "Portland",
"from_state": "OR",
"from_code": "97227",
"from_country": "US",
"to_name": "John Doe",
"to_company": "Test",
"to_addr1": "1 Main Road",
"to_addr2": "",
"to_city": "Montreal",
"to_state": "QC",
"to_code": "H2T 3E2",
"to_country": "CA",
"to_phone": "1231231234",
"ship_phone": "1231231234",
"packages": [
{
"weight": 3,
"height": 6,
"width": 11,
"length": 8,
"packaging_type": "Package",
"insured_currency": "USD"
}
],
"negotiated_rates": true
}
}
)
UPS - Rates Daily
{
"carrier": "UPS",
"action": "GetAllRates",
"params": {
"key": "YOUR_UPS_API_KEY",
"account_number": "YOUR_ACCOUNT_NUMBER",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_code": "90210",
"weight_unit": "LBS",
"pickup_type": "01",
"customer_classification": "01",
"length_unit": "IN",
"packaging_type": "02"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'GetAllRates',
'params' =>
array (
'key' => 'YOUR_UPS_API_KEY',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 5,
'width' => 5,
'height' => 5,
),
),
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_country' => 'US',
'to_code' => '90210',
'weight_unit' => 'LBS',
'pickup_type' => '01',
'customer_classification' => '01',
'length_unit' => 'IN',
'packaging_type' => '02',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'UPS',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'customer_classification': '01',
'customs': [],
'key': 'YOUR_UPS_API_KEY',
'length_unit': 'IN',
'packages': [{'height': 5, 'length': 5, 'weight': 5, 'width': 5}],
'packaging_type': '02',
'password': 'YOUR_PASSWORD',
'pickup_type': '01',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'to_code': '90210',
'to_country': 'US',
'username': 'YOUR_USERNAME',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"GetAllRates",
"params"=>
{"key"=>"YOUR_UPS_API_KEY",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"packages"=>[{"weight"=>5, "length"=>5, "width"=>5, "height"=>5}],
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_country"=>"US",
"to_code"=>"90210",
"weight_unit"=>"LBS",
"pickup_type"=>"01",
"customer_classification"=>"01",
"length_unit"=>"IN",
"packaging_type"=>"02"}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "GetAllRates",
"params": {
"key": "YOUR_UPS_API_KEY",
"account_number": "YOUR_ACCOUNT_NUMBER",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_code": "90210",
"weight_unit": "LBS",
"pickup_type": "01",
"customer_classification": "01",
"length_unit": "IN",
"packaging_type": "02"
}
}
)
UPS - Rates Ground Freight Pricing
{
"carrier": "UPS",
"action": "GetAllRates",
"params": {
"key": "YOUR_KEY",
"account_number": "YOUR_ACCOUNT_NUMBER",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 10,
"length": 5,
"width": 5,
"height": 5,
"freight_class": "50"
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_state": "CA",
"to_country": "US",
"to_code": "90210",
"weight_unit": "LBS",
"pickup_type": "01",
"customer_classification": "01",
"length_unit": "IN",
"packaging_type": "02",
"ground_freight": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'GetAllRates',
'params' =>
array (
'key' => 'YOUR_KEY',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 10,
'length' => 5,
'width' => 5,
'height' => 5,
'freight_class' => '50',
),
),
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_state' => 'CA',
'to_country' => 'US',
'to_code' => '90210',
'weight_unit' => 'LBS',
'pickup_type' => '01',
'customer_classification' => '01',
'length_unit' => 'IN',
'packaging_type' => '02',
'ground_freight' => true,
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'UPS',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'customer_classification': '01',
'customs': [],
'ground_freight': True,
'key': 'YOUR_KEY',
'length_unit': 'IN',
'packages': [{'freight_class': '50',
'height': 5,
'length': 5,
'weight': 10,
'width': 5}],
'packaging_type': '02',
'password': 'YOUR_PASSWORD',
'pickup_type': '01',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'to_code': '90210',
'to_country': 'US',
'to_state': 'CA',
'username': 'YOUR_USERNAME',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"GetAllRates",
"params"=>
{"key"=>"YOUR_KEY",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"packages"=>
[{"weight"=>10,
"length"=>5,
"width"=>5,
"height"=>5,
"freight_class"=>"50"}],
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_state"=>"CA",
"to_country"=>"US",
"to_code"=>"90210",
"weight_unit"=>"LBS",
"pickup_type"=>"01",
"customer_classification"=>"01",
"length_unit"=>"IN",
"packaging_type"=>"02",
"ground_freight"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "GetAllRates",
"params": {
"key": "YOUR_KEY",
"account_number": "YOUR_ACCOUNT_NUMBER",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 10,
"length": 5,
"width": 5,
"height": 5,
"freight_class": "50"
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_state": "CA",
"to_country": "US",
"to_code": "90210",
"weight_unit": "LBS",
"pickup_type": "01",
"customer_classification": "01",
"length_unit": "IN",
"packaging_type": "02",
"ground_freight": true
}
}
)
UPS - Rates Insurance
{
"carrier": "UPS-REST",
"action": "GetAllRates",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5,
"insured_currency": "USD",
"insured_value": 700
}
],
"residential": true,
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_code": "90210",
"weight_unit": "LBS",
"pickup_type": "01",
"customer_classification": "01",
"length_unit": "IN",
"packaging_type": "02"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'GetAllRates',
'params' =>
array (
'test' => true,
'key' => 'your-key-from-authenticate-request',
'account_number' => 'YOUR_ACCOUNT',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 5,
'width' => 5,
'height' => 5,
'insured_currency' => 'USD',
'insured_value' => 700,
),
),
'residential' => true,
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_country' => 'US',
'to_code' => '90210',
'weight_unit' => 'LBS',
'pickup_type' => '01',
'customer_classification' => '01',
'length_unit' => 'IN',
'packaging_type' => '02',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'UPS-REST',
'params': {'account_number': 'YOUR_ACCOUNT',
'customer_classification': '01',
'customs': [],
'key': 'your-key-from-authenticate-request',
'length_unit': 'IN',
'packages': [{'height': 5,
'insured_currency': 'USD',
'insured_value': 700,
'length': 5,
'weight': 5,
'width': 5}],
'packaging_type': '02',
'pickup_type': '01',
'residential': True,
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_code': '90210',
'to_country': 'US',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"GetAllRates",
"params"=>
{"test"=>true,
"key"=>"your-key-from-authenticate-request",
"account_number"=>"YOUR_ACCOUNT",
"packages"=>
[{"weight"=>5,
"length"=>5,
"width"=>5,
"height"=>5,
"insured_currency"=>"USD",
"insured_value"=>700}],
"residential"=>true,
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_country"=>"US",
"to_code"=>"90210",
"weight_unit"=>"LBS",
"pickup_type"=>"01",
"customer_classification"=>"01",
"length_unit"=>"IN",
"packaging_type"=>"02"}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "GetAllRates",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5,
"insured_currency": "USD",
"insured_value": 700
}
],
"residential": true,
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_code": "90210",
"weight_unit": "LBS",
"pickup_type": "01",
"customer_classification": "01",
"length_unit": "IN",
"packaging_type": "02"
}
}
)
UPS - Rates International
{
"carrier": "UPS",
"action": "GetAllRates",
"params": {
"key": "YOUR_KEY",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_NUMBER",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5
}
],
"test": true,
"residential": true,
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "CA",
"to_code": "V0K1G0",
"weight_unit": "LBS",
"pickup_type": "01",
"customer_classification": "01",
"length_unit": "IN",
"packaging_type": "02"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'GetAllRates',
'params' =>
array (
'key' => 'YOUR_KEY',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 5,
'width' => 5,
'height' => 5,
),
),
'test' => true,
'residential' => true,
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_country' => 'CA',
'to_code' => 'V0K1G0',
'weight_unit' => 'LBS',
'pickup_type' => '01',
'customer_classification' => '01',
'length_unit' => 'IN',
'packaging_type' => '02',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'UPS',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'customer_classification': '01',
'customs': [],
'key': 'YOUR_KEY',
'length_unit': 'IN',
'packages': [{'height': 5, 'length': 5, 'weight': 5, 'width': 5}],
'packaging_type': '02',
'password': 'YOUR_PASSWORD',
'pickup_type': '01',
'residential': True,
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_code': 'V0K1G0',
'to_country': 'CA',
'username': 'YOUR_USERNAME',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"GetAllRates",
"params"=>
{"key"=>"YOUR_KEY",
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"packages"=>[{"weight"=>5, "length"=>5, "width"=>5, "height"=>5}],
"test"=>true,
"residential"=>true,
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_country"=>"CA",
"to_code"=>"V0K1G0",
"weight_unit"=>"LBS",
"pickup_type"=>"01",
"customer_classification"=>"01",
"length_unit"=>"IN",
"packaging_type"=>"02"}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "GetAllRates",
"params": {
"key": "YOUR_KEY",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_NUMBER",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5
}
],
"test": true,
"residential": true,
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "CA",
"to_code": "V0K1G0",
"weight_unit": "LBS",
"pickup_type": "01",
"customer_classification": "01",
"length_unit": "IN",
"packaging_type": "02"
}
}
)
UPS - Rates Negotiated
{
"carrier": "UPS",
"action": "GetAllRates",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_NUMBER",
"key": "YOUR_KEY",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5,
"insured_currency": "USD",
"insured_value": 700
}
],
"test": true,
"residential": true,
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_state": "CA",
"to_code": "90210",
"weight_unit": "LBS",
"pickup_type": "01",
"customer_classification": "01",
"length_unit": "IN",
"packaging_type": "02",
"negotiated_rates": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'GetAllRates',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'key' => 'YOUR_KEY',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 5,
'width' => 5,
'height' => 5,
'insured_currency' => 'USD',
'insured_value' => 700,
),
),
'test' => true,
'residential' => true,
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_country' => 'US',
'to_state' => 'CA',
'to_code' => '90210',
'weight_unit' => 'LBS',
'pickup_type' => '01',
'customer_classification' => '01',
'length_unit' => 'IN',
'packaging_type' => '02',
'negotiated_rates' => true,
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'UPS',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'customer_classification': '01',
'customs': [],
'key': 'YOUR_KEY',
'length_unit': 'IN',
'negotiated_rates': True,
'packages': [{'height': 5,
'insured_currency': 'USD',
'insured_value': 700,
'length': 5,
'weight': 5,
'width': 5}],
'packaging_type': '02',
'password': 'YOUR_PASSWORD',
'pickup_type': '01',
'residential': True,
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_code': '90210',
'to_country': 'US',
'to_state': 'CA',
'username': 'YOUR_USERNAME',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"GetAllRates",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"key"=>"YOUR_KEY",
"packages"=>
[{"weight"=>5,
"length"=>5,
"width"=>5,
"height"=>5,
"insured_currency"=>"USD",
"insured_value"=>700}],
"test"=>true,
"residential"=>true,
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_country"=>"US",
"to_state"=>"CA",
"to_code"=>"90210",
"weight_unit"=>"LBS",
"pickup_type"=>"01",
"customer_classification"=>"01",
"length_unit"=>"IN",
"packaging_type"=>"02",
"negotiated_rates"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "GetAllRates",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_NUMBER",
"key": "YOUR_KEY",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5,
"insured_currency": "USD",
"insured_value": 700
}
],
"test": true,
"residential": true,
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_state": "CA",
"to_code": "90210",
"weight_unit": "LBS",
"pickup_type": "01",
"customer_classification": "01",
"length_unit": "IN",
"packaging_type": "02",
"negotiated_rates": true
}
}
)
UPS - Rates Retail
{
"carrier": "UPS",
"action": "GetAllRates",
"params": {
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"username": "YOUR_USERNAME",
"account_number": "YOUR_ACCOUNT_NUMBER",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_code": "90210",
"weight_unit": "LBS",
"pickup_type": "03",
"customer_classification": "00",
"length_unit": "IN",
"packaging_type": "02"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'GetAllRates',
'params' =>
array (
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'username' => 'YOUR_USERNAME',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 5,
'width' => 5,
'height' => 5,
),
),
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_country' => 'US',
'to_code' => '90210',
'weight_unit' => 'LBS',
'pickup_type' => '03',
'customer_classification' => '00',
'length_unit' => 'IN',
'packaging_type' => '02',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'UPS',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'customer_classification': '00',
'customs': [],
'key': 'YOUR_KEY',
'length_unit': 'IN',
'packages': [{'height': 5, 'length': 5, 'weight': 5, 'width': 5}],
'packaging_type': '02',
'password': 'YOUR_PASSWORD',
'pickup_type': '03',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'to_code': '90210',
'to_country': 'US',
'username': 'YOUR_USERNAME',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"GetAllRates",
"params"=>
{"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"username"=>"YOUR_USERNAME",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"packages"=>[{"weight"=>5, "length"=>5, "width"=>5, "height"=>5}],
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_country"=>"US",
"to_code"=>"90210",
"weight_unit"=>"LBS",
"pickup_type"=>"03",
"customer_classification"=>"00",
"length_unit"=>"IN",
"packaging_type"=>"02"}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "GetAllRates",
"params": {
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"username": "YOUR_USERNAME",
"account_number": "YOUR_ACCOUNT_NUMBER",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_code": "90210",
"weight_unit": "LBS",
"pickup_type": "03",
"customer_classification": "00",
"length_unit": "IN",
"packaging_type": "02"
}
}
)
UPS - Rates Simple Rate
{
"carrier": "UPS",
"action": "GetAllRates",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_KEY",
"request_option": "Shop",
"service": "03",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5,
"sub_packaging_type": "M"
}
],
"test": true,
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_state": "CA",
"to_code": "90210",
"weight_unit": "LBS",
"length_unit": "IN",
"packaging_type": "02"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'GetAllRates',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'key' => 'YOUR_KEY',
'request_option' => 'Shop',
'service' => '03',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 5,
'width' => 5,
'height' => 5,
'sub_packaging_type' => 'M',
),
),
'test' => true,
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_country' => 'US',
'to_state' => 'CA',
'to_code' => '90210',
'weight_unit' => 'LBS',
'length_unit' => 'IN',
'packaging_type' => '02',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'UPS',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'customs': [],
'key': 'YOUR_KEY',
'length_unit': 'IN',
'packages': [{'height': 5,
'length': 5,
'sub_packaging_type': 'M',
'weight': 5,
'width': 5}],
'packaging_type': '02',
'password': 'YOUR_PASSWORD',
'request_option': 'Shop',
'service': '03',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_code': '90210',
'to_country': 'US',
'to_state': 'CA',
'username': 'YOUR_USERNAME',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"GetAllRates",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"key"=>"YOUR_KEY",
"request_option"=>"Shop",
"service"=>"03",
"packages"=>
[{"weight"=>5,
"length"=>5,
"width"=>5,
"height"=>5,
"sub_packaging_type"=>"M"}],
"test"=>true,
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_country"=>"US",
"to_state"=>"CA",
"to_code"=>"90210",
"weight_unit"=>"LBS",
"length_unit"=>"IN",
"packaging_type"=>"02"}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "GetAllRates",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_KEY",
"request_option": "Shop",
"service": "03",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5,
"sub_packaging_type": "M"
}
],
"test": true,
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_state": "CA",
"to_code": "90210",
"weight_unit": "LBS",
"length_unit": "IN",
"packaging_type": "02"
}
}
)
UPS - Rates SurePost
{
"carrier": "UPS",
"action": "GetAllRates",
"params": {
"key": "YOUR_UPS_API_KEY",
"account_number": "YOUR_ACCOUNT_NUMBER",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"service": "92",
"request_option": "Rate",
"weight_unit": "OZS",
"packaging_type": "02",
"packages": [
{
"weight": 0.6,
"length": 9,
"width": 6,
"height": 1
}
],
"shipper": "Acme Inc",
"ship_addr1": "123 Main St.",
"ship_city": "King of Prussia",
"ship_state": "PA",
"ship_code": "19406",
"ship_country": "US",
"to_code": "06333",
"to_state": "CT",
"to_country": "US",
"residential": true,
"negotiated_rates": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'GetAllRates',
'params' =>
array (
'key' => 'YOUR_UPS_API_KEY',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'service' => '92',
'request_option' => 'Rate',
'weight_unit' => 'OZS',
'packaging_type' => '02',
'packages' =>
array (
0 =>
array (
'weight' => 0.6,
'length' => 9,
'width' => 6,
'height' => 1,
),
),
'shipper' => 'Acme Inc',
'ship_addr1' => '123 Main St.',
'ship_city' => 'King of Prussia',
'ship_state' => 'PA',
'ship_code' => '19406',
'ship_country' => 'US',
'to_code' => '06333',
'to_state' => 'CT',
'to_country' => 'US',
'residential' => true,
'negotiated_rates' => true,
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'UPS',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'key': 'YOUR_UPS_API_KEY',
'negotiated_rates': True,
'packages': [{'height': 1, 'length': 9, 'weight': 0.6, 'width': 6}],
'packaging_type': '02',
'password': 'YOUR_PASSWORD',
'request_option': 'Rate',
'residential': True,
'service': '92',
'ship_addr1': '123 Main St.',
'ship_city': 'King of Prussia',
'ship_code': '19406',
'ship_country': 'US',
'ship_state': 'PA',
'shipper': 'Acme Inc',
'to_code': '06333',
'to_country': 'US',
'to_state': 'CT',
'username': 'YOUR_USERNAME',
'weight_unit': 'OZS'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"GetAllRates",
"params"=>
{"key"=>"YOUR_UPS_API_KEY",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"service"=>"92",
"request_option"=>"Rate",
"weight_unit"=>"OZS",
"packaging_type"=>"02",
"packages"=>[{"weight"=>0.6, "length"=>9, "width"=>6, "height"=>1}],
"shipper"=>"Acme Inc",
"ship_addr1"=>"123 Main St.",
"ship_city"=>"King of Prussia",
"ship_state"=>"PA",
"ship_code"=>"19406",
"ship_country"=>"US",
"to_code"=>"06333",
"to_state"=>"CT",
"to_country"=>"US",
"residential"=>true,
"negotiated_rates"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "GetAllRates",
"params": {
"key": "YOUR_UPS_API_KEY",
"account_number": "YOUR_ACCOUNT_NUMBER",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"service": "92",
"request_option": "Rate",
"weight_unit": "OZS",
"packaging_type": "02",
"packages": [
{
"weight": 0.6,
"length": 9,
"width": 6,
"height": 1
}
],
"shipper": "Acme Inc",
"ship_addr1": "123 Main St.",
"ship_city": "King of Prussia",
"ship_state": "PA",
"ship_code": "19406",
"ship_country": "US",
"to_code": "06333",
"to_state": "CT",
"to_country": "US",
"residential": true,
"negotiated_rates": true
}
}
)
UPS - Rating w/ Access Point
{
"carrier": "UPS",
"action": "GetAllRates",
"params": {
"alt_name": "G&R MARKET DELI",
"alt_addr1": "2601 Sutter St",
"alt_state": "CA",
"alt_city": "San Francisco",
"alt_code": "94115",
"alt_country": "US",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_code": "90210",
"weight_unit": "LBS",
"pickup_type": "01",
"customer_classification": "01",
"length_unit": "IN",
"packaging_type": "02"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'GetAllRates',
'params' =>
array (
'alt_name' => 'G&R MARKET DELI',
'alt_addr1' => '2601 Sutter St',
'alt_state' => 'CA',
'alt_city' => 'San Francisco',
'alt_code' => '94115',
'alt_country' => 'US',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 5,
'width' => 5,
'height' => 5,
),
),
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_country' => 'US',
'to_code' => '90210',
'weight_unit' => 'LBS',
'pickup_type' => '01',
'customer_classification' => '01',
'length_unit' => 'IN',
'packaging_type' => '02',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'UPS',
'params': {'alt_addr1': '2601 Sutter St',
'alt_city': 'San Francisco',
'alt_code': '94115',
'alt_country': 'US',
'alt_name': 'G&R MARKET DELI',
'alt_state': 'CA',
'customer_classification': '01',
'customs': [],
'length_unit': 'IN',
'packages': [{'height': 5, 'length': 5, 'weight': 5, 'width': 5}],
'packaging_type': '02',
'pickup_type': '01',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'to_code': '90210',
'to_country': 'US',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"GetAllRates",
"params"=>
{"alt_name"=>"G&R MARKET DELI",
"alt_addr1"=>"2601 Sutter St",
"alt_state"=>"CA",
"alt_city"=>"San Francisco",
"alt_code"=>"94115",
"alt_country"=>"US",
"packages"=>[{"weight"=>5, "length"=>5, "width"=>5, "height"=>5}],
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_country"=>"US",
"to_code"=>"90210",
"weight_unit"=>"LBS",
"pickup_type"=>"01",
"customer_classification"=>"01",
"length_unit"=>"IN",
"packaging_type"=>"02"}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "GetAllRates",
"params": {
"alt_name": "G&R MARKET DELI",
"alt_addr1": "2601 Sutter St",
"alt_state": "CA",
"alt_city": "San Francisco",
"alt_code": "94115",
"alt_country": "US",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_code": "90210",
"weight_unit": "LBS",
"pickup_type": "01",
"customer_classification": "01",
"length_unit": "IN",
"packaging_type": "02"
}
}
)
UPS - Time in Transit
{
"carrier": "UPS",
"action": "TimeInTransit",
"params": {
"test": true,
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"username": "YOUR_USERNAME",
"shipper": "RocketShipIt",
"ship_contact": "Mark Sanborn",
"ship_phone": "1231231234",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_code": "90210"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'TimeInTransit',
'params' =>
array (
'test' => true,
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'username' => 'YOUR_USERNAME',
'shipper' => 'RocketShipIt',
'ship_contact' => 'Mark Sanborn',
'ship_phone' => '1231231234',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_country' => 'US',
'to_code' => '90210',
),
)
);
rs.request(
{'action': 'TimeInTransit',
'carrier': 'UPS',
'params': {'key': 'YOUR_KEY',
'password': 'YOUR_PASSWORD',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_contact': 'Mark Sanborn',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_code': '90210',
'to_country': 'US',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"TimeInTransit",
"params"=>
{"test"=>true,
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"username"=>"YOUR_USERNAME",
"shipper"=>"RocketShipIt",
"ship_contact"=>"Mark Sanborn",
"ship_phone"=>"1231231234",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_country"=>"US",
"to_code"=>"90210"}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "TimeInTransit",
"params": {
"test": true,
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"username": "YOUR_USERNAME",
"shipper": "RocketShipIt",
"ship_contact": "Mark Sanborn",
"ship_phone": "1231231234",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_code": "90210"
}
}
)
UPS - Time in Transit International
{
"carrier": "UPS",
"action": "TimeInTransit",
"params": {
"ship_city": "Emeryville",
"ship_code": "94608",
"ship_country": "US",
"to_code": "M1B5K7",
"to_country": "CA",
"documents_only": true,
"num_of_packages": 4,
"weight": 5,
"weight_unit": "LBS",
"monetary_value": 20,
"currency": "USD",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'TimeInTransit',
'params' =>
array (
'ship_city' => 'Emeryville',
'ship_code' => '94608',
'ship_country' => 'US',
'to_code' => 'M1B5K7',
'to_country' => 'CA',
'documents_only' => true,
'num_of_packages' => 4,
'weight' => 5,
'weight_unit' => 'LBS',
'monetary_value' => 20,
'currency' => 'USD',
'test' => true,
),
)
);
rs.request(
{'action': 'TimeInTransit',
'carrier': 'UPS',
'params': {'currency': 'USD',
'documents_only': True,
'monetary_value': 20,
'num_of_packages': 4,
'ship_city': 'Emeryville',
'ship_code': '94608',
'ship_country': 'US',
'test': True,
'to_code': 'M1B5K7',
'to_country': 'CA',
'weight': 5,
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"TimeInTransit",
"params"=>
{"ship_city"=>"Emeryville",
"ship_code"=>"94608",
"ship_country"=>"US",
"to_code"=>"M1B5K7",
"to_country"=>"CA",
"documents_only"=>true,
"num_of_packages"=>4,
"weight"=>5,
"weight_unit"=>"LBS",
"monetary_value"=>20,
"currency"=>"USD",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "TimeInTransit",
"params": {
"ship_city": "Emeryville",
"ship_code": "94608",
"ship_country": "US",
"to_code": "M1B5K7",
"to_country": "CA",
"documents_only": true,
"num_of_packages": 4,
"weight": 5,
"weight_unit": "LBS",
"monetary_value": 20,
"currency": "USD",
"test": true
}
}
)
UPS - Tracking
{
"carrier": "UPS",
"action": "Track",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_KEY",
"tracking_number": "1Z12345E0205271688",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'Track',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'key' => 'YOUR_KEY',
'tracking_number' => '1Z12345E0205271688',
'test' => true,
),
)
);
rs.request(
{'action': 'Track',
'carrier': 'UPS',
'params': {'key': 'YOUR_KEY',
'password': 'YOUR_PASSWORD',
'test': True,
'tracking_number': '1Z12345E0205271688',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"Track",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"key"=>"YOUR_KEY",
"tracking_number"=>"1Z12345E0205271688",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "Track",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_KEY",
"tracking_number": "1Z12345E0205271688",
"test": true
}
}
)
UPS - Tracking Mail Innovations
{
"carrier": "UPS",
"action": "Track",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_KEY",
"test": true,
"tracking_option": "03",
"tracking_number": "9102084383041101186729"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'Track',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'key' => 'YOUR_KEY',
'test' => true,
'tracking_option' => '03',
'tracking_number' => '9102084383041101186729',
),
)
);
rs.request(
{'action': 'Track',
'carrier': 'UPS',
'params': {'key': 'YOUR_KEY',
'password': 'YOUR_PASSWORD',
'test': True,
'tracking_number': '9102084383041101186729',
'tracking_option': '03',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"Track",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"key"=>"YOUR_KEY",
"test"=>true,
"tracking_option"=>"03",
"tracking_number"=>"9102084383041101186729"}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "Track",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_KEY",
"test": true,
"tracking_option": "03",
"tracking_number": "9102084383041101186729"
}
}
)
UPS - Tracking by Reference
{
"carrier": "UPS",
"action": "Track",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_KEY",
"reference_number": "371296",
"to_country": "US",
"to_code": "07094",
"ship_date_begin": "20160101",
"ship_date_end": "20180101"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'Track',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'key' => 'YOUR_KEY',
'reference_number' => '371296',
'to_country' => 'US',
'to_code' => '07094',
'ship_date_begin' => '20160101',
'ship_date_end' => '20180101',
),
)
);
rs.request(
{'action': 'Track',
'carrier': 'UPS',
'params': {'key': 'YOUR_KEY',
'password': 'YOUR_PASSWORD',
'reference_number': '371296',
'ship_date_begin': '20160101',
'ship_date_end': '20180101',
'to_code': '07094',
'to_country': 'US',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"Track",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"key"=>"YOUR_KEY",
"reference_number"=>"371296",
"to_country"=>"US",
"to_code"=>"07094",
"ship_date_begin"=>"20160101",
"ship_date_end"=>"20180101"}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "Track",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_KEY",
"reference_number": "371296",
"to_country": "US",
"to_code": "07094",
"ship_date_begin": "20160101",
"ship_date_end": "20180101"
}
}
)
UPS - Upload Customs Document
{
"carrier": "UPS",
"action": "UploadDocument",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"key": "YOUR_UPS_KEY",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"filename": "test.txt",
"file_format": "txt",
"document_type": "013",
"file_contents": "Tm90aWNlDQpJbiBhbGwgY29tbXVuaWNhdGlvbnMgd2l0aCBVUFMgY29uY2VybmluZyB0aGlzIGRvY3VtZW50LCBwbGVhc2UgcmVmZXIgdG8gdGhlIGRvY3VtZW50IGRhdGUgbG9jYXRlZCBvbiB0aGUgY292ZXIuDQpDb3B5cmlnaHQNClRoZSB1c2UsIGRpc2Nsb3N1cmUsIHJlcHJvZHVjdGlvbiwgbW9kaWZpY2F0aW9uLCB0cmFuc2Zlciwgb3IgdHJhbnNtaXR0YWwgb2YgdGhpcyB3b3JrIGZvciBhbnkgcHVycG9zZSBpbiBhbnkgZm9ybSBvciBieSBhbnkgbWVhbnMgd2l0aG91dCB0aGUgd3JpdHRlbiBw ZXJtaXNzaW9uIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBpcyBzdHJpY3RseSBwcm9oaWJpdGVk Lg0KwqkgQ29weXJpZ2h0IDIwMTYgVW5pdGVkIFBhcmNlbCBTZXJ2aWNlIG9mIEFtZXJpY2EsIElu Yy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC4NClRyYWRlbWFya3MNClVQUyBPbkxpbmXCriBpcyBhIHJl Z2lzdGVyZWQgdHJhZGVtYXJrIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJ bmMuIEFsbCBvdGhlciB0cmFkZW1hcmtzIGFyZSB0aGUgcHJvcGVydHkgb2YgdGhlaXIgcmVzcGVj dGl2ZSBvd25lcnMuDQpTb21lIG9mIHRoZSBVUFMgY29ycG9yYXRlIGFwcGxpY2F0aW9ucyB1c2Ug VS5TLiBjaXR5LCBzdGF0ZSwgYW5kIHBvc3RhbCBjb2RlIGluZm9ybWF0aW9uIG9idGFpbmVkIGJ5 IFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJbmMuIHVuZGVyIGEgbm9uLWV4Y2x1 c2l2ZSBsaWNlbnNlIGZyb20gdGhlIFVuaXRlZCBTdGF0ZXMgUG9zdGFsIFNlcnZpY2UuIA0K"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'UploadDocument',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'key' => 'YOUR_UPS_KEY',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'filename' => 'test.txt',
'file_format' => 'txt',
'document_type' => '013',
'file_contents' => 'Tm90aWNlDQpJbiBhbGwgY29tbXVuaWNhdGlvbnMgd2l0aCBVUFMgY29uY2VybmluZyB0aGlzIGRvY3VtZW50LCBwbGVhc2UgcmVmZXIgdG8gdGhlIGRvY3VtZW50IGRhdGUgbG9jYXRlZCBvbiB0aGUgY292ZXIuDQpDb3B5cmlnaHQNClRoZSB1c2UsIGRpc2Nsb3N1cmUsIHJlcHJvZHVjdGlvbiwgbW9kaWZpY2F0aW9uLCB0cmFuc2Zlciwgb3IgdHJhbnNtaXR0YWwgb2YgdGhpcyB3b3JrIGZvciBhbnkgcHVycG9zZSBpbiBhbnkgZm9ybSBvciBieSBhbnkgbWVhbnMgd2l0aG91dCB0aGUgd3JpdHRlbiBw ZXJtaXNzaW9uIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBpcyBzdHJpY3RseSBwcm9oaWJpdGVk Lg0KwqkgQ29weXJpZ2h0IDIwMTYgVW5pdGVkIFBhcmNlbCBTZXJ2aWNlIG9mIEFtZXJpY2EsIElu Yy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC4NClRyYWRlbWFya3MNClVQUyBPbkxpbmXCriBpcyBhIHJl Z2lzdGVyZWQgdHJhZGVtYXJrIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJ bmMuIEFsbCBvdGhlciB0cmFkZW1hcmtzIGFyZSB0aGUgcHJvcGVydHkgb2YgdGhlaXIgcmVzcGVj dGl2ZSBvd25lcnMuDQpTb21lIG9mIHRoZSBVUFMgY29ycG9yYXRlIGFwcGxpY2F0aW9ucyB1c2Ug VS5TLiBjaXR5LCBzdGF0ZSwgYW5kIHBvc3RhbCBjb2RlIGluZm9ybWF0aW9uIG9idGFpbmVkIGJ5 IFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJbmMuIHVuZGVyIGEgbm9uLWV4Y2x1 c2l2ZSBsaWNlbnNlIGZyb20gdGhlIFVuaXRlZCBTdGF0ZXMgUG9zdGFsIFNlcnZpY2UuIA0K',
),
)
);
rs.request(
{'action': 'UploadDocument',
'carrier': 'UPS',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'document_type': '013',
'file_contents': 'Tm90aWNlDQpJbiBhbGwgY29tbXVuaWNhdGlvbnMgd2l0aCBVUFMgY29uY2VybmluZyB0aGlzIGRvY3VtZW50LCBwbGVhc2UgcmVmZXIgdG8gdGhlIGRvY3VtZW50IGRhdGUgbG9jYXRlZCBvbiB0aGUgY292ZXIuDQpDb3B5cmlnaHQNClRoZSB1c2UsIGRpc2Nsb3N1cmUsIHJlcHJvZHVjdGlvbiwgbW9kaWZpY2F0aW9uLCB0cmFuc2Zlciwgb3IgdHJhbnNtaXR0YWwgb2YgdGhpcyB3b3JrIGZvciBhbnkgcHVycG9zZSBpbiBhbnkgZm9ybSBvciBieSBhbnkgbWVhbnMgd2l0aG91dCB0aGUgd3JpdHRlbiBw '
'ZXJtaXNzaW9uIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBpcyBzdHJpY3RseSBwcm9oaWJpdGVk '
'Lg0KwqkgQ29weXJpZ2h0IDIwMTYgVW5pdGVkIFBhcmNlbCBTZXJ2aWNlIG9mIEFtZXJpY2EsIElu '
'Yy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC4NClRyYWRlbWFya3MNClVQUyBPbkxpbmXCriBpcyBhIHJl '
'Z2lzdGVyZWQgdHJhZGVtYXJrIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJ '
'bmMuIEFsbCBvdGhlciB0cmFkZW1hcmtzIGFyZSB0aGUgcHJvcGVydHkgb2YgdGhlaXIgcmVzcGVj '
'dGl2ZSBvd25lcnMuDQpTb21lIG9mIHRoZSBVUFMgY29ycG9yYXRlIGFwcGxpY2F0aW9ucyB1c2Ug '
'VS5TLiBjaXR5LCBzdGF0ZSwgYW5kIHBvc3RhbCBjb2RlIGluZm9ybWF0aW9uIG9idGFpbmVkIGJ5 '
'IFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJbmMuIHVuZGVyIGEgbm9uLWV4Y2x1 '
'c2l2ZSBsaWNlbnNlIGZyb20gdGhlIFVuaXRlZCBTdGF0ZXMgUG9zdGFsIFNlcnZpY2UuIA0K',
'file_format': 'txt',
'filename': 'test.txt',
'key': 'YOUR_UPS_KEY',
'password': 'YOUR_PASSWORD',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"UploadDocument",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"key"=>"YOUR_UPS_KEY",
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"filename"=>"test.txt",
"file_format"=>"txt",
"document_type"=>"013",
"file_contents"=>
"Tm90aWNlDQpJbiBhbGwgY29tbXVuaWNhdGlvbnMgd2l0aCBVUFMgY29uY2VybmluZyB0aGlzIGRvY3VtZW50LCBwbGVhc2UgcmVmZXIgdG8gdGhlIGRvY3VtZW50IGRhdGUgbG9jYXRlZCBvbiB0aGUgY292ZXIuDQpDb3B5cmlnaHQNClRoZSB1c2UsIGRpc2Nsb3N1cmUsIHJlcHJvZHVjdGlvbiwgbW9kaWZpY2F0aW9uLCB0cmFuc2Zlciwgb3IgdHJhbnNtaXR0YWwgb2YgdGhpcyB3b3JrIGZvciBhbnkgcHVycG9zZSBpbiBhbnkgZm9ybSBvciBieSBhbnkgbWVhbnMgd2l0aG91dCB0aGUgd3JpdHRlbiBw ZXJtaXNzaW9uIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBpcyBzdHJpY3RseSBwcm9oaWJpdGVk Lg0KwqkgQ29weXJpZ2h0IDIwMTYgVW5pdGVkIFBhcmNlbCBTZXJ2aWNlIG9mIEFtZXJpY2EsIElu Yy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC4NClRyYWRlbWFya3MNClVQUyBPbkxpbmXCriBpcyBhIHJl Z2lzdGVyZWQgdHJhZGVtYXJrIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJ bmMuIEFsbCBvdGhlciB0cmFkZW1hcmtzIGFyZSB0aGUgcHJvcGVydHkgb2YgdGhlaXIgcmVzcGVj dGl2ZSBvd25lcnMuDQpTb21lIG9mIHRoZSBVUFMgY29ycG9yYXRlIGFwcGxpY2F0aW9ucyB1c2Ug VS5TLiBjaXR5LCBzdGF0ZSwgYW5kIHBvc3RhbCBjb2RlIGluZm9ybWF0aW9uIG9idGFpbmVkIGJ5 IFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJbmMuIHVuZGVyIGEgbm9uLWV4Y2x1 c2l2ZSBsaWNlbnNlIGZyb20gdGhlIFVuaXRlZCBTdGF0ZXMgUG9zdGFsIFNlcnZpY2UuIA0K"}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "UploadDocument",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"key": "YOUR_UPS_KEY",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"filename": "test.txt",
"file_format": "txt",
"document_type": "013",
"file_contents": "Tm90aWNlDQpJbiBhbGwgY29tbXVuaWNhdGlvbnMgd2l0aCBVUFMgY29uY2VybmluZyB0aGlzIGRvY3VtZW50LCBwbGVhc2UgcmVmZXIgdG8gdGhlIGRvY3VtZW50IGRhdGUgbG9jYXRlZCBvbiB0aGUgY292ZXIuDQpDb3B5cmlnaHQNClRoZSB1c2UsIGRpc2Nsb3N1cmUsIHJlcHJvZHVjdGlvbiwgbW9kaWZpY2F0aW9uLCB0cmFuc2Zlciwgb3IgdHJhbnNtaXR0YWwgb2YgdGhpcyB3b3JrIGZvciBhbnkgcHVycG9zZSBpbiBhbnkgZm9ybSBvciBieSBhbnkgbWVhbnMgd2l0aG91dCB0aGUgd3JpdHRlbiBw ZXJtaXNzaW9uIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBpcyBzdHJpY3RseSBwcm9oaWJpdGVk Lg0KwqkgQ29weXJpZ2h0IDIwMTYgVW5pdGVkIFBhcmNlbCBTZXJ2aWNlIG9mIEFtZXJpY2EsIElu Yy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC4NClRyYWRlbWFya3MNClVQUyBPbkxpbmXCriBpcyBhIHJl Z2lzdGVyZWQgdHJhZGVtYXJrIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJ bmMuIEFsbCBvdGhlciB0cmFkZW1hcmtzIGFyZSB0aGUgcHJvcGVydHkgb2YgdGhlaXIgcmVzcGVj dGl2ZSBvd25lcnMuDQpTb21lIG9mIHRoZSBVUFMgY29ycG9yYXRlIGFwcGxpY2F0aW9ucyB1c2Ug VS5TLiBjaXR5LCBzdGF0ZSwgYW5kIHBvc3RhbCBjb2RlIGluZm9ybWF0aW9uIG9idGFpbmVkIGJ5 IFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJbmMuIHVuZGVyIGEgbm9uLWV4Y2x1 c2l2ZSBsaWNlbnNlIGZyb20gdGhlIFVuaXRlZCBTdGF0ZXMgUG9zdGFsIFNlcnZpY2UuIA0K"
}
}
)
UPS - Upload Link Customs Document
{
"carrier": "UPS",
"action": "LinkDocument",
"params": {
"test": true,
"account_number": "YOUR_ACCOUNT_NUMBER",
"key": "YOUR_UPS_KEY",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"document_id": "document123.pdf",
"shipment_id": "abc123"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'LinkDocument',
'params' =>
array (
'test' => true,
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'key' => 'YOUR_UPS_KEY',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'document_id' => 'document123.pdf',
'shipment_id' => 'abc123',
),
)
);
rs.request(
{'action': 'LinkDocument',
'carrier': 'UPS',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'document_id': 'document123.pdf',
'key': 'YOUR_UPS_KEY',
'password': 'YOUR_PASSWORD',
'shipment_id': 'abc123',
'test': True,
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"LinkDocument",
"params"=>
{"test"=>true,
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"key"=>"YOUR_UPS_KEY",
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"document_id"=>"document123.pdf",
"shipment_id"=>"abc123"}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "LinkDocument",
"params": {
"test": true,
"account_number": "YOUR_ACCOUNT_NUMBER",
"key": "YOUR_UPS_KEY",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"document_id": "document123.pdf",
"shipment_id": "abc123"
}
}
)
UPS - Void Package
{
"carrier": "UPS",
"action": "VoidShipment",
"params": {
"shipment_id": "1Z2220060294314162",
"tracking_number": "1Z2220060291994175",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_KEY",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'VoidShipment',
'params' =>
array (
'shipment_id' => '1Z2220060294314162',
'tracking_number' => '1Z2220060291994175',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'key' => 'YOUR_KEY',
'test' => true,
),
)
);
rs.request(
{'action': 'VoidShipment',
'carrier': 'UPS',
'params': {'key': 'YOUR_KEY',
'password': 'YOUR_PASSWORD',
'shipment_id': '1Z2220060294314162',
'test': True,
'tracking_number': '1Z2220060291994175',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"VoidShipment",
"params"=>
{"shipment_id"=>"1Z2220060294314162",
"tracking_number"=>"1Z2220060291994175",
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"key"=>"YOUR_KEY",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "VoidShipment",
"params": {
"shipment_id": "1Z2220060294314162",
"tracking_number": "1Z2220060291994175",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_KEY",
"test": true
}
}
)
UPS - Void Shipment
{
"carrier": "UPS",
"action": "VoidShipment",
"params": {
"shipment_id": "1ZISDE016691676846",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_KEY",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS',
'action' => 'VoidShipment',
'params' =>
array (
'shipment_id' => '1ZISDE016691676846',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'key' => 'YOUR_KEY',
'test' => true,
),
)
);
rs.request(
{'action': 'VoidShipment',
'carrier': 'UPS',
'params': {'key': 'YOUR_KEY',
'password': 'YOUR_PASSWORD',
'shipment_id': '1ZISDE016691676846',
'test': True,
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"UPS",
"action"=>"VoidShipment",
"params"=>
{"shipment_id"=>"1ZISDE016691676846",
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"key"=>"YOUR_KEY",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS",
"action": "VoidShipment",
"params": {
"shipment_id": "1ZISDE016691676846",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_KEY",
"test": true
}
}
)
UPS-REST - Address Validation
{
"carrier": "UPS-REST",
"action": "AddressValidate",
"params": {
"key": "your-key-from-authenticate-request",
"to_name": "John Doe",
"to_addr1": "2920 Zoo Drive",
"to_state": "CA",
"to_city": "San Diego",
"to_code": "92112",
"to_country": "US",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'AddressValidate',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'to_name' => 'John Doe',
'to_addr1' => '2920 Zoo Drive',
'to_state' => 'CA',
'to_city' => 'San Diego',
'to_code' => '92112',
'to_country' => 'US',
'test' => true,
),
)
);
rs.request(
{'action': 'AddressValidate',
'carrier': 'UPS-REST',
'params': {'key': 'your-key-from-authenticate-request',
'test': True,
'to_addr1': '2920 Zoo Drive',
'to_city': 'San Diego',
'to_code': '92112',
'to_country': 'US',
'to_name': 'John Doe',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"AddressValidate",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"to_name"=>"John Doe",
"to_addr1"=>"2920 Zoo Drive",
"to_state"=>"CA",
"to_city"=>"San Diego",
"to_code"=>"92112",
"to_country"=>"US",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "AddressValidate",
"params": {
"key": "your-key-from-authenticate-request",
"to_name": "John Doe",
"to_addr1": "2920 Zoo Drive",
"to_state": "CA",
"to_city": "San Diego",
"to_code": "92112",
"to_country": "US",
"test": true
}
}
)
UPS-REST - Address Validation City/State from Zip
{
"carrier": "UPS-REST",
"action": "AddressValidate",
"params": {
"key": "your-key-from-authenticate-request",
"to_code": "92101"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'AddressValidate',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'to_code' => '92101',
),
)
);
rs.request(
{'action': 'AddressValidate',
'carrier': 'UPS-REST',
'params': {'key': 'your-key-from-authenticate-request', 'to_code': '92101'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"AddressValidate",
"params"=>{"key"=>"your-key-from-authenticate-request", "to_code"=>"92101"}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "AddressValidate",
"params": {
"key": "your-key-from-authenticate-request",
"to_code": "92101"
}
}
)
UPS-REST - Authenticate
{
"carrier": "UPS-REST",
"action": "Authenticate",
"params": {
"client_id": "abc123",
"client_secret": "def987",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'Authenticate',
'params' =>
array (
'client_id' => 'abc123',
'client_secret' => 'def987',
'test' => true,
),
)
);
rs.request(
{'action': 'Authenticate',
'carrier': 'UPS-REST',
'params': {'client_id': 'abc123', 'client_secret': 'def987', 'test': True}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"Authenticate",
"params"=>{"client_id"=>"abc123", "client_secret"=>"def987", "test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "Authenticate",
"params": {
"client_id": "abc123",
"client_secret": "def987",
"test": true
}
}
)
UPS-REST - Download CSV
{
"carrier": "UPS-REST",
"action": "GetSubscription",
"params": {
"key": "your-key-from-authenticate-request",
"begin_date": "20160426000000",
"end_date": "20160429154400",
"subscription_name": "Test"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'GetSubscription',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'begin_date' => '20160426000000',
'end_date' => '20160429154400',
'subscription_name' => 'Test',
),
)
);
rs.request(
{'action': 'GetSubscription',
'carrier': 'UPS-REST',
'params': {'begin_date': '20160426000000',
'end_date': '20160429154400',
'key': 'your-key-from-authenticate-request',
'subscription_name': 'Test'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"GetSubscription",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"begin_date"=>"20160426000000",
"end_date"=>"20160429154400",
"subscription_name"=>"Test"}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "GetSubscription",
"params": {
"key": "your-key-from-authenticate-request",
"begin_date": "20160426000000",
"end_date": "20160429154400",
"subscription_name": "Test"
}
}
)
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT",
"special_instructions": "this ends up in additional comments",
"customs_forms": "01",
"currency": "USD",
"invoice_date": "20230525",
"reason_for_export": "SALE",
"invoice_line_total": 100,
"packages": [
{
"weight": 1,
"reference_code": "TN",
"reference_value": "12345678"
}
],
"customs": [
{
"invoice_line_number": "1",
"invoice_line_part_number": "123",
"invoice_line_description": "My Description",
"invoice_line_value": "100",
"invoice_line_origin_country_code": "CA",
"customs_quantity_units": "EA"
}
],
"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": "11",
"to_name": "John Doe",
"to_attention_name": "John Doe",
"to_addr1": "2000 Meadowvale Rd",
"to_city": "Toronto",
"to_state": "ON",
"to_code": "M1B5K7",
"to_country": "CA",
"to_phone": "1231231234",
"ship_contact": "John Doe",
"shipper": "John Doe",
"ship_addr1": "2300 Southern Blvd",
"ship_state": "NY",
"ship_city": "Bronx",
"ship_code": "10460",
"ship_country": "US",
"ship_phone": "1231231234",
"image_type": "PNG",
"shipment_description": "xxx",
"packaging_type": "02",
"pickup_type": "02",
"weight_unit": "LBS",
"length_unit": "IN"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'test' => true,
'key' => 'your-key-from-authenticate-request',
'account_number' => 'YOUR_ACCOUNT',
'special_instructions' => 'this ends up in additional comments',
'customs_forms' => '01',
'currency' => 'USD',
'invoice_date' => '20230525',
'reason_for_export' => 'SALE',
'invoice_line_total' => 100,
'packages' =>
array (
0 =>
array (
'weight' => 1,
'reference_code' => 'TN',
'reference_value' => '12345678',
),
),
'customs' =>
array (
0 =>
array (
'invoice_line_number' => '1',
'invoice_line_part_number' => '123',
'invoice_line_description' => 'My Description',
'invoice_line_value' => '100',
'invoice_line_origin_country_code' => 'CA',
'customs_quantity_units' => 'EA',
),
),
'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' => '11',
'to_name' => 'John Doe',
'to_attention_name' => 'John Doe',
'to_addr1' => '2000 Meadowvale Rd',
'to_city' => 'Toronto',
'to_state' => 'ON',
'to_code' => 'M1B5K7',
'to_country' => 'CA',
'to_phone' => '1231231234',
'ship_contact' => 'John Doe',
'shipper' => 'John Doe',
'ship_addr1' => '2300 Southern Blvd',
'ship_state' => 'NY',
'ship_city' => 'Bronx',
'ship_code' => '10460',
'ship_country' => 'US',
'ship_phone' => '1231231234',
'image_type' => 'PNG',
'shipment_description' => 'xxx',
'packaging_type' => '02',
'pickup_type' => '02',
'weight_unit' => 'LBS',
'length_unit' => 'IN',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS-REST',
'params': {'account_number': 'YOUR_ACCOUNT',
'currency': 'USD',
'customs': [{'customs_quantity_units': 'EA',
'invoice_line_description': 'My Description',
'invoice_line_number': '1',
'invoice_line_origin_country_code': 'CA',
'invoice_line_part_number': '123',
'invoice_line_value': '100'}],
'customs_forms': '01',
'image_type': 'PNG',
'invoice_date': '20230525',
'invoice_line_total': 100,
'key': 'your-key-from-authenticate-request',
'length_unit': 'IN',
'packages': [{'reference_code': 'TN',
'reference_value': '12345678',
'weight': 1}],
'packaging_type': '02',
'pickup_type': '02',
'reason_for_export': 'SALE',
'service': '11',
'ship_addr1': '2300 Southern Blvd',
'ship_city': 'Bronx',
'ship_code': '10460',
'ship_contact': 'John Doe',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'NY',
'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',
'special_instructions': 'this ends up in additional comments',
'test': True,
'to_addr1': '2000 Meadowvale Rd',
'to_attention_name': 'John Doe',
'to_city': 'Toronto',
'to_code': 'M1B5K7',
'to_country': 'CA',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'ON',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"SubmitShipment",
"params"=>
{"test"=>true,
"key"=>"your-key-from-authenticate-request",
"account_number"=>"YOUR_ACCOUNT",
"special_instructions"=>"this ends up in additional comments",
"customs_forms"=>"01",
"currency"=>"USD",
"invoice_date"=>"20230525",
"reason_for_export"=>"SALE",
"invoice_line_total"=>100,
"packages"=>
[{"weight"=>1, "reference_code"=>"TN", "reference_value"=>"12345678"}],
"customs"=>
[{"invoice_line_number"=>"1",
"invoice_line_part_number"=>"123",
"invoice_line_description"=>"My Description",
"invoice_line_value"=>"100",
"invoice_line_origin_country_code"=>"CA",
"customs_quantity_units"=>"EA"}],
"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"=>"11",
"to_name"=>"John Doe",
"to_attention_name"=>"John Doe",
"to_addr1"=>"2000 Meadowvale Rd",
"to_city"=>"Toronto",
"to_state"=>"ON",
"to_code"=>"M1B5K7",
"to_country"=>"CA",
"to_phone"=>"1231231234",
"ship_contact"=>"John Doe",
"shipper"=>"John Doe",
"ship_addr1"=>"2300 Southern Blvd",
"ship_state"=>"NY",
"ship_city"=>"Bronx",
"ship_code"=>"10460",
"ship_country"=>"US",
"ship_phone"=>"1231231234",
"image_type"=>"PNG",
"shipment_description"=>"xxx",
"packaging_type"=>"02",
"pickup_type"=>"02",
"weight_unit"=>"LBS",
"length_unit"=>"IN"}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT",
"special_instructions": "this ends up in additional comments",
"customs_forms": "01",
"currency": "USD",
"invoice_date": "20230525",
"reason_for_export": "SALE",
"invoice_line_total": 100,
"packages": [
{
"weight": 1,
"reference_code": "TN",
"reference_value": "12345678"
}
],
"customs": [
{
"invoice_line_number": "1",
"invoice_line_part_number": "123",
"invoice_line_description": "My Description",
"invoice_line_value": "100",
"invoice_line_origin_country_code": "CA",
"customs_quantity_units": "EA"
}
],
"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": "11",
"to_name": "John Doe",
"to_attention_name": "John Doe",
"to_addr1": "2000 Meadowvale Rd",
"to_city": "Toronto",
"to_state": "ON",
"to_code": "M1B5K7",
"to_country": "CA",
"to_phone": "1231231234",
"ship_contact": "John Doe",
"shipper": "John Doe",
"ship_addr1": "2300 Southern Blvd",
"ship_state": "NY",
"ship_city": "Bronx",
"ship_code": "10460",
"ship_country": "US",
"ship_phone": "1231231234",
"image_type": "PNG",
"shipment_description": "xxx",
"packaging_type": "02",
"pickup_type": "02",
"weight_unit": "LBS",
"length_unit": "IN"
}
}
)
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT",
"special_instructions": "this ends up in additional comments",
"customs_forms": "01,11",
"currency": "USD",
"invoice_date": "20230525",
"reason_for_export": "SALE",
"invoice_line_total": 100,
"packages": [
{
"weight": 1,
"reference_code": "TN",
"reference_value": "12345678"
}
],
"customs": [
{
"invoice_line_number": "1",
"invoice_line_part_number": "123",
"invoice_line_description": "My Description",
"invoice_line_value": "100",
"invoice_line_origin_country_code": "CA",
"customs_quantity_units": "EA"
}
],
"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": "11",
"to_name": "John Doe",
"to_attention_name": "John Doe",
"to_addr1": "2000 Meadowvale Rd",
"to_city": "Toronto",
"to_state": "ON",
"to_code": "M1B5K7",
"to_country": "CA",
"to_phone": "1231231234",
"ship_contact": "John Doe",
"shipper": "John Doe",
"ship_addr1": "2300 Southern Blvd",
"ship_state": "NY",
"ship_city": "Bronx",
"ship_code": "10460",
"ship_country": "US",
"ship_phone": "1231231234",
"ship_tax_id": "123",
"image_type": "PNG",
"shipment_description": "xxx",
"packaging_type": "02",
"pickup_type": "02",
"weight_unit": "LBS",
"length_unit": "IN"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'test' => true,
'key' => 'your-key-from-authenticate-request',
'account_number' => 'YOUR_ACCOUNT',
'special_instructions' => 'this ends up in additional comments',
'customs_forms' => '01,11',
'currency' => 'USD',
'invoice_date' => '20230525',
'reason_for_export' => 'SALE',
'invoice_line_total' => 100,
'packages' =>
array (
0 =>
array (
'weight' => 1,
'reference_code' => 'TN',
'reference_value' => '12345678',
),
),
'customs' =>
array (
0 =>
array (
'invoice_line_number' => '1',
'invoice_line_part_number' => '123',
'invoice_line_description' => 'My Description',
'invoice_line_value' => '100',
'invoice_line_origin_country_code' => 'CA',
'customs_quantity_units' => 'EA',
),
),
'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' => '11',
'to_name' => 'John Doe',
'to_attention_name' => 'John Doe',
'to_addr1' => '2000 Meadowvale Rd',
'to_city' => 'Toronto',
'to_state' => 'ON',
'to_code' => 'M1B5K7',
'to_country' => 'CA',
'to_phone' => '1231231234',
'ship_contact' => 'John Doe',
'shipper' => 'John Doe',
'ship_addr1' => '2300 Southern Blvd',
'ship_state' => 'NY',
'ship_city' => 'Bronx',
'ship_code' => '10460',
'ship_country' => 'US',
'ship_phone' => '1231231234',
'ship_tax_id' => '123',
'image_type' => 'PNG',
'shipment_description' => 'xxx',
'packaging_type' => '02',
'pickup_type' => '02',
'weight_unit' => 'LBS',
'length_unit' => 'IN',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS-REST',
'params': {'account_number': 'YOUR_ACCOUNT',
'currency': 'USD',
'customs': [{'customs_quantity_units': 'EA',
'invoice_line_description': 'My Description',
'invoice_line_number': '1',
'invoice_line_origin_country_code': 'CA',
'invoice_line_part_number': '123',
'invoice_line_value': '100'}],
'customs_forms': '01,11',
'image_type': 'PNG',
'invoice_date': '20230525',
'invoice_line_total': 100,
'key': 'your-key-from-authenticate-request',
'length_unit': 'IN',
'packages': [{'reference_code': 'TN',
'reference_value': '12345678',
'weight': 1}],
'packaging_type': '02',
'pickup_type': '02',
'reason_for_export': 'SALE',
'service': '11',
'ship_addr1': '2300 Southern Blvd',
'ship_city': 'Bronx',
'ship_code': '10460',
'ship_contact': 'John Doe',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'NY',
'ship_tax_id': '123',
'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',
'special_instructions': 'this ends up in additional comments',
'test': True,
'to_addr1': '2000 Meadowvale Rd',
'to_attention_name': 'John Doe',
'to_city': 'Toronto',
'to_code': 'M1B5K7',
'to_country': 'CA',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'ON',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"SubmitShipment",
"params"=>
{"test"=>true,
"key"=>"your-key-from-authenticate-request",
"account_number"=>"YOUR_ACCOUNT",
"special_instructions"=>"this ends up in additional comments",
"customs_forms"=>"01,11",
"currency"=>"USD",
"invoice_date"=>"20230525",
"reason_for_export"=>"SALE",
"invoice_line_total"=>100,
"packages"=>
[{"weight"=>1, "reference_code"=>"TN", "reference_value"=>"12345678"}],
"customs"=>
[{"invoice_line_number"=>"1",
"invoice_line_part_number"=>"123",
"invoice_line_description"=>"My Description",
"invoice_line_value"=>"100",
"invoice_line_origin_country_code"=>"CA",
"customs_quantity_units"=>"EA"}],
"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"=>"11",
"to_name"=>"John Doe",
"to_attention_name"=>"John Doe",
"to_addr1"=>"2000 Meadowvale Rd",
"to_city"=>"Toronto",
"to_state"=>"ON",
"to_code"=>"M1B5K7",
"to_country"=>"CA",
"to_phone"=>"1231231234",
"ship_contact"=>"John Doe",
"shipper"=>"John Doe",
"ship_addr1"=>"2300 Southern Blvd",
"ship_state"=>"NY",
"ship_city"=>"Bronx",
"ship_code"=>"10460",
"ship_country"=>"US",
"ship_phone"=>"1231231234",
"ship_tax_id"=>"123",
"image_type"=>"PNG",
"shipment_description"=>"xxx",
"packaging_type"=>"02",
"pickup_type"=>"02",
"weight_unit"=>"LBS",
"length_unit"=>"IN"}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT",
"special_instructions": "this ends up in additional comments",
"customs_forms": "01,11",
"currency": "USD",
"invoice_date": "20230525",
"reason_for_export": "SALE",
"invoice_line_total": 100,
"packages": [
{
"weight": 1,
"reference_code": "TN",
"reference_value": "12345678"
}
],
"customs": [
{
"invoice_line_number": "1",
"invoice_line_part_number": "123",
"invoice_line_description": "My Description",
"invoice_line_value": "100",
"invoice_line_origin_country_code": "CA",
"customs_quantity_units": "EA"
}
],
"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": "11",
"to_name": "John Doe",
"to_attention_name": "John Doe",
"to_addr1": "2000 Meadowvale Rd",
"to_city": "Toronto",
"to_state": "ON",
"to_code": "M1B5K7",
"to_country": "CA",
"to_phone": "1231231234",
"ship_contact": "John Doe",
"shipper": "John Doe",
"ship_addr1": "2300 Southern Blvd",
"ship_state": "NY",
"ship_city": "Bronx",
"ship_code": "10460",
"ship_country": "US",
"ship_phone": "1231231234",
"ship_tax_id": "123",
"image_type": "PNG",
"shipment_description": "xxx",
"packaging_type": "02",
"pickup_type": "02",
"weight_unit": "LBS",
"length_unit": "IN"
}
}
)
UPS-REST - Label
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"key": "YOUR_UPS_KEY",
"packages": [
{
"weight": 4,
"length": 7,
"width": 5,
"height": 5
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PNG",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'key' => 'YOUR_UPS_KEY',
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'width' => 5,
'height' => 5,
),
),
'service' => '03',
'shipper' => '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_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'PNG',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS-REST',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'image_type': 'PNG',
'key': 'YOUR_UPS_KEY',
'packages': [{'height': 5, 'length': 7, 'weight': 4, 'width': 5}],
'service': '03',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'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'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"SubmitShipment",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"key"=>"YOUR_UPS_KEY",
"packages"=>[{"weight"=>4, "length"=>7, "width"=>5, "height"=>5}],
"service"=>"03",
"shipper"=>"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_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"PNG",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"key": "YOUR_UPS_KEY",
"packages": [
{
"weight": 4,
"length": 7,
"width": 5,
"height": 5
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PNG",
"test": true
}
}
)
UPS-REST - Label Additional Handling
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"packages": [
{
"weight": 4,
"length": 7,
"width": 5,
"height": 5,
"additional_handling": true
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PNG",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'width' => 5,
'height' => 5,
'additional_handling' => true,
),
),
'service' => '03',
'shipper' => '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_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'PNG',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS-REST',
'params': {'image_type': 'PNG',
'key': 'your-key-from-authenticate-request',
'packages': [{'additional_handling': True,
'height': 5,
'length': 7,
'weight': 4,
'width': 5}],
'service': '03',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'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'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"packages"=>
[{"weight"=>4,
"length"=>7,
"width"=>5,
"height"=>5,
"additional_handling"=>true}],
"service"=>"03",
"shipper"=>"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_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"PNG",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"packages": [
{
"weight": 4,
"length": 7,
"width": 5,
"height": 5,
"additional_handling": true
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PNG",
"test": true
}
}
)
UPS-REST - Label COD
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"packages": [
{
"weight": 4,
"length": 7,
"cod_amount": 5.12,
"cod_fund_type": "0"
}
],
"currency": "USD",
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PNG",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'cod_amount' => 5.12,
'cod_fund_type' => '0',
),
),
'currency' => 'USD',
'service' => '03',
'shipper' => '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_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'PNG',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS-REST',
'params': {'currency': 'USD',
'image_type': 'PNG',
'key': 'your-key-from-authenticate-request',
'packages': [{'cod_amount': 5.12,
'cod_fund_type': '0',
'length': 7,
'weight': 4}],
'service': '03',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'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'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"packages"=>
[{"weight"=>4, "length"=>7, "cod_amount"=>5.12, "cod_fund_type"=>"0"}],
"currency"=>"USD",
"service"=>"03",
"shipper"=>"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_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"PNG",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"packages": [
{
"weight": 4,
"length": 7,
"cod_amount": 5.12,
"cod_fund_type": "0"
}
],
"currency": "USD",
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PNG",
"test": true
}
}
)
UPS-REST - Label DDP/DDU
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"test": true,
"trade_terms": "DDP",
"master_carton": true,
"customs_forms": "03",
"currency": "CAD",
"invoice_date": "20170610",
"reason_for_export": "SALE",
"invoice_line_total": 100,
"packages": [
{
"weight": 1,
"length": 1,
"width": 1,
"height": 1,
"reference_code": "TN",
"reference_value": "12345678"
}
],
"customs": [
{
"invoice_line_number": "1",
"invoice_line_part_number": "123",
"invoice_line_description": "My Description",
"invoice_line_value": "1",
"invoice_line_origin_country_code": "CA",
"customs_quantity_units": "EA",
"commodity_code": "240110"
}
],
"invoice": "12345",
"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": "07",
"shipper": "John Doe",
"ship_contact": "John Doe",
"ship_name": "John Doe",
"ship_addr1": "2300 Southern Blvd",
"ship_state": "NY",
"ship_city": "Bronx",
"ship_code": "10460",
"ship_country": "US",
"ship_phone": "1231231234",
"to_company": "Acme Inc.",
"to_attention_name": "John Doe",
"to_addr1": "2000 Meadowvale Rd",
"to_city": "Toronto",
"to_state": "ON",
"to_code": "M1B5K7",
"to_country": "CA",
"to_phone": "1231231234",
"image_type": "PNG",
"shipment_description": "xxx",
"packaging_type": "02",
"pickup_type": "02",
"weight_unit": "LBS",
"length_unit": "IN"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'test' => true,
'trade_terms' => 'DDP',
'master_carton' => true,
'customs_forms' => '03',
'currency' => 'CAD',
'invoice_date' => '20170610',
'reason_for_export' => 'SALE',
'invoice_line_total' => 100,
'packages' =>
array (
0 =>
array (
'weight' => 1,
'length' => 1,
'width' => 1,
'height' => 1,
'reference_code' => 'TN',
'reference_value' => '12345678',
),
),
'customs' =>
array (
0 =>
array (
'invoice_line_number' => '1',
'invoice_line_part_number' => '123',
'invoice_line_description' => 'My Description',
'invoice_line_value' => '1',
'invoice_line_origin_country_code' => 'CA',
'customs_quantity_units' => 'EA',
'commodity_code' => '240110',
),
),
'invoice' => '12345',
'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' => '07',
'shipper' => 'John Doe',
'ship_contact' => 'John Doe',
'ship_name' => 'John Doe',
'ship_addr1' => '2300 Southern Blvd',
'ship_state' => 'NY',
'ship_city' => 'Bronx',
'ship_code' => '10460',
'ship_country' => 'US',
'ship_phone' => '1231231234',
'to_company' => 'Acme Inc.',
'to_attention_name' => 'John Doe',
'to_addr1' => '2000 Meadowvale Rd',
'to_city' => 'Toronto',
'to_state' => 'ON',
'to_code' => 'M1B5K7',
'to_country' => 'CA',
'to_phone' => '1231231234',
'image_type' => 'PNG',
'shipment_description' => 'xxx',
'packaging_type' => '02',
'pickup_type' => '02',
'weight_unit' => 'LBS',
'length_unit' => 'IN',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS-REST',
'params': {'currency': 'CAD',
'customs': [{'commodity_code': '240110',
'customs_quantity_units': 'EA',
'invoice_line_description': 'My Description',
'invoice_line_number': '1',
'invoice_line_origin_country_code': 'CA',
'invoice_line_part_number': '123',
'invoice_line_value': '1'}],
'customs_forms': '03',
'image_type': 'PNG',
'invoice': '12345',
'invoice_date': '20170610',
'invoice_line_total': 100,
'key': 'your-key-from-authenticate-request',
'length_unit': 'IN',
'master_carton': True,
'packages': [{'height': 1,
'length': 1,
'reference_code': 'TN',
'reference_value': '12345678',
'weight': 1,
'width': 1}],
'packaging_type': '02',
'pickup_type': '02',
'reason_for_export': 'SALE',
'service': '07',
'ship_addr1': '2300 Southern Blvd',
'ship_city': 'Bronx',
'ship_code': '10460',
'ship_contact': 'John Doe',
'ship_country': 'US',
'ship_name': 'John Doe',
'ship_phone': '1231231234',
'ship_state': 'NY',
'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': '2000 Meadowvale Rd',
'to_attention_name': 'John Doe',
'to_city': 'Toronto',
'to_code': 'M1B5K7',
'to_company': 'Acme Inc.',
'to_country': 'CA',
'to_phone': '1231231234',
'to_state': 'ON',
'trade_terms': 'DDP',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"test"=>true,
"trade_terms"=>"DDP",
"master_carton"=>true,
"customs_forms"=>"03",
"currency"=>"CAD",
"invoice_date"=>"20170610",
"reason_for_export"=>"SALE",
"invoice_line_total"=>100,
"packages"=>
[{"weight"=>1,
"length"=>1,
"width"=>1,
"height"=>1,
"reference_code"=>"TN",
"reference_value"=>"12345678"}],
"customs"=>
[{"invoice_line_number"=>"1",
"invoice_line_part_number"=>"123",
"invoice_line_description"=>"My Description",
"invoice_line_value"=>"1",
"invoice_line_origin_country_code"=>"CA",
"customs_quantity_units"=>"EA",
"commodity_code"=>"240110"}],
"invoice"=>"12345",
"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"=>"07",
"shipper"=>"John Doe",
"ship_contact"=>"John Doe",
"ship_name"=>"John Doe",
"ship_addr1"=>"2300 Southern Blvd",
"ship_state"=>"NY",
"ship_city"=>"Bronx",
"ship_code"=>"10460",
"ship_country"=>"US",
"ship_phone"=>"1231231234",
"to_company"=>"Acme Inc.",
"to_attention_name"=>"John Doe",
"to_addr1"=>"2000 Meadowvale Rd",
"to_city"=>"Toronto",
"to_state"=>"ON",
"to_code"=>"M1B5K7",
"to_country"=>"CA",
"to_phone"=>"1231231234",
"image_type"=>"PNG",
"shipment_description"=>"xxx",
"packaging_type"=>"02",
"pickup_type"=>"02",
"weight_unit"=>"LBS",
"length_unit"=>"IN"}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"test": true,
"trade_terms": "DDP",
"master_carton": true,
"customs_forms": "03",
"currency": "CAD",
"invoice_date": "20170610",
"reason_for_export": "SALE",
"invoice_line_total": 100,
"packages": [
{
"weight": 1,
"length": 1,
"width": 1,
"height": 1,
"reference_code": "TN",
"reference_value": "12345678"
}
],
"customs": [
{
"invoice_line_number": "1",
"invoice_line_part_number": "123",
"invoice_line_description": "My Description",
"invoice_line_value": "1",
"invoice_line_origin_country_code": "CA",
"customs_quantity_units": "EA",
"commodity_code": "240110"
}
],
"invoice": "12345",
"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": "07",
"shipper": "John Doe",
"ship_contact": "John Doe",
"ship_name": "John Doe",
"ship_addr1": "2300 Southern Blvd",
"ship_state": "NY",
"ship_city": "Bronx",
"ship_code": "10460",
"ship_country": "US",
"ship_phone": "1231231234",
"to_company": "Acme Inc.",
"to_attention_name": "John Doe",
"to_addr1": "2000 Meadowvale Rd",
"to_city": "Toronto",
"to_state": "ON",
"to_code": "M1B5K7",
"to_country": "CA",
"to_phone": "1231231234",
"image_type": "PNG",
"shipment_description": "xxx",
"packaging_type": "02",
"pickup_type": "02",
"weight_unit": "LBS",
"length_unit": "IN"
}
}
)
UPS-REST - Label Direct Adult Signature
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"packages": [
{
"weight": 4,
"length": 7,
"signature_type": "ADULT"
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "GIF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'signature_type' => 'ADULT',
),
),
'service' => '03',
'shipper' => '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_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'GIF',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS-REST',
'params': {'image_type': 'GIF',
'key': 'your-key-from-authenticate-request',
'packages': [{'length': 7, 'signature_type': 'ADULT', 'weight': 4}],
'service': '03',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'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'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"packages"=>[{"weight"=>4, "length"=>7, "signature_type"=>"ADULT"}],
"service"=>"03",
"shipper"=>"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_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"GIF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"packages": [
{
"weight": 4,
"length": 7,
"signature_type": "ADULT"
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "GIF",
"test": true
}
}
)
UPS-REST - Label Direct Delivery Only
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"addons": [
"DIRECT_DELIVERY_ONLY"
],
"packages": [
{
"weight": 4,
"length": 7,
"signature_type": "DIRECT"
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "GIF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'addons' =>
array (
0 => 'DIRECT_DELIVERY_ONLY',
),
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'signature_type' => 'DIRECT',
),
),
'service' => '03',
'shipper' => '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_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'GIF',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS-REST',
'params': {'addons': ['DIRECT_DELIVERY_ONLY'],
'image_type': 'GIF',
'key': 'your-key-from-authenticate-request',
'packages': [{'length': 7,
'signature_type': 'DIRECT',
'weight': 4}],
'service': '03',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'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'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"addons"=>["DIRECT_DELIVERY_ONLY"],
"packages"=>[{"weight"=>4, "length"=>7, "signature_type"=>"DIRECT"}],
"service"=>"03",
"shipper"=>"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_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"GIF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"addons": [
"DIRECT_DELIVERY_ONLY"
],
"packages": [
{
"weight": 4,
"length": 7,
"signature_type": "DIRECT"
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "GIF",
"test": true
}
}
)
UPS-REST - Label Direct Signature
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"packages": [
{
"weight": 4,
"length": 7,
"signature_type": "DIRECT"
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "GIF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'signature_type' => 'DIRECT',
),
),
'service' => '03',
'shipper' => '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_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'GIF',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS-REST',
'params': {'image_type': 'GIF',
'key': 'your-key-from-authenticate-request',
'packages': [{'length': 7,
'signature_type': 'DIRECT',
'weight': 4}],
'service': '03',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'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'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"packages"=>[{"weight"=>4, "length"=>7, "signature_type"=>"DIRECT"}],
"service"=>"03",
"shipper"=>"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_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"GIF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"packages": [
{
"weight": 4,
"length": 7,
"signature_type": "DIRECT"
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "GIF",
"test": true
}
}
)
UPS-REST - Label Email Notifications
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"notify": [
{
"email": "bob@email.com",
"type": "6"
}
],
"packages": [
{
"weight": 4,
"length": 7
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "GIF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'notify' =>
array (
0 =>
array (
'email' => 'bob@email.com',
'type' => '6',
),
),
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
),
),
'service' => '03',
'shipper' => '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_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'GIF',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS-REST',
'params': {'image_type': 'GIF',
'key': 'your-key-from-authenticate-request',
'notify': [{'email': 'bob@email.com', 'type': '6'}],
'packages': [{'length': 7, 'weight': 4}],
'service': '03',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'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'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"notify"=>[{"email"=>"bob@email.com", "type"=>"6"}],
"packages"=>[{"weight"=>4, "length"=>7}],
"service"=>"03",
"shipper"=>"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_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"GIF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"notify": [
{
"email": "bob@email.com",
"type": "6"
}
],
"packages": [
{
"weight": 4,
"length": 7
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "GIF",
"test": true
}
}
)
UPS-REST - Label Ground Freight Pricing
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"packages": [
{
"weight": 4,
"length": 7,
"freight_class": "55"
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "GIF",
"frs_shipment": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'test' => true,
'key' => 'your-key-from-authenticate-request',
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'freight_class' => '55',
),
),
'service' => '03',
'shipper' => '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_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'GIF',
'frs_shipment' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS-REST',
'params': {'frs_shipment': True,
'image_type': 'GIF',
'key': 'your-key-from-authenticate-request',
'packages': [{'freight_class': '55', 'length': 7, 'weight': 4}],
'service': '03',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'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'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"SubmitShipment",
"params"=>
{"test"=>true,
"key"=>"your-key-from-authenticate-request",
"packages"=>[{"weight"=>4, "length"=>7, "freight_class"=>"55"}],
"service"=>"03",
"shipper"=>"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_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"GIF",
"frs_shipment"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"packages": [
{
"weight": 4,
"length": 7,
"freight_class": "55"
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "GIF",
"frs_shipment": true
}
}
)
UPS-REST - Label Insurance
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"packages": [
{
"weight": 4,
"length": 7,
"insured_value": 700,
"insured_currency": "USD"
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "GIF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'insured_value' => 700,
'insured_currency' => 'USD',
),
),
'service' => '03',
'shipper' => '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_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'GIF',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS-REST',
'params': {'image_type': 'GIF',
'key': 'your-key-from-authenticate-request',
'packages': [{'insured_currency': 'USD',
'insured_value': 700,
'length': 7,
'weight': 4}],
'service': '03',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'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'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"packages"=>
[{"weight"=>4,
"length"=>7,
"insured_value"=>700,
"insured_currency"=>"USD"}],
"service"=>"03",
"shipper"=>"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_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"GIF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"packages": [
{
"weight": 4,
"length": 7,
"insured_value": 700,
"insured_currency": "USD"
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "GIF",
"test": true
}
}
)
UPS-REST - Label Lithium Battery
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"account_number": "your-account-number",
"key": "your-key-from-authenticate-request",
"service": "03",
"packages": [
{
"weight": 15,
"battery": {
"type": "LITHIUM_ION",
"packing_type": "PACKED_WITH_EQUIPMENT"
}
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'account_number' => 'your-account-number',
'key' => 'your-key-from-authenticate-request',
'service' => '03',
'packages' =>
array (
0 =>
array (
'weight' => 15,
'battery' =>
array (
'type' => 'LITHIUM_ION',
'packing_type' => 'PACKED_WITH_EQUIPMENT',
),
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'to_phone' => '1231231234',
'packaging_type' => 'YOUR_PACKAGING',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS-REST',
'params': {'account_number': 'your-account-number',
'key': 'your-key-from-authenticate-request',
'packages': [{'battery': {'packing_type': 'PACKED_WITH_EQUIPMENT',
'type': 'LITHIUM_ION'},
'weight': 15}],
'packaging_type': 'YOUR_PACKAGING',
'service': '03',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"SubmitShipment",
"params"=>
{"account_number"=>"your-account-number",
"key"=>"your-key-from-authenticate-request",
"service"=>"03",
"packages"=>
[{"weight"=>15,
"battery"=>
{"type"=>"LITHIUM_ION", "packing_type"=>"PACKED_WITH_EQUIPMENT"}}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"to_phone"=>"1231231234",
"packaging_type"=>"YOUR_PACKAGING",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"account_number": "your-account-number",
"key": "your-key-from-authenticate-request",
"service": "03",
"packages": [
{
"weight": 15,
"battery": {
"type": "LITHIUM_ION",
"packing_type": "PACKED_WITH_EQUIPMENT"
}
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
)
UPS-REST - Label Mail Innovations
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT_NUMBER",
"usps_endorsement": "1",
"cost_center": "00000",
"package_id": "1",
"packaging_type": "62",
"packages": [
{
"weight": 4,
"length": 7
}
],
"service": "M4",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "GIF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'usps_endorsement' => '1',
'cost_center' => '00000',
'package_id' => '1',
'packaging_type' => '62',
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
),
),
'service' => 'M4',
'shipper' => '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_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'GIF',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS-REST',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'cost_center': '00000',
'image_type': 'GIF',
'key': 'your-key-from-authenticate-request',
'package_id': '1',
'packages': [{'length': 7, 'weight': 4}],
'packaging_type': '62',
'service': 'M4',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'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',
'usps_endorsement': '1'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"usps_endorsement"=>"1",
"cost_center"=>"00000",
"package_id"=>"1",
"packaging_type"=>"62",
"packages"=>[{"weight"=>4, "length"=>7}],
"service"=>"M4",
"shipper"=>"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_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"GIF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT_NUMBER",
"usps_endorsement": "1",
"cost_center": "00000",
"package_id": "1",
"packaging_type": "62",
"packages": [
{
"weight": 4,
"length": 7
}
],
"service": "M4",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "GIF",
"test": true
}
}
)
UPS-REST - Label NAFTA CO
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"account_number": "YOURACCOUNT",
"trade_terms": "DDP",
"packages": [
{
"weight": 0.23,
"length": 6,
"width": 10,
"height": 1,
"signature_type": "",
"reference_code": "PO",
"reference_value": "1234567890",
"reference_barcode": true
}
],
"service": "11",
"customs_forms": "01,04",
"currency": "USD",
"invoice_date": "20250112",
"invoice_line_total": 0.01,
"reason_for_export": "SALE",
"invoice": "1234567890",
"sold_company": "Acme Inc",
"sold_name": "John Doe",
"sold_addr1": "123 Main St",
"sold_addr2": "N\/A",
"sold_city": "Brossard",
"sold_state": "QC",
"sold_code": "J4X2H5",
"sold_country": "CA",
"sold_phone": "1239238780",
"shipper": "Acme Inc",
"ship_contact": "Acme Inc",
"ship_name": "Acme Inc",
"ship_addr1": "123 Main St",
"ship_addr2": null,
"ship_city": "Boca Raton",
"ship_state": "FL",
"ship_code": "33487",
"ship_phone": "1239488932",
"ship_country": "US",
"to_name": "John Doe",
"to_attention_name": "John Doe",
"to_addr1": "123 Main St",
"to_addr2": "N\/A",
"to_state": "QC",
"to_city": "Brossard",
"to_phone": "1239238780",
"to_code": "J4X2H5",
"to_country": "CA",
"addons": null,
"accessorials": null,
"shipment_description": "Acme Inc",
"weight_unit": "LB",
"image_type": "ZPL",
"length_unit": "IN",
"negotiated_rates": true,
"test": true,
"producer_name": "Acme Inc",
"producer_addr1": "123 Main St",
"producer_city": "Whitehall",
"producer_state": "MT",
"producer_code": "59759",
"producer_country": "US",
"customs": [
{
"invoice_line_number": 1,
"invoice_line_part_number": "5729",
"invoice_line_description": "East Coast Tobacco Concentrated Fla",
"invoice_line_value": "8.00",
"invoice_line_origin_country_code": "US",
"customs_quantity_units": "PCS",
"commodity_code": "210690",
"net_cost_code": "NO",
"preference_criteria": "A",
"producer_info": "YES"
},
{
"invoice_line_number": 2,
"invoice_line_part_number": "35826",
"invoice_line_description": "Virginia Concentrated Flavoring - 1",
"invoice_line_value": "10.00",
"invoice_line_origin_country_code": "US",
"customs_quantity_units": "PCS",
"commodity_code": "210690",
"net_cost_code": "NO",
"preference_criteria": "A",
"producer_info": "YES"
}
]
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'account_number' => 'YOURACCOUNT',
'trade_terms' => 'DDP',
'packages' =>
array (
0 =>
array (
'weight' => 0.23,
'length' => 6,
'width' => 10,
'height' => 1,
'signature_type' => '',
'reference_code' => 'PO',
'reference_value' => '1234567890',
'reference_barcode' => true,
),
),
'service' => '11',
'customs_forms' => '01,04',
'currency' => 'USD',
'invoice_date' => '20250112',
'invoice_line_total' => 0.01,
'reason_for_export' => 'SALE',
'invoice' => '1234567890',
'sold_company' => 'Acme Inc',
'sold_name' => 'John Doe',
'sold_addr1' => '123 Main St',
'sold_addr2' => 'N/A',
'sold_city' => 'Brossard',
'sold_state' => 'QC',
'sold_code' => 'J4X2H5',
'sold_country' => 'CA',
'sold_phone' => '1239238780',
'shipper' => 'Acme Inc',
'ship_contact' => 'Acme Inc',
'ship_name' => 'Acme Inc',
'ship_addr1' => '123 Main St',
'ship_addr2' => NULL,
'ship_city' => 'Boca Raton',
'ship_state' => 'FL',
'ship_code' => '33487',
'ship_phone' => '1239488932',
'ship_country' => 'US',
'to_name' => 'John Doe',
'to_attention_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_addr2' => 'N/A',
'to_state' => 'QC',
'to_city' => 'Brossard',
'to_phone' => '1239238780',
'to_code' => 'J4X2H5',
'to_country' => 'CA',
'addons' => NULL,
'accessorials' => NULL,
'shipment_description' => 'Acme Inc',
'weight_unit' => 'LB',
'image_type' => 'ZPL',
'length_unit' => 'IN',
'negotiated_rates' => true,
'test' => true,
'producer_name' => 'Acme Inc',
'producer_addr1' => '123 Main St',
'producer_city' => 'Whitehall',
'producer_state' => 'MT',
'producer_code' => '59759',
'producer_country' => 'US',
'customs' =>
array (
0 =>
array (
'invoice_line_number' => 1,
'invoice_line_part_number' => '5729',
'invoice_line_description' => 'East Coast Tobacco Concentrated Fla',
'invoice_line_value' => '8.00',
'invoice_line_origin_country_code' => 'US',
'customs_quantity_units' => 'PCS',
'commodity_code' => '210690',
'net_cost_code' => 'NO',
'preference_criteria' => 'A',
'producer_info' => 'YES',
),
1 =>
array (
'invoice_line_number' => 2,
'invoice_line_part_number' => '35826',
'invoice_line_description' => 'Virginia Concentrated Flavoring - 1',
'invoice_line_value' => '10.00',
'invoice_line_origin_country_code' => 'US',
'customs_quantity_units' => 'PCS',
'commodity_code' => '210690',
'net_cost_code' => 'NO',
'preference_criteria' => 'A',
'producer_info' => 'YES',
),
),
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS-REST',
'params': {'accessorials': None,
'account_number': 'YOURACCOUNT',
'addons': None,
'currency': 'USD',
'customs': [{'commodity_code': '210690',
'customs_quantity_units': 'PCS',
'invoice_line_description': 'East Coast Tobacco '
'Concentrated Fla',
'invoice_line_number': 1,
'invoice_line_origin_country_code': 'US',
'invoice_line_part_number': '5729',
'invoice_line_value': '8.00',
'net_cost_code': 'NO',
'preference_criteria': 'A',
'producer_info': 'YES'},
{'commodity_code': '210690',
'customs_quantity_units': 'PCS',
'invoice_line_description': 'Virginia Concentrated '
'Flavoring - 1',
'invoice_line_number': 2,
'invoice_line_origin_country_code': 'US',
'invoice_line_part_number': '35826',
'invoice_line_value': '10.00',
'net_cost_code': 'NO',
'preference_criteria': 'A',
'producer_info': 'YES'}],
'customs_forms': '01,04',
'image_type': 'ZPL',
'invoice': '1234567890',
'invoice_date': '20250112',
'invoice_line_total': 0.01,
'length_unit': 'IN',
'negotiated_rates': True,
'packages': [{'height': 1,
'length': 6,
'reference_barcode': True,
'reference_code': 'PO',
'reference_value': '1234567890',
'signature_type': '',
'weight': 0.23,
'width': 10}],
'producer_addr1': '123 Main St',
'producer_city': 'Whitehall',
'producer_code': '59759',
'producer_country': 'US',
'producer_name': 'Acme Inc',
'producer_state': 'MT',
'reason_for_export': 'SALE',
'service': '11',
'ship_addr1': '123 Main St',
'ship_addr2': None,
'ship_city': 'Boca Raton',
'ship_code': '33487',
'ship_contact': 'Acme Inc',
'ship_country': 'US',
'ship_name': 'Acme Inc',
'ship_phone': '1239488932',
'ship_state': 'FL',
'shipment_description': 'Acme Inc',
'shipper': 'Acme Inc',
'sold_addr1': '123 Main St',
'sold_addr2': 'N/A',
'sold_city': 'Brossard',
'sold_code': 'J4X2H5',
'sold_company': 'Acme Inc',
'sold_country': 'CA',
'sold_name': 'John Doe',
'sold_phone': '1239238780',
'sold_state': 'QC',
'test': True,
'to_addr1': '123 Main St',
'to_addr2': 'N/A',
'to_attention_name': 'John Doe',
'to_city': 'Brossard',
'to_code': 'J4X2H5',
'to_country': 'CA',
'to_name': 'John Doe',
'to_phone': '1239238780',
'to_state': 'QC',
'trade_terms': 'DDP',
'weight_unit': 'LB'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"SubmitShipment",
"params"=>
{"account_number"=>"YOURACCOUNT",
"trade_terms"=>"DDP",
"packages"=>
[{"weight"=>0.23,
"length"=>6,
"width"=>10,
"height"=>1,
"signature_type"=>"",
"reference_code"=>"PO",
"reference_value"=>"1234567890",
"reference_barcode"=>true}],
"service"=>"11",
"customs_forms"=>"01,04",
"currency"=>"USD",
"invoice_date"=>"20250112",
"invoice_line_total"=>0.01,
"reason_for_export"=>"SALE",
"invoice"=>"1234567890",
"sold_company"=>"Acme Inc",
"sold_name"=>"John Doe",
"sold_addr1"=>"123 Main St",
"sold_addr2"=>"N/A",
"sold_city"=>"Brossard",
"sold_state"=>"QC",
"sold_code"=>"J4X2H5",
"sold_country"=>"CA",
"sold_phone"=>"1239238780",
"shipper"=>"Acme Inc",
"ship_contact"=>"Acme Inc",
"ship_name"=>"Acme Inc",
"ship_addr1"=>"123 Main St",
"ship_addr2"=>nil,
"ship_city"=>"Boca Raton",
"ship_state"=>"FL",
"ship_code"=>"33487",
"ship_phone"=>"1239488932",
"ship_country"=>"US",
"to_name"=>"John Doe",
"to_attention_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_addr2"=>"N/A",
"to_state"=>"QC",
"to_city"=>"Brossard",
"to_phone"=>"1239238780",
"to_code"=>"J4X2H5",
"to_country"=>"CA",
"addons"=>nil,
"accessorials"=>nil,
"shipment_description"=>"Acme Inc",
"weight_unit"=>"LB",
"image_type"=>"ZPL",
"length_unit"=>"IN",
"negotiated_rates"=>true,
"test"=>true,
"producer_name"=>"Acme Inc",
"producer_addr1"=>"123 Main St",
"producer_city"=>"Whitehall",
"producer_state"=>"MT",
"producer_code"=>"59759",
"producer_country"=>"US",
"customs"=>
[{"invoice_line_number"=>1,
"invoice_line_part_number"=>"5729",
"invoice_line_description"=>"East Coast Tobacco Concentrated Fla",
"invoice_line_value"=>"8.00",
"invoice_line_origin_country_code"=>"US",
"customs_quantity_units"=>"PCS",
"commodity_code"=>"210690",
"net_cost_code"=>"NO",
"preference_criteria"=>"A",
"producer_info"=>"YES"},
{"invoice_line_number"=>2,
"invoice_line_part_number"=>"35826",
"invoice_line_description"=>"Virginia Concentrated Flavoring - 1",
"invoice_line_value"=>"10.00",
"invoice_line_origin_country_code"=>"US",
"customs_quantity_units"=>"PCS",
"commodity_code"=>"210690",
"net_cost_code"=>"NO",
"preference_criteria"=>"A",
"producer_info"=>"YES"}]}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"account_number": "YOURACCOUNT",
"trade_terms": "DDP",
"packages": [
{
"weight": 0.23,
"length": 6,
"width": 10,
"height": 1,
"signature_type": "",
"reference_code": "PO",
"reference_value": "1234567890",
"reference_barcode": true
}
],
"service": "11",
"customs_forms": "01,04",
"currency": "USD",
"invoice_date": "20250112",
"invoice_line_total": 0.01,
"reason_for_export": "SALE",
"invoice": "1234567890",
"sold_company": "Acme Inc",
"sold_name": "John Doe",
"sold_addr1": "123 Main St",
"sold_addr2": "N\/A",
"sold_city": "Brossard",
"sold_state": "QC",
"sold_code": "J4X2H5",
"sold_country": "CA",
"sold_phone": "1239238780",
"shipper": "Acme Inc",
"ship_contact": "Acme Inc",
"ship_name": "Acme Inc",
"ship_addr1": "123 Main St",
"ship_addr2": null,
"ship_city": "Boca Raton",
"ship_state": "FL",
"ship_code": "33487",
"ship_phone": "1239488932",
"ship_country": "US",
"to_name": "John Doe",
"to_attention_name": "John Doe",
"to_addr1": "123 Main St",
"to_addr2": "N\/A",
"to_state": "QC",
"to_city": "Brossard",
"to_phone": "1239238780",
"to_code": "J4X2H5",
"to_country": "CA",
"addons": null,
"accessorials": null,
"shipment_description": "Acme Inc",
"weight_unit": "LB",
"image_type": "ZPL",
"length_unit": "IN",
"negotiated_rates": true,
"test": true,
"producer_name": "Acme Inc",
"producer_addr1": "123 Main St",
"producer_city": "Whitehall",
"producer_state": "MT",
"producer_code": "59759",
"producer_country": "US",
"customs": [
{
"invoice_line_number": 1,
"invoice_line_part_number": "5729",
"invoice_line_description": "East Coast Tobacco Concentrated Fla",
"invoice_line_value": "8.00",
"invoice_line_origin_country_code": "US",
"customs_quantity_units": "PCS",
"commodity_code": "210690",
"net_cost_code": "NO",
"preference_criteria": "A",
"producer_info": "YES"
},
{
"invoice_line_number": 2,
"invoice_line_part_number": "35826",
"invoice_line_description": "Virginia Concentrated Flavoring - 1",
"invoice_line_value": "10.00",
"invoice_line_origin_country_code": "US",
"customs_quantity_units": "PCS",
"commodity_code": "210690",
"net_cost_code": "NO",
"preference_criteria": "A",
"producer_info": "YES"
}
]
}
}
)
UPS-REST - Label Recovery
{
"carrier": "UPS-REST",
"action": "LabelRecovery",
"params": {
"key": "your-key-from-authenticate-request",
"tracking_number": "1Z12345E8791315413",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'LabelRecovery',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'tracking_number' => '1Z12345E8791315413',
'test' => true,
),
)
);
rs.request(
{'action': 'LabelRecovery',
'carrier': 'UPS-REST',
'params': {'key': 'your-key-from-authenticate-request',
'test': True,
'tracking_number': '1Z12345E8791315413'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"LabelRecovery",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"tracking_number"=>"1Z12345E8791315413",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "LabelRecovery",
"params": {
"key": "your-key-from-authenticate-request",
"tracking_number": "1Z12345E8791315413",
"test": true
}
}
)
UPS-REST - Label Reference Values
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT_NUMBER",
"packages": [
{
"weight": 4,
"reference_code": "PO",
"reference_value": "12382871",
"reference_barcode": true,
"reference_code2": "IN",
"reference_value2": "10000"
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "Png",
"from_company": "RocketShipIt",
"from_name": "Mark Sanborn",
"from_addr1": "940 Presidio Ave",
"from_addr2": "#103",
"from_city": "San Francisco",
"from_state": "CA",
"from_code": "94115",
"return_code": "9",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'packages' =>
array (
0 =>
array (
'weight' => 4,
'reference_code' => 'PO',
'reference_value' => '12382871',
'reference_barcode' => true,
'reference_code2' => 'IN',
'reference_value2' => '10000',
),
),
'service' => '03',
'shipper' => '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_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'Png',
'from_company' => 'RocketShipIt',
'from_name' => 'Mark Sanborn',
'from_addr1' => '940 Presidio Ave',
'from_addr2' => '#103',
'from_city' => 'San Francisco',
'from_state' => 'CA',
'from_code' => '94115',
'return_code' => '9',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS-REST',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'from_addr1': '940 Presidio Ave',
'from_addr2': '#103',
'from_city': 'San Francisco',
'from_code': '94115',
'from_company': 'RocketShipIt',
'from_name': 'Mark Sanborn',
'from_state': 'CA',
'image_type': 'Png',
'key': 'your-key-from-authenticate-request',
'packages': [{'reference_barcode': True,
'reference_code': 'PO',
'reference_code2': 'IN',
'reference_value': '12382871',
'reference_value2': '10000',
'weight': 4}],
'return_code': '9',
'service': '03',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'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'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"packages"=>
[{"weight"=>4,
"reference_code"=>"PO",
"reference_value"=>"12382871",
"reference_barcode"=>true,
"reference_code2"=>"IN",
"reference_value2"=>"10000"}],
"service"=>"03",
"shipper"=>"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_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"Png",
"from_company"=>"RocketShipIt",
"from_name"=>"Mark Sanborn",
"from_addr1"=>"940 Presidio Ave",
"from_addr2"=>"#103",
"from_city"=>"San Francisco",
"from_state"=>"CA",
"from_code"=>"94115",
"return_code"=>"9",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT_NUMBER",
"packages": [
{
"weight": 4,
"reference_code": "PO",
"reference_value": "12382871",
"reference_barcode": true,
"reference_code2": "IN",
"reference_value2": "10000"
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "Png",
"from_company": "RocketShipIt",
"from_name": "Mark Sanborn",
"from_addr1": "940 Presidio Ave",
"from_addr2": "#103",
"from_city": "San Francisco",
"from_state": "CA",
"from_code": "94115",
"return_code": "9",
"test": true
}
}
)
UPS-REST - Label Return
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT_NUMBER",
"packages": [
{
"weight": 4
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "GIF",
"from_company": "RocketShipIt",
"from_name": "Mark Sanborn",
"from_addr1": "940 Presidio Ave",
"from_addr2": "#103",
"from_city": "San Francisco",
"from_state": "CA",
"from_code": "94115",
"return_code": "9",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'packages' =>
array (
0 =>
array (
'weight' => 4,
),
),
'service' => '03',
'shipper' => '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_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'GIF',
'from_company' => 'RocketShipIt',
'from_name' => 'Mark Sanborn',
'from_addr1' => '940 Presidio Ave',
'from_addr2' => '#103',
'from_city' => 'San Francisco',
'from_state' => 'CA',
'from_code' => '94115',
'return_code' => '9',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS-REST',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'from_addr1': '940 Presidio Ave',
'from_addr2': '#103',
'from_city': 'San Francisco',
'from_code': '94115',
'from_company': 'RocketShipIt',
'from_name': 'Mark Sanborn',
'from_state': 'CA',
'image_type': 'GIF',
'key': 'your-key-from-authenticate-request',
'packages': [{'weight': 4}],
'return_code': '9',
'service': '03',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'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'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"packages"=>[{"weight"=>4}],
"service"=>"03",
"shipper"=>"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_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"GIF",
"from_company"=>"RocketShipIt",
"from_name"=>"Mark Sanborn",
"from_addr1"=>"940 Presidio Ave",
"from_addr2"=>"#103",
"from_city"=>"San Francisco",
"from_state"=>"CA",
"from_code"=>"94115",
"return_code"=>"9",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT_NUMBER",
"packages": [
{
"weight": 4
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "GIF",
"from_company": "RocketShipIt",
"from_name": "Mark Sanborn",
"from_addr1": "940 Presidio Ave",
"from_addr2": "#103",
"from_city": "San Francisco",
"from_state": "CA",
"from_code": "94115",
"return_code": "9",
"test": true
}
}
)
UPS-REST - Label Return w/ Email Delivery
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"return_code": "8",
"notify": [
{
"type": "RETURN",
"email": "bob@email.com",
"undeliverable_email": "foo@bar.com",
"from_email": "blah@email.com",
"from_name": "John Doe"
}
],
"packages": [
{
"weight": 4
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "GIF",
"from_company": "RocketShipIt",
"from_name": "Mark Sanborn",
"from_addr1": "940 Presidio Ave",
"from_addr2": "#103",
"from_city": "San Francisco",
"from_state": "CA",
"from_code": "94115",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'return_code' => '8',
'notify' =>
array (
0 =>
array (
'type' => 'RETURN',
'email' => 'bob@email.com',
'undeliverable_email' => 'foo@bar.com',
'from_email' => 'blah@email.com',
'from_name' => 'John Doe',
),
),
'packages' =>
array (
0 =>
array (
'weight' => 4,
),
),
'service' => '03',
'shipper' => '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_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'GIF',
'from_company' => 'RocketShipIt',
'from_name' => 'Mark Sanborn',
'from_addr1' => '940 Presidio Ave',
'from_addr2' => '#103',
'from_city' => 'San Francisco',
'from_state' => 'CA',
'from_code' => '94115',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS-REST',
'params': {'from_addr1': '940 Presidio Ave',
'from_addr2': '#103',
'from_city': 'San Francisco',
'from_code': '94115',
'from_company': 'RocketShipIt',
'from_name': 'Mark Sanborn',
'from_state': 'CA',
'image_type': 'GIF',
'key': 'your-key-from-authenticate-request',
'notify': [{'email': 'bob@email.com',
'from_email': 'blah@email.com',
'from_name': 'John Doe',
'type': 'RETURN',
'undeliverable_email': 'foo@bar.com'}],
'packages': [{'weight': 4}],
'return_code': '8',
'service': '03',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'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'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"return_code"=>"8",
"notify"=>
[{"type"=>"RETURN",
"email"=>"bob@email.com",
"undeliverable_email"=>"foo@bar.com",
"from_email"=>"blah@email.com",
"from_name"=>"John Doe"}],
"packages"=>[{"weight"=>4}],
"service"=>"03",
"shipper"=>"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_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"GIF",
"from_company"=>"RocketShipIt",
"from_name"=>"Mark Sanborn",
"from_addr1"=>"940 Presidio Ave",
"from_addr2"=>"#103",
"from_city"=>"San Francisco",
"from_state"=>"CA",
"from_code"=>"94115",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"return_code": "8",
"notify": [
{
"type": "RETURN",
"email": "bob@email.com",
"undeliverable_email": "foo@bar.com",
"from_email": "blah@email.com",
"from_name": "John Doe"
}
],
"packages": [
{
"weight": 4
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "GIF",
"from_company": "RocketShipIt",
"from_name": "Mark Sanborn",
"from_addr1": "940 Presidio Ave",
"from_addr2": "#103",
"from_city": "San Francisco",
"from_state": "CA",
"from_code": "94115",
"test": true
}
}
)
UPS-REST - Label SurePost
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT_NUMBER",
"packages": [
{
"weight": 4,
"length": 7
}
],
"service": "93",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "GIF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
),
),
'service' => '93',
'shipper' => '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_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'GIF',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS-REST',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'image_type': 'GIF',
'key': 'your-key-from-authenticate-request',
'packages': [{'length': 7, 'weight': 4}],
'service': '93',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'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'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"packages"=>[{"weight"=>4, "length"=>7}],
"service"=>"93",
"shipper"=>"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_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"GIF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT_NUMBER",
"packages": [
{
"weight": 4,
"length": 7
}
],
"service": "93",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "GIF",
"test": true
}
}
)
UPS-REST - Label Third Party Billing
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT_NUMBER",
"billing": [
{
"type": "transportation",
"payment_type": "third_party",
"account": "abc123",
"postal_code": "94608",
"country_code": "US"
}
],
"packages": [
{
"weight": 4,
"length": 7
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "GIF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'billing' =>
array (
0 =>
array (
'type' => 'transportation',
'payment_type' => 'third_party',
'account' => 'abc123',
'postal_code' => '94608',
'country_code' => 'US',
),
),
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
),
),
'service' => '03',
'shipper' => '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_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'GIF',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS-REST',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'billing': [{'account': 'abc123',
'country_code': 'US',
'payment_type': 'third_party',
'postal_code': '94608',
'type': 'transportation'}],
'image_type': 'GIF',
'key': 'your-key-from-authenticate-request',
'packages': [{'length': 7, 'weight': 4}],
'service': '03',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'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'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"billing"=>
[{"type"=>"transportation",
"payment_type"=>"third_party",
"account"=>"abc123",
"postal_code"=>"94608",
"country_code"=>"US"}],
"packages"=>[{"weight"=>4, "length"=>7}],
"service"=>"03",
"shipper"=>"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_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"GIF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT_NUMBER",
"billing": [
{
"type": "transportation",
"payment_type": "third_party",
"account": "abc123",
"postal_code": "94608",
"country_code": "US"
}
],
"packages": [
{
"weight": 4,
"length": 7
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "GIF",
"test": true
}
}
)
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT_NUMBER",
"discount": {
"code": "adsf",
"alias": "1231"
},
"packages": [
{
"weight": 4,
"length": 7,
"width": 5,
"height": 5
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PNG",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'discount' =>
array (
'code' => 'adsf',
'alias' => '1231',
),
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'width' => 5,
'height' => 5,
),
),
'service' => '03',
'shipper' => '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_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'PNG',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS-REST',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'discount': {'alias': '1231', 'code': 'adsf'},
'image_type': 'PNG',
'key': 'your-key-from-authenticate-request',
'packages': [{'height': 5, 'length': 7, 'weight': 4, 'width': 5}],
'service': '03',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'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'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"discount"=>{"code"=>"adsf", "alias"=>"1231"},
"packages"=>[{"weight"=>4, "length"=>7, "width"=>5, "height"=>5}],
"service"=>"03",
"shipper"=>"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_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"PNG",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT_NUMBER",
"discount": {
"code": "adsf",
"alias": "1231"
},
"packages": [
{
"weight": 4,
"length": 7,
"width": 5,
"height": 5
}
],
"service": "03",
"shipper": "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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PNG",
"test": true
}
}
)
UPS-REST - Label w/ Access Point
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT_NUMBER",
"to_email": "customer@email.com",
"packages": [
{
"weight": 4,
"length": 7
}
],
"service": "03",
"shipper": "Acme Inc",
"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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"alt_name": "G&R MARKET DELI",
"alt_addr1": "2601 Sutter St",
"alt_state": "CA",
"alt_city": "San Francisco",
"alt_code": "94115",
"alt_country": "US",
"image_type": "GIF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'to_email' => 'customer@email.com',
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
),
),
'service' => '03',
'shipper' => 'Acme Inc',
'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_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'alt_name' => 'G&R MARKET DELI',
'alt_addr1' => '2601 Sutter St',
'alt_state' => 'CA',
'alt_city' => 'San Francisco',
'alt_code' => '94115',
'alt_country' => 'US',
'image_type' => 'GIF',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS-REST',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'alt_addr1': '2601 Sutter St',
'alt_city': 'San Francisco',
'alt_code': '94115',
'alt_country': 'US',
'alt_name': 'G&R MARKET DELI',
'alt_state': 'CA',
'image_type': 'GIF',
'key': 'your-key-from-authenticate-request',
'packages': [{'length': 7, 'weight': 4}],
'service': '03',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'Acme Inc',
'test': True,
'to_addr1': '940 Presidio Ave',
'to_addr2': '#103',
'to_city': 'San Francisco',
'to_code': '94115',
'to_country': 'US',
'to_email': 'customer@email.com',
'to_name': 'John Doe',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"to_email"=>"customer@email.com",
"packages"=>[{"weight"=>4, "length"=>7}],
"service"=>"03",
"shipper"=>"Acme Inc",
"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_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"alt_name"=>"G&R MARKET DELI",
"alt_addr1"=>"2601 Sutter St",
"alt_state"=>"CA",
"alt_city"=>"San Francisco",
"alt_code"=>"94115",
"alt_country"=>"US",
"image_type"=>"GIF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT_NUMBER",
"to_email": "customer@email.com",
"packages": [
{
"weight": 4,
"length": 7
}
],
"service": "03",
"shipper": "Acme Inc",
"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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"alt_name": "G&R MARKET DELI",
"alt_addr1": "2601 Sutter St",
"alt_state": "CA",
"alt_city": "San Francisco",
"alt_code": "94115",
"alt_country": "US",
"image_type": "GIF",
"test": true
}
}
)
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"test": true,
"account_number": "YOUR_ACCOUNT",
"customs_forms": "01",
"currency": "CAD",
"invoice_date": "20160910",
"reason_for_export": "SALE",
"invoice_line_total": 100,
"documents_only": true,
"packages": [
{
"weight": 1,
"reference_code": "TN",
"reference_value": "12345678"
}
],
"customs": [
{
"invoice_line_number": "1",
"invoice_line_part_number": "123",
"invoice_line_description": "My Description",
"invoice_line_value": "1",
"invoice_line_origin_country_code": "CA",
"customs_quantity_units": "EA"
}
],
"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": "14",
"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": "01",
"pickup_type": "02",
"weight_unit": "LBS",
"length_unit": "IN"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'test' => true,
'account_number' => 'YOUR_ACCOUNT',
'customs_forms' => '01',
'currency' => 'CAD',
'invoice_date' => '20160910',
'reason_for_export' => 'SALE',
'invoice_line_total' => 100,
'documents_only' => true,
'packages' =>
array (
0 =>
array (
'weight' => 1,
'reference_code' => 'TN',
'reference_value' => '12345678',
),
),
'customs' =>
array (
0 =>
array (
'invoice_line_number' => '1',
'invoice_line_part_number' => '123',
'invoice_line_description' => 'My Description',
'invoice_line_value' => '1',
'invoice_line_origin_country_code' => 'CA',
'customs_quantity_units' => 'EA',
),
),
'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' => '14',
'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' => '01',
'pickup_type' => '02',
'weight_unit' => 'LBS',
'length_unit' => 'IN',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS-REST',
'params': {'account_number': 'YOUR_ACCOUNT',
'currency': 'CAD',
'customs': [{'customs_quantity_units': 'EA',
'invoice_line_description': 'My Description',
'invoice_line_number': '1',
'invoice_line_origin_country_code': 'CA',
'invoice_line_part_number': '123',
'invoice_line_value': '1'}],
'customs_forms': '01',
'documents_only': True,
'image_type': 'PNG',
'invoice_date': '20160910',
'invoice_line_total': 100,
'key': 'your-key-from-authenticate-request',
'length_unit': 'IN',
'packages': [{'reference_code': 'TN',
'reference_value': '12345678',
'weight': 1}],
'packaging_type': '01',
'pickup_type': '02',
'reason_for_export': 'SALE',
'service': '14',
'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': 'LBS'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"test"=>true,
"account_number"=>"YOUR_ACCOUNT",
"customs_forms"=>"01",
"currency"=>"CAD",
"invoice_date"=>"20160910",
"reason_for_export"=>"SALE",
"invoice_line_total"=>100,
"documents_only"=>true,
"packages"=>
[{"weight"=>1, "reference_code"=>"TN", "reference_value"=>"12345678"}],
"customs"=>
[{"invoice_line_number"=>"1",
"invoice_line_part_number"=>"123",
"invoice_line_description"=>"My Description",
"invoice_line_value"=>"1",
"invoice_line_origin_country_code"=>"CA",
"customs_quantity_units"=>"EA"}],
"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"=>"14",
"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"=>"01",
"pickup_type"=>"02",
"weight_unit"=>"LBS",
"length_unit"=>"IN"}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"test": true,
"account_number": "YOUR_ACCOUNT",
"customs_forms": "01",
"currency": "CAD",
"invoice_date": "20160910",
"reason_for_export": "SALE",
"invoice_line_total": 100,
"documents_only": true,
"packages": [
{
"weight": 1,
"reference_code": "TN",
"reference_value": "12345678"
}
],
"customs": [
{
"invoice_line_number": "1",
"invoice_line_part_number": "123",
"invoice_line_description": "My Description",
"invoice_line_value": "1",
"invoice_line_origin_country_code": "CA",
"customs_quantity_units": "EA"
}
],
"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": "14",
"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": "01",
"pickup_type": "02",
"weight_unit": "LBS",
"length_unit": "IN"
}
}
)
UPS-REST - Locator
{
"carrier": "UPS-REST",
"action": "FindLocations",
"params": {
"key": "your-key-from-authenticate-request",
"request_option": "64",
"ship_city": "Atlanta",
"ship_state": "GA",
"ship_code": "85281",
"ship_code_extended": "4510",
"ship_country": "US",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'FindLocations',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'request_option' => '64',
'ship_city' => 'Atlanta',
'ship_state' => 'GA',
'ship_code' => '85281',
'ship_code_extended' => '4510',
'ship_country' => 'US',
'test' => true,
),
)
);
rs.request(
{'action': 'FindLocations',
'carrier': 'UPS-REST',
'params': {'key': 'your-key-from-authenticate-request',
'request_option': '64',
'ship_city': 'Atlanta',
'ship_code': '85281',
'ship_code_extended': '4510',
'ship_country': 'US',
'ship_state': 'GA',
'test': True}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"FindLocations",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"request_option"=>"64",
"ship_city"=>"Atlanta",
"ship_state"=>"GA",
"ship_code"=>"85281",
"ship_code_extended"=>"4510",
"ship_country"=>"US",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "FindLocations",
"params": {
"key": "your-key-from-authenticate-request",
"request_option": "64",
"ship_city": "Atlanta",
"ship_state": "GA",
"ship_code": "85281",
"ship_code_extended": "4510",
"ship_country": "US",
"test": true
}
}
)
UPS-REST - Pickup Cancel
{
"carrier": "UPS-REST",
"action": "CancelPickup",
"params": {
"key": "your-key-from-authenticate-request",
"pickup_id": "2929AONCALL",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'CancelPickup',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'pickup_id' => '2929AONCALL',
'test' => true,
),
)
);
rs.request(
{'action': 'CancelPickup',
'carrier': 'UPS-REST',
'params': {'key': 'your-key-from-authenticate-request',
'pickup_id': '2929AONCALL',
'test': True}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"CancelPickup",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"pickup_id"=>"2929AONCALL",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "CancelPickup",
"params": {
"key": "your-key-from-authenticate-request",
"pickup_id": "2929AONCALL",
"test": true
}
}
)
UPS-REST - Pickup Rate
{
"carrier": "UPS-REST",
"action": "PickupRate",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"pickup_addr1": "940 Presidio Ave",
"pickup_city": "San Francisco",
"pickup_state": "CA",
"pickup_code": "94115",
"pickup_country": "US",
"to_name": "John Doe",
"to_addr1": "2920 Zoo Drive",
"to_state": "CA",
"to_city": "San Diego",
"to_code": "92112",
"to_country": "US"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'PickupRate',
'params' =>
array (
'test' => true,
'key' => 'your-key-from-authenticate-request',
'pickup_addr1' => '940 Presidio Ave',
'pickup_city' => 'San Francisco',
'pickup_state' => 'CA',
'pickup_code' => '94115',
'pickup_country' => 'US',
'to_name' => 'John Doe',
'to_addr1' => '2920 Zoo Drive',
'to_state' => 'CA',
'to_city' => 'San Diego',
'to_code' => '92112',
'to_country' => 'US',
),
)
);
rs.request(
{'action': 'PickupRate',
'carrier': 'UPS-REST',
'params': {'key': 'your-key-from-authenticate-request',
'pickup_addr1': '940 Presidio Ave',
'pickup_city': 'San Francisco',
'pickup_code': '94115',
'pickup_country': 'US',
'pickup_state': 'CA',
'test': True,
'to_addr1': '2920 Zoo Drive',
'to_city': 'San Diego',
'to_code': '92112',
'to_country': 'US',
'to_name': 'John Doe',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"PickupRate",
"params"=>
{"test"=>true,
"key"=>"your-key-from-authenticate-request",
"pickup_addr1"=>"940 Presidio Ave",
"pickup_city"=>"San Francisco",
"pickup_state"=>"CA",
"pickup_code"=>"94115",
"pickup_country"=>"US",
"to_name"=>"John Doe",
"to_addr1"=>"2920 Zoo Drive",
"to_state"=>"CA",
"to_city"=>"San Diego",
"to_code"=>"92112",
"to_country"=>"US"}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "PickupRate",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"pickup_addr1": "940 Presidio Ave",
"pickup_city": "San Francisco",
"pickup_state": "CA",
"pickup_code": "94115",
"pickup_country": "US",
"to_name": "John Doe",
"to_addr1": "2920 Zoo Drive",
"to_state": "CA",
"to_city": "San Diego",
"to_code": "92112",
"to_country": "US"
}
}
)
UPS-REST - Pickup Schedule
{
"carrier": "UPS-REST",
"action": "CreatePickup",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"pickup_company_name": "Acme Inc",
"pickup_contact_name": "Mark Sanborn",
"pickup_addr1": "940 Presidio Ave",
"pickup_city": "San Francisco",
"pickup_state": "CA",
"pickup_code": "94115",
"pickup_room": "A",
"pickup_floor": "2",
"pickup_country": "US",
"pickup_phone": "123-123-1234",
"pickup_service_code": "002",
"pickup_container_code": "01",
"pickup_quantity": 1,
"pickup_destination": "US",
"payment_method": "00",
"special_instructions": "the gate code is 12345",
"to_name": "John Doe",
"to_addr1": "2920 Zoo Drive",
"to_state": "CA",
"to_city": "San Diego",
"to_code": "92112",
"to_country": "US",
"to_email": "ups@test.com",
"pickup_date": "20160112",
"close_time": "0900",
"ready_time": "0800"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'CreatePickup',
'params' =>
array (
'test' => true,
'key' => 'your-key-from-authenticate-request',
'pickup_company_name' => 'Acme Inc',
'pickup_contact_name' => 'Mark Sanborn',
'pickup_addr1' => '940 Presidio Ave',
'pickup_city' => 'San Francisco',
'pickup_state' => 'CA',
'pickup_code' => '94115',
'pickup_room' => 'A',
'pickup_floor' => '2',
'pickup_country' => 'US',
'pickup_phone' => '123-123-1234',
'pickup_service_code' => '002',
'pickup_container_code' => '01',
'pickup_quantity' => 1,
'pickup_destination' => 'US',
'payment_method' => '00',
'special_instructions' => 'the gate code is 12345',
'to_name' => 'John Doe',
'to_addr1' => '2920 Zoo Drive',
'to_state' => 'CA',
'to_city' => 'San Diego',
'to_code' => '92112',
'to_country' => 'US',
'to_email' => 'ups@test.com',
'pickup_date' => '20160112',
'close_time' => '0900',
'ready_time' => '0800',
),
)
);
rs.request(
{'action': 'CreatePickup',
'carrier': 'UPS-REST',
'params': {'close_time': '0900',
'key': 'your-key-from-authenticate-request',
'payment_method': '00',
'pickup_addr1': '940 Presidio Ave',
'pickup_city': 'San Francisco',
'pickup_code': '94115',
'pickup_company_name': 'Acme Inc',
'pickup_contact_name': 'Mark Sanborn',
'pickup_container_code': '01',
'pickup_country': 'US',
'pickup_date': '20160112',
'pickup_destination': 'US',
'pickup_floor': '2',
'pickup_phone': '123-123-1234',
'pickup_quantity': 1,
'pickup_room': 'A',
'pickup_service_code': '002',
'pickup_state': 'CA',
'ready_time': '0800',
'special_instructions': 'the gate code is 12345',
'test': True,
'to_addr1': '2920 Zoo Drive',
'to_city': 'San Diego',
'to_code': '92112',
'to_country': 'US',
'to_email': 'ups@test.com',
'to_name': 'John Doe',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"CreatePickup",
"params"=>
{"test"=>true,
"key"=>"your-key-from-authenticate-request",
"pickup_company_name"=>"Acme Inc",
"pickup_contact_name"=>"Mark Sanborn",
"pickup_addr1"=>"940 Presidio Ave",
"pickup_city"=>"San Francisco",
"pickup_state"=>"CA",
"pickup_code"=>"94115",
"pickup_room"=>"A",
"pickup_floor"=>"2",
"pickup_country"=>"US",
"pickup_phone"=>"123-123-1234",
"pickup_service_code"=>"002",
"pickup_container_code"=>"01",
"pickup_quantity"=>1,
"pickup_destination"=>"US",
"payment_method"=>"00",
"special_instructions"=>"the gate code is 12345",
"to_name"=>"John Doe",
"to_addr1"=>"2920 Zoo Drive",
"to_state"=>"CA",
"to_city"=>"San Diego",
"to_code"=>"92112",
"to_country"=>"US",
"to_email"=>"ups@test.com",
"pickup_date"=>"20160112",
"close_time"=>"0900",
"ready_time"=>"0800"}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "CreatePickup",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"pickup_company_name": "Acme Inc",
"pickup_contact_name": "Mark Sanborn",
"pickup_addr1": "940 Presidio Ave",
"pickup_city": "San Francisco",
"pickup_state": "CA",
"pickup_code": "94115",
"pickup_room": "A",
"pickup_floor": "2",
"pickup_country": "US",
"pickup_phone": "123-123-1234",
"pickup_service_code": "002",
"pickup_container_code": "01",
"pickup_quantity": 1,
"pickup_destination": "US",
"payment_method": "00",
"special_instructions": "the gate code is 12345",
"to_name": "John Doe",
"to_addr1": "2920 Zoo Drive",
"to_state": "CA",
"to_city": "San Diego",
"to_code": "92112",
"to_country": "US",
"to_email": "ups@test.com",
"pickup_date": "20160112",
"close_time": "0900",
"ready_time": "0800"
}
}
)
UPS-REST - Pickup Status
{
"carrier": "UPS-REST",
"action": "PickupStatus",
"params": {
"test": true,
"key": "your-key-from-authenticate-request"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'PickupStatus',
'params' =>
array (
'test' => true,
'key' => 'your-key-from-authenticate-request',
),
)
);
rs.request(
{'action': 'PickupStatus',
'carrier': 'UPS-REST',
'params': {'key': 'your-key-from-authenticate-request', 'test': True}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"PickupStatus",
"params"=>{"test"=>true, "key"=>"your-key-from-authenticate-request"}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "PickupStatus",
"params": {
"test": true,
"key": "your-key-from-authenticate-request"
}
}
)
UPS-REST - Pickup Status Oncall
{
"carrier": "UPS-REST",
"action": "PickupStatus",
"params": {
"pickup_type": "oncall",
"test": true,
"key": "your-key-from-authenticate-request"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'PickupStatus',
'params' =>
array (
'pickup_type' => 'oncall',
'test' => true,
'key' => 'your-key-from-authenticate-request',
),
)
);
rs.request(
{'action': 'PickupStatus',
'carrier': 'UPS-REST',
'params': {'key': 'your-key-from-authenticate-request',
'pickup_type': 'oncall',
'test': True}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"PickupStatus",
"params"=>
{"pickup_type"=>"oncall",
"test"=>true,
"key"=>"your-key-from-authenticate-request"}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "PickupStatus",
"params": {
"pickup_type": "oncall",
"test": true,
"key": "your-key-from-authenticate-request"
}
}
)
UPS-REST - Rates
{
"carrier": "UPS-REST",
"action": "GetAllRates",
"params": {
"test": true,
"account_number": "your-account-number",
"key": "your-key-from-authenticate-request",
"packages": [
{
"weight": 2
},
{
"weight": 2
}
],
"shipper": "My Company",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_state": "CA",
"to_code": "90210",
"weight_unit": "LBS",
"packaging_type": "02",
"negotiated_rates": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'GetAllRates',
'params' =>
array (
'test' => true,
'account_number' => 'your-account-number',
'key' => 'your-key-from-authenticate-request',
'packages' =>
array (
0 =>
array (
'weight' => 2,
),
1 =>
array (
'weight' => 2,
),
),
'shipper' => 'My Company',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_country' => 'US',
'to_state' => 'CA',
'to_code' => '90210',
'weight_unit' => 'LBS',
'packaging_type' => '02',
'negotiated_rates' => true,
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'UPS-REST',
'params': {'account_number': 'your-account-number',
'key': 'your-key-from-authenticate-request',
'negotiated_rates': True,
'packages': [{'weight': 2}, {'weight': 2}],
'packaging_type': '02',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'My Company',
'test': True,
'to_code': '90210',
'to_country': 'US',
'to_state': 'CA',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"GetAllRates",
"params"=>
{"test"=>true,
"account_number"=>"your-account-number",
"key"=>"your-key-from-authenticate-request",
"packages"=>[{"weight"=>2}, {"weight"=>2}],
"shipper"=>"My Company",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_country"=>"US",
"to_state"=>"CA",
"to_code"=>"90210",
"weight_unit"=>"LBS",
"packaging_type"=>"02",
"negotiated_rates"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "GetAllRates",
"params": {
"test": true,
"account_number": "your-account-number",
"key": "your-key-from-authenticate-request",
"packages": [
{
"weight": 2
},
{
"weight": 2
}
],
"shipper": "My Company",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_state": "CA",
"to_code": "90210",
"weight_unit": "LBS",
"packaging_type": "02",
"negotiated_rates": true
}
}
)
UPS-REST - Rates Additional Handling
{
"carrier": "UPS-REST",
"action": "GetAllRates",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5,
"additional_handling": true
}
],
"residential": true,
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_code": "90210",
"weight_unit": "LBS",
"pickup_type": "01",
"customer_classification": "01",
"length_unit": "IN",
"packaging_type": "02"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'GetAllRates',
'params' =>
array (
'test' => true,
'key' => 'your-key-from-authenticate-request',
'account_number' => 'YOUR_ACCOUNT',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 5,
'width' => 5,
'height' => 5,
'additional_handling' => true,
),
),
'residential' => true,
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_country' => 'US',
'to_code' => '90210',
'weight_unit' => 'LBS',
'pickup_type' => '01',
'customer_classification' => '01',
'length_unit' => 'IN',
'packaging_type' => '02',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'UPS-REST',
'params': {'account_number': 'YOUR_ACCOUNT',
'customer_classification': '01',
'customs': [],
'key': 'your-key-from-authenticate-request',
'length_unit': 'IN',
'packages': [{'additional_handling': True,
'height': 5,
'length': 5,
'weight': 5,
'width': 5}],
'packaging_type': '02',
'pickup_type': '01',
'residential': True,
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_code': '90210',
'to_country': 'US',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"GetAllRates",
"params"=>
{"test"=>true,
"key"=>"your-key-from-authenticate-request",
"account_number"=>"YOUR_ACCOUNT",
"packages"=>
[{"weight"=>5,
"length"=>5,
"width"=>5,
"height"=>5,
"additional_handling"=>true}],
"residential"=>true,
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_country"=>"US",
"to_code"=>"90210",
"weight_unit"=>"LBS",
"pickup_type"=>"01",
"customer_classification"=>"01",
"length_unit"=>"IN",
"packaging_type"=>"02"}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "GetAllRates",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5,
"additional_handling": true
}
],
"residential": true,
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_code": "90210",
"weight_unit": "LBS",
"pickup_type": "01",
"customer_classification": "01",
"length_unit": "IN",
"packaging_type": "02"
}
}
)
UPS-REST - Rates COD
{
"carrier": "UPS-REST",
"action": "GetAllRates",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"currency": "USD",
"packages": [
{
"weight": 2
},
{
"weight": 2,
"cod_amount": 10.00,
"cod_fund_type": "0"
}
],
"shipper": "My Company",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_state": "CA",
"to_code": "90210",
"weight_unit": "LBS",
"packaging_type": "02",
"negotiated_rates": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'GetAllRates',
'params' =>
array (
'test' => true,
'key' => 'your-key-from-authenticate-request',
'currency' => 'USD',
'packages' =>
array (
0 =>
array (
'weight' => 2,
),
1 =>
array (
'weight' => 2,
'cod_amount' => 10.0,
'cod_fund_type' => '0',
),
),
'shipper' => 'My Company',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_country' => 'US',
'to_state' => 'CA',
'to_code' => '90210',
'weight_unit' => 'LBS',
'packaging_type' => '02',
'negotiated_rates' => true,
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'UPS-REST',
'params': {'currency': 'USD',
'key': 'your-key-from-authenticate-request',
'negotiated_rates': True,
'packages': [{'weight': 2},
{'cod_amount': 10.0,
'cod_fund_type': '0',
'weight': 2}],
'packaging_type': '02',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'My Company',
'test': True,
'to_code': '90210',
'to_country': 'US',
'to_state': 'CA',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"GetAllRates",
"params"=>
{"test"=>true,
"key"=>"your-key-from-authenticate-request",
"currency"=>"USD",
"packages"=>
[{"weight"=>2}, {"weight"=>2, "cod_amount"=>10.0, "cod_fund_type"=>"0"}],
"shipper"=>"My Company",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_country"=>"US",
"to_state"=>"CA",
"to_code"=>"90210",
"weight_unit"=>"LBS",
"packaging_type"=>"02",
"negotiated_rates"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "GetAllRates",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"currency": "USD",
"packages": [
{
"weight": 2
},
{
"weight": 2,
"cod_amount": 10.00,
"cod_fund_type": "0"
}
],
"shipper": "My Company",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_state": "CA",
"to_code": "90210",
"weight_unit": "LBS",
"packaging_type": "02",
"negotiated_rates": true
}
}
)
UPS-REST - Rates Daily
{
"carrier": "UPS-REST",
"action": "GetAllRates",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_code": "90210",
"weight_unit": "LBS",
"pickup_type": "01",
"customer_classification": "01",
"length_unit": "IN",
"packaging_type": "02"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'GetAllRates',
'params' =>
array (
'test' => true,
'key' => 'your-key-from-authenticate-request',
'account_number' => 'YOUR_ACCOUNT',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 5,
'width' => 5,
'height' => 5,
),
),
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_country' => 'US',
'to_code' => '90210',
'weight_unit' => 'LBS',
'pickup_type' => '01',
'customer_classification' => '01',
'length_unit' => 'IN',
'packaging_type' => '02',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'UPS-REST',
'params': {'account_number': 'YOUR_ACCOUNT',
'customer_classification': '01',
'customs': [],
'key': 'your-key-from-authenticate-request',
'length_unit': 'IN',
'packages': [{'height': 5, 'length': 5, 'weight': 5, 'width': 5}],
'packaging_type': '02',
'pickup_type': '01',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_code': '90210',
'to_country': 'US',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"GetAllRates",
"params"=>
{"test"=>true,
"key"=>"your-key-from-authenticate-request",
"account_number"=>"YOUR_ACCOUNT",
"packages"=>[{"weight"=>5, "length"=>5, "width"=>5, "height"=>5}],
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_country"=>"US",
"to_code"=>"90210",
"weight_unit"=>"LBS",
"pickup_type"=>"01",
"customer_classification"=>"01",
"length_unit"=>"IN",
"packaging_type"=>"02"}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "GetAllRates",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_code": "90210",
"weight_unit": "LBS",
"pickup_type": "01",
"customer_classification": "01",
"length_unit": "IN",
"packaging_type": "02"
}
}
)
UPS-REST - Rates Ground Freight Pricing
{
"carrier": "UPS-REST",
"action": "GetAllRates",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT",
"request_option": "Rate",
"packages": [
{
"weight": 10,
"length": 5,
"width": 5,
"height": 5,
"freight_class": "50"
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_state": "CA",
"to_country": "US",
"to_code": "90210",
"weight_unit": "LBS",
"pickup_type": "01",
"customer_classification": "01",
"length_unit": "IN",
"packaging_type": "02",
"ground_freight": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'GetAllRates',
'params' =>
array (
'test' => true,
'key' => 'your-key-from-authenticate-request',
'account_number' => 'YOUR_ACCOUNT',
'request_option' => 'Rate',
'packages' =>
array (
0 =>
array (
'weight' => 10,
'length' => 5,
'width' => 5,
'height' => 5,
'freight_class' => '50',
),
),
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_state' => 'CA',
'to_country' => 'US',
'to_code' => '90210',
'weight_unit' => 'LBS',
'pickup_type' => '01',
'customer_classification' => '01',
'length_unit' => 'IN',
'packaging_type' => '02',
'ground_freight' => true,
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'UPS-REST',
'params': {'account_number': 'YOUR_ACCOUNT',
'customer_classification': '01',
'customs': [],
'ground_freight': True,
'key': 'your-key-from-authenticate-request',
'length_unit': 'IN',
'packages': [{'freight_class': '50',
'height': 5,
'length': 5,
'weight': 10,
'width': 5}],
'packaging_type': '02',
'pickup_type': '01',
'request_option': 'Rate',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_code': '90210',
'to_country': 'US',
'to_state': 'CA',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"GetAllRates",
"params"=>
{"test"=>true,
"key"=>"your-key-from-authenticate-request",
"account_number"=>"YOUR_ACCOUNT",
"request_option"=>"Rate",
"packages"=>
[{"weight"=>10,
"length"=>5,
"width"=>5,
"height"=>5,
"freight_class"=>"50"}],
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_state"=>"CA",
"to_country"=>"US",
"to_code"=>"90210",
"weight_unit"=>"LBS",
"pickup_type"=>"01",
"customer_classification"=>"01",
"length_unit"=>"IN",
"packaging_type"=>"02",
"ground_freight"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "GetAllRates",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT",
"request_option": "Rate",
"packages": [
{
"weight": 10,
"length": 5,
"width": 5,
"height": 5,
"freight_class": "50"
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_state": "CA",
"to_country": "US",
"to_code": "90210",
"weight_unit": "LBS",
"pickup_type": "01",
"customer_classification": "01",
"length_unit": "IN",
"packaging_type": "02",
"ground_freight": true
}
}
)
UPS-REST - Rates International
{
"carrier": "UPS-REST",
"action": "GetAllRates",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5
}
],
"residential": true,
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "CA",
"to_code": "V0K1G0",
"weight_unit": "LBS",
"pickup_type": "01",
"customer_classification": "01",
"length_unit": "IN",
"packaging_type": "02"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'GetAllRates',
'params' =>
array (
'test' => true,
'key' => 'your-key-from-authenticate-request',
'account_number' => 'YOUR_ACCOUNT',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 5,
'width' => 5,
'height' => 5,
),
),
'residential' => true,
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_country' => 'CA',
'to_code' => 'V0K1G0',
'weight_unit' => 'LBS',
'pickup_type' => '01',
'customer_classification' => '01',
'length_unit' => 'IN',
'packaging_type' => '02',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'UPS-REST',
'params': {'account_number': 'YOUR_ACCOUNT',
'customer_classification': '01',
'customs': [],
'key': 'your-key-from-authenticate-request',
'length_unit': 'IN',
'packages': [{'height': 5, 'length': 5, 'weight': 5, 'width': 5}],
'packaging_type': '02',
'pickup_type': '01',
'residential': True,
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_code': 'V0K1G0',
'to_country': 'CA',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"GetAllRates",
"params"=>
{"test"=>true,
"key"=>"your-key-from-authenticate-request",
"account_number"=>"YOUR_ACCOUNT",
"packages"=>[{"weight"=>5, "length"=>5, "width"=>5, "height"=>5}],
"residential"=>true,
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_country"=>"CA",
"to_code"=>"V0K1G0",
"weight_unit"=>"LBS",
"pickup_type"=>"01",
"customer_classification"=>"01",
"length_unit"=>"IN",
"packaging_type"=>"02"}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "GetAllRates",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5
}
],
"residential": true,
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "CA",
"to_code": "V0K1G0",
"weight_unit": "LBS",
"pickup_type": "01",
"customer_classification": "01",
"length_unit": "IN",
"packaging_type": "02"
}
}
)
UPS-REST - Rates Negotiated
{
"carrier": "UPS-REST",
"action": "GetAllRates",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5,
"insured_currency": "USD",
"insured_value": 700
}
],
"residential": true,
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_state": "CA",
"to_code": "90210",
"weight_unit": "LBS",
"pickup_type": "01",
"customer_classification": "01",
"length_unit": "IN",
"packaging_type": "02",
"negotiated_rates": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'GetAllRates',
'params' =>
array (
'test' => true,
'key' => 'your-key-from-authenticate-request',
'account_number' => 'YOUR_ACCOUNT',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 5,
'width' => 5,
'height' => 5,
'insured_currency' => 'USD',
'insured_value' => 700,
),
),
'residential' => true,
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_country' => 'US',
'to_state' => 'CA',
'to_code' => '90210',
'weight_unit' => 'LBS',
'pickup_type' => '01',
'customer_classification' => '01',
'length_unit' => 'IN',
'packaging_type' => '02',
'negotiated_rates' => true,
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'UPS-REST',
'params': {'account_number': 'YOUR_ACCOUNT',
'customer_classification': '01',
'customs': [],
'key': 'your-key-from-authenticate-request',
'length_unit': 'IN',
'negotiated_rates': True,
'packages': [{'height': 5,
'insured_currency': 'USD',
'insured_value': 700,
'length': 5,
'weight': 5,
'width': 5}],
'packaging_type': '02',
'pickup_type': '01',
'residential': True,
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_code': '90210',
'to_country': 'US',
'to_state': 'CA',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"GetAllRates",
"params"=>
{"test"=>true,
"key"=>"your-key-from-authenticate-request",
"account_number"=>"YOUR_ACCOUNT",
"packages"=>
[{"weight"=>5,
"length"=>5,
"width"=>5,
"height"=>5,
"insured_currency"=>"USD",
"insured_value"=>700}],
"residential"=>true,
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_country"=>"US",
"to_state"=>"CA",
"to_code"=>"90210",
"weight_unit"=>"LBS",
"pickup_type"=>"01",
"customer_classification"=>"01",
"length_unit"=>"IN",
"packaging_type"=>"02",
"negotiated_rates"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "GetAllRates",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5,
"insured_currency": "USD",
"insured_value": 700
}
],
"residential": true,
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_state": "CA",
"to_code": "90210",
"weight_unit": "LBS",
"pickup_type": "01",
"customer_classification": "01",
"length_unit": "IN",
"packaging_type": "02",
"negotiated_rates": true
}
}
)
UPS-REST - Rates Retail
{
"carrier": "UPS-REST",
"action": "GetAllRates",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_code": "90210",
"weight_unit": "LBS",
"pickup_type": "03",
"customer_classification": "00",
"length_unit": "IN",
"packaging_type": "02"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'GetAllRates',
'params' =>
array (
'test' => true,
'key' => 'your-key-from-authenticate-request',
'account_number' => 'YOUR_ACCOUNT',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 5,
'width' => 5,
'height' => 5,
),
),
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_country' => 'US',
'to_code' => '90210',
'weight_unit' => 'LBS',
'pickup_type' => '03',
'customer_classification' => '00',
'length_unit' => 'IN',
'packaging_type' => '02',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'UPS-REST',
'params': {'account_number': 'YOUR_ACCOUNT',
'customer_classification': '00',
'customs': [],
'key': 'your-key-from-authenticate-request',
'length_unit': 'IN',
'packages': [{'height': 5, 'length': 5, 'weight': 5, 'width': 5}],
'packaging_type': '02',
'pickup_type': '03',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_code': '90210',
'to_country': 'US',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"GetAllRates",
"params"=>
{"test"=>true,
"key"=>"your-key-from-authenticate-request",
"account_number"=>"YOUR_ACCOUNT",
"packages"=>[{"weight"=>5, "length"=>5, "width"=>5, "height"=>5}],
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_country"=>"US",
"to_code"=>"90210",
"weight_unit"=>"LBS",
"pickup_type"=>"03",
"customer_classification"=>"00",
"length_unit"=>"IN",
"packaging_type"=>"02"}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "GetAllRates",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_code": "90210",
"weight_unit": "LBS",
"pickup_type": "03",
"customer_classification": "00",
"length_unit": "IN",
"packaging_type": "02"
}
}
)
UPS-REST - Rates Simple Rate
{
"carrier": "UPS-REST",
"action": "GetAllRates",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT",
"request_option": "Shop",
"service": "03",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5,
"sub_packaging_type": "M"
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_state": "CA",
"to_code": "90210",
"weight_unit": "LBS",
"length_unit": "IN",
"packaging_type": "02"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'GetAllRates',
'params' =>
array (
'test' => true,
'key' => 'your-key-from-authenticate-request',
'account_number' => 'YOUR_ACCOUNT',
'request_option' => 'Shop',
'service' => '03',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 5,
'width' => 5,
'height' => 5,
'sub_packaging_type' => 'M',
),
),
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_country' => 'US',
'to_state' => 'CA',
'to_code' => '90210',
'weight_unit' => 'LBS',
'length_unit' => 'IN',
'packaging_type' => '02',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'UPS-REST',
'params': {'account_number': 'YOUR_ACCOUNT',
'customs': [],
'key': 'your-key-from-authenticate-request',
'length_unit': 'IN',
'packages': [{'height': 5,
'length': 5,
'sub_packaging_type': 'M',
'weight': 5,
'width': 5}],
'packaging_type': '02',
'request_option': 'Shop',
'service': '03',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_code': '90210',
'to_country': 'US',
'to_state': 'CA',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"GetAllRates",
"params"=>
{"test"=>true,
"key"=>"your-key-from-authenticate-request",
"account_number"=>"YOUR_ACCOUNT",
"request_option"=>"Shop",
"service"=>"03",
"packages"=>
[{"weight"=>5,
"length"=>5,
"width"=>5,
"height"=>5,
"sub_packaging_type"=>"M"}],
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_country"=>"US",
"to_state"=>"CA",
"to_code"=>"90210",
"weight_unit"=>"LBS",
"length_unit"=>"IN",
"packaging_type"=>"02"}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "GetAllRates",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT",
"request_option": "Shop",
"service": "03",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5,
"sub_packaging_type": "M"
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_state": "CA",
"to_code": "90210",
"weight_unit": "LBS",
"length_unit": "IN",
"packaging_type": "02"
}
}
)
UPS-REST - Rates Single
{
"carrier": "USPS-REST",
"action": "GetAllRates",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"account_number": "1000005549",
"service": "USPS_GROUND_ADVANTAGE",
"price_type": "CONTRACT",
"packages": [
{
"weight": 0.75
}
],
"ship_code": "65556",
"to_code": "90210"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'USPS-REST',
'action' => 'GetAllRates',
'params' =>
array (
'test' => true,
'key' => 'your-key-from-authenticate-request',
'account_number' => '1000005549',
'service' => 'USPS_GROUND_ADVANTAGE',
'price_type' => 'CONTRACT',
'packages' =>
array (
0 =>
array (
'weight' => 0.75,
),
),
'ship_code' => '65556',
'to_code' => '90210',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'USPS-REST',
'params': {'account_number': '1000005549',
'key': 'your-key-from-authenticate-request',
'packages': [{'weight': 0.75}],
'price_type': 'CONTRACT',
'service': 'USPS_GROUND_ADVANTAGE',
'ship_code': '65556',
'test': True,
'to_code': '90210'}}
)
rs.request(
{"carrier"=>"USPS-REST",
"action"=>"GetAllRates",
"params"=>
{"test"=>true,
"key"=>"your-key-from-authenticate-request",
"account_number"=>"1000005549",
"service"=>"USPS_GROUND_ADVANTAGE",
"price_type"=>"CONTRACT",
"packages"=>[{"weight"=>0.75}],
"ship_code"=>"65556",
"to_code"=>"90210"}}
)
rocketshipit.request(
{
"carrier": "USPS-REST",
"action": "GetAllRates",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"account_number": "1000005549",
"service": "USPS_GROUND_ADVANTAGE",
"price_type": "CONTRACT",
"packages": [
{
"weight": 0.75
}
],
"ship_code": "65556",
"to_code": "90210"
}
}
)
UPS-REST - Rates SurePost
{
"carrier": "UPS-REST",
"action": "GetAllRates",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT",
"service": "92",
"request_option": "Rate",
"weight_unit": "OZS",
"packaging_type": "02",
"packages": [
{
"weight": 0.6,
"length": 9,
"width": 6,
"height": 1
}
],
"shipper": "Acme Inc",
"ship_addr1": "123 Main St.",
"ship_city": "Vancouver",
"ship_state": "WA",
"ship_code": "98685",
"ship_country": "US",
"to_code": "06333",
"to_state": "CT",
"to_country": "US",
"residential": true,
"negotiated_rates": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'GetAllRates',
'params' =>
array (
'test' => true,
'key' => 'your-key-from-authenticate-request',
'account_number' => 'YOUR_ACCOUNT',
'service' => '92',
'request_option' => 'Rate',
'weight_unit' => 'OZS',
'packaging_type' => '02',
'packages' =>
array (
0 =>
array (
'weight' => 0.6,
'length' => 9,
'width' => 6,
'height' => 1,
),
),
'shipper' => 'Acme Inc',
'ship_addr1' => '123 Main St.',
'ship_city' => 'Vancouver',
'ship_state' => 'WA',
'ship_code' => '98685',
'ship_country' => 'US',
'to_code' => '06333',
'to_state' => 'CT',
'to_country' => 'US',
'residential' => true,
'negotiated_rates' => true,
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'UPS-REST',
'params': {'account_number': 'YOUR_ACCOUNT',
'key': 'your-key-from-authenticate-request',
'negotiated_rates': True,
'packages': [{'height': 1, 'length': 9, 'weight': 0.6, 'width': 6}],
'packaging_type': '02',
'request_option': 'Rate',
'residential': True,
'service': '92',
'ship_addr1': '123 Main St.',
'ship_city': 'Vancouver',
'ship_code': '98685',
'ship_country': 'US',
'ship_state': 'WA',
'shipper': 'Acme Inc',
'test': True,
'to_code': '06333',
'to_country': 'US',
'to_state': 'CT',
'weight_unit': 'OZS'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"GetAllRates",
"params"=>
{"test"=>true,
"key"=>"your-key-from-authenticate-request",
"account_number"=>"YOUR_ACCOUNT",
"service"=>"92",
"request_option"=>"Rate",
"weight_unit"=>"OZS",
"packaging_type"=>"02",
"packages"=>[{"weight"=>0.6, "length"=>9, "width"=>6, "height"=>1}],
"shipper"=>"Acme Inc",
"ship_addr1"=>"123 Main St.",
"ship_city"=>"Vancouver",
"ship_state"=>"WA",
"ship_code"=>"98685",
"ship_country"=>"US",
"to_code"=>"06333",
"to_state"=>"CT",
"to_country"=>"US",
"residential"=>true,
"negotiated_rates"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "GetAllRates",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT",
"service": "92",
"request_option": "Rate",
"weight_unit": "OZS",
"packaging_type": "02",
"packages": [
{
"weight": 0.6,
"length": 9,
"width": 6,
"height": 1
}
],
"shipper": "Acme Inc",
"ship_addr1": "123 Main St.",
"ship_city": "Vancouver",
"ship_state": "WA",
"ship_code": "98685",
"ship_country": "US",
"to_code": "06333",
"to_state": "CT",
"to_country": "US",
"residential": true,
"negotiated_rates": true
}
}
)
UPS-REST - Rates with Return Service
{
"carrier": "UPS-REST",
"action": "GetAllRates",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"return_code": "3",
"packages": [
{
"weight": 2
},
{
"weight": 2
}
],
"shipper": "My Company",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_state": "CA",
"to_code": "90210",
"weight_unit": "LBS",
"packaging_type": "02",
"negotiated_rates": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'GetAllRates',
'params' =>
array (
'test' => true,
'key' => 'your-key-from-authenticate-request',
'return_code' => '3',
'packages' =>
array (
0 =>
array (
'weight' => 2,
),
1 =>
array (
'weight' => 2,
),
),
'shipper' => 'My Company',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_country' => 'US',
'to_state' => 'CA',
'to_code' => '90210',
'weight_unit' => 'LBS',
'packaging_type' => '02',
'negotiated_rates' => true,
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'UPS-REST',
'params': {'key': 'your-key-from-authenticate-request',
'negotiated_rates': True,
'packages': [{'weight': 2}, {'weight': 2}],
'packaging_type': '02',
'return_code': '3',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'My Company',
'test': True,
'to_code': '90210',
'to_country': 'US',
'to_state': 'CA',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"GetAllRates",
"params"=>
{"test"=>true,
"key"=>"your-key-from-authenticate-request",
"return_code"=>"3",
"packages"=>[{"weight"=>2}, {"weight"=>2}],
"shipper"=>"My Company",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_country"=>"US",
"to_state"=>"CA",
"to_code"=>"90210",
"weight_unit"=>"LBS",
"packaging_type"=>"02",
"negotiated_rates"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "GetAllRates",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"return_code": "3",
"packages": [
{
"weight": 2
},
{
"weight": 2
}
],
"shipper": "My Company",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_state": "CA",
"to_code": "90210",
"weight_unit": "LBS",
"packaging_type": "02",
"negotiated_rates": true
}
}
)
UPS-REST - Rating w/ Access Point
{
"carrier": "UPS-REST",
"action": "GetAllRates",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT",
"alt_name": "G&R MARKET DELI",
"alt_addr1": "2601 Sutter St",
"alt_state": "CA",
"alt_city": "San Francisco",
"alt_code": "94115",
"alt_country": "US",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_code": "90210",
"weight_unit": "LBS",
"pickup_type": "01",
"customer_classification": "01",
"length_unit": "IN",
"packaging_type": "02"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'GetAllRates',
'params' =>
array (
'test' => true,
'key' => 'your-key-from-authenticate-request',
'account_number' => 'YOUR_ACCOUNT',
'alt_name' => 'G&R MARKET DELI',
'alt_addr1' => '2601 Sutter St',
'alt_state' => 'CA',
'alt_city' => 'San Francisco',
'alt_code' => '94115',
'alt_country' => 'US',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 5,
'width' => 5,
'height' => 5,
),
),
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_country' => 'US',
'to_code' => '90210',
'weight_unit' => 'LBS',
'pickup_type' => '01',
'customer_classification' => '01',
'length_unit' => 'IN',
'packaging_type' => '02',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'UPS-REST',
'params': {'account_number': 'YOUR_ACCOUNT',
'alt_addr1': '2601 Sutter St',
'alt_city': 'San Francisco',
'alt_code': '94115',
'alt_country': 'US',
'alt_name': 'G&R MARKET DELI',
'alt_state': 'CA',
'customer_classification': '01',
'customs': [],
'key': 'your-key-from-authenticate-request',
'length_unit': 'IN',
'packages': [{'height': 5, 'length': 5, 'weight': 5, 'width': 5}],
'packaging_type': '02',
'pickup_type': '01',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_code': '90210',
'to_country': 'US',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"GetAllRates",
"params"=>
{"test"=>true,
"key"=>"your-key-from-authenticate-request",
"account_number"=>"YOUR_ACCOUNT",
"alt_name"=>"G&R MARKET DELI",
"alt_addr1"=>"2601 Sutter St",
"alt_state"=>"CA",
"alt_city"=>"San Francisco",
"alt_code"=>"94115",
"alt_country"=>"US",
"packages"=>[{"weight"=>5, "length"=>5, "width"=>5, "height"=>5}],
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_country"=>"US",
"to_code"=>"90210",
"weight_unit"=>"LBS",
"pickup_type"=>"01",
"customer_classification"=>"01",
"length_unit"=>"IN",
"packaging_type"=>"02"}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "GetAllRates",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT",
"alt_name": "G&R MARKET DELI",
"alt_addr1": "2601 Sutter St",
"alt_state": "CA",
"alt_city": "San Francisco",
"alt_code": "94115",
"alt_country": "US",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_code": "90210",
"weight_unit": "LBS",
"pickup_type": "01",
"customer_classification": "01",
"length_unit": "IN",
"packaging_type": "02"
}
}
)
UPS-REST - Time in Transit
{
"carrier": "UPS-REST",
"action": "TimeInTransit",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"shipper": "RocketShipIt",
"ship_contact": "Mark Sanborn",
"ship_phone": "1231231234",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_code": "90210"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'TimeInTransit',
'params' =>
array (
'test' => true,
'key' => 'your-key-from-authenticate-request',
'shipper' => 'RocketShipIt',
'ship_contact' => 'Mark Sanborn',
'ship_phone' => '1231231234',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_country' => 'US',
'to_code' => '90210',
),
)
);
rs.request(
{'action': 'TimeInTransit',
'carrier': 'UPS-REST',
'params': {'key': 'your-key-from-authenticate-request',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_contact': 'Mark Sanborn',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_code': '90210',
'to_country': 'US'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"TimeInTransit",
"params"=>
{"test"=>true,
"key"=>"your-key-from-authenticate-request",
"shipper"=>"RocketShipIt",
"ship_contact"=>"Mark Sanborn",
"ship_phone"=>"1231231234",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_country"=>"US",
"to_code"=>"90210"}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "TimeInTransit",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"shipper": "RocketShipIt",
"ship_contact": "Mark Sanborn",
"ship_phone": "1231231234",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_code": "90210"
}
}
)
UPS-REST - Time in Transit International
{
"carrier": "UPS-REST",
"action": "TimeInTransit",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"ship_city": "Emeryville",
"ship_code": "94608",
"ship_country": "US",
"to_code": "M1B5K7",
"to_country": "CA",
"documents_only": true,
"num_of_packages": 4,
"weight": 5,
"weight_unit": "LBS",
"monetary_value": 20,
"currency": "USD"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'TimeInTransit',
'params' =>
array (
'test' => true,
'key' => 'your-key-from-authenticate-request',
'ship_city' => 'Emeryville',
'ship_code' => '94608',
'ship_country' => 'US',
'to_code' => 'M1B5K7',
'to_country' => 'CA',
'documents_only' => true,
'num_of_packages' => 4,
'weight' => 5,
'weight_unit' => 'LBS',
'monetary_value' => 20,
'currency' => 'USD',
),
)
);
rs.request(
{'action': 'TimeInTransit',
'carrier': 'UPS-REST',
'params': {'currency': 'USD',
'documents_only': True,
'key': 'your-key-from-authenticate-request',
'monetary_value': 20,
'num_of_packages': 4,
'ship_city': 'Emeryville',
'ship_code': '94608',
'ship_country': 'US',
'test': True,
'to_code': 'M1B5K7',
'to_country': 'CA',
'weight': 5,
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"TimeInTransit",
"params"=>
{"test"=>true,
"key"=>"your-key-from-authenticate-request",
"ship_city"=>"Emeryville",
"ship_code"=>"94608",
"ship_country"=>"US",
"to_code"=>"M1B5K7",
"to_country"=>"CA",
"documents_only"=>true,
"num_of_packages"=>4,
"weight"=>5,
"weight_unit"=>"LBS",
"monetary_value"=>20,
"currency"=>"USD"}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "TimeInTransit",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"ship_city": "Emeryville",
"ship_code": "94608",
"ship_country": "US",
"to_code": "M1B5K7",
"to_country": "CA",
"documents_only": true,
"num_of_packages": 4,
"weight": 5,
"weight_unit": "LBS",
"monetary_value": 20,
"currency": "USD"
}
}
)
UPS-REST - Track Alert (webhook)
{
"carrier": "UPS-REST",
"action": "TrackAlert",
"params": {
"key": "your-key-from-authenticate-request",
"url": "https://yourdomain.com/webhook/incoming",
"credential_type": "Bearer",
"credential": "something-secure",
"tracking_number": "1ZCIETST0111111114"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'TrackAlert',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'url' => 'https://yourdomain.com/webhook/incoming',
'credential_type' => 'Bearer',
'credential' => 'something-secure',
'tracking_number' => '1ZCIETST0111111114',
),
)
);
rs.request(
{'action': 'TrackAlert',
'carrier': 'UPS-REST',
'params': {'credential': 'something-secure',
'credential_type': 'Bearer',
'key': 'your-key-from-authenticate-request',
'tracking_number': '1ZCIETST0111111114',
'url': 'https://yourdomain.com/webhook/incoming'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"TrackAlert",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"url"=>"https://yourdomain.com/webhook/incoming",
"credential_type"=>"Bearer",
"credential"=>"something-secure",
"tracking_number"=>"1ZCIETST0111111114"}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "TrackAlert",
"params": {
"key": "your-key-from-authenticate-request",
"url": "https://yourdomain.com/webhook/incoming",
"credential_type": "Bearer",
"credential": "something-secure",
"tracking_number": "1ZCIETST0111111114"
}
}
)
UPS-REST - Track Alert Multiple (webhook)
{
"carrier": "UPS-REST",
"action": "TrackAlert",
"params": {
"key": "your-key-from-authenticate-request",
"url": "https://yourdomain.com/webhook/incoming",
"credential_type": "Bearer",
"credential": "something-secure",
"tracking_numbers": ["1ZCIETST0111111114", "1ZCIETST0422222228"]
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'TrackAlert',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'url' => 'https://yourdomain.com/webhook/incoming',
'credential_type' => 'Bearer',
'credential' => 'something-secure',
'tracking_numbers' =>
array (
0 => '1ZCIETST0111111114',
1 => '1ZCIETST0422222228',
),
),
)
);
rs.request(
{'action': 'TrackAlert',
'carrier': 'UPS-REST',
'params': {'credential': 'something-secure',
'credential_type': 'Bearer',
'key': 'your-key-from-authenticate-request',
'tracking_numbers': ['1ZCIETST0111111114', '1ZCIETST0422222228'],
'url': 'https://yourdomain.com/webhook/incoming'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"TrackAlert",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"url"=>"https://yourdomain.com/webhook/incoming",
"credential_type"=>"Bearer",
"credential"=>"something-secure",
"tracking_numbers"=>["1ZCIETST0111111114", "1ZCIETST0422222228"]}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "TrackAlert",
"params": {
"key": "your-key-from-authenticate-request",
"url": "https://yourdomain.com/webhook/incoming",
"credential_type": "Bearer",
"credential": "something-secure",
"tracking_numbers": ["1ZCIETST0111111114", "1ZCIETST0422222228"]
}
}
)
UPS-REST - Tracking
{
"carrier": "UPS-REST",
"action": "Track",
"params": {
"key": "your-key-from-authenticate-request",
"tracking_number": "1Z12345E0205271688",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'Track',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'tracking_number' => '1Z12345E0205271688',
'test' => true,
),
)
);
rs.request(
{'action': 'Track',
'carrier': 'UPS-REST',
'params': {'key': 'your-key-from-authenticate-request',
'test': True,
'tracking_number': '1Z12345E0205271688'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"Track",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"tracking_number"=>"1Z12345E0205271688",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "Track",
"params": {
"key": "your-key-from-authenticate-request",
"tracking_number": "1Z12345E0205271688",
"test": true
}
}
)
UPS-REST - Tracking Mail Innovations
{
"carrier": "UPS-REST",
"action": "Track",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"tracking_option": "03",
"tracking_number": "9102084383041101186729"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'Track',
'params' =>
array (
'test' => true,
'key' => 'your-key-from-authenticate-request',
'tracking_option' => '03',
'tracking_number' => '9102084383041101186729',
),
)
);
rs.request(
{'action': 'Track',
'carrier': 'UPS-REST',
'params': {'key': 'your-key-from-authenticate-request',
'test': True,
'tracking_number': '9102084383041101186729',
'tracking_option': '03'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"Track",
"params"=>
{"test"=>true,
"key"=>"your-key-from-authenticate-request",
"tracking_option"=>"03",
"tracking_number"=>"9102084383041101186729"}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "Track",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"tracking_option": "03",
"tracking_number": "9102084383041101186729"
}
}
)
UPS-REST - Upload Customs Document
{
"carrier": "UPS-REST",
"action": "UploadDocument",
"params": {
"test": true,
"account_number": "your-account-number",
"key": "your-key-from-authenticate-request",
"filename": "test.txt",
"file_format": "txt",
"document_type": "013",
"file_contents": "Tm90aWNlDQpJbiBhbGwgY29tbXVuaWNhdGlvbnMgd2l0aCBVUFMgY29uY2VybmluZyB0aGlzIGRvY3VtZW50LCBwbGVhc2UgcmVmZXIgdG8gdGhlIGRvY3VtZW50IGRhdGUgbG9jYXRlZCBvbiB0aGUgY292ZXIuDQpDb3B5cmlnaHQNClRoZSB1c2UsIGRpc2Nsb3N1cmUsIHJlcHJvZHVjdGlvbiwgbW9kaWZpY2F0aW9uLCB0cmFuc2Zlciwgb3IgdHJhbnNtaXR0YWwgb2YgdGhpcyB3b3JrIGZvciBhbnkgcHVycG9zZSBpbiBhbnkgZm9ybSBvciBieSBhbnkgbWVhbnMgd2l0aG91dCB0aGUgd3JpdHRlbiBw ZXJtaXNzaW9uIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBpcyBzdHJpY3RseSBwcm9oaWJpdGVk Lg0KwqkgQ29weXJpZ2h0IDIwMTYgVW5pdGVkIFBhcmNlbCBTZXJ2aWNlIG9mIEFtZXJpY2EsIElu Yy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC4NClRyYWRlbWFya3MNClVQUyBPbkxpbmXCriBpcyBhIHJl Z2lzdGVyZWQgdHJhZGVtYXJrIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJ bmMuIEFsbCBvdGhlciB0cmFkZW1hcmtzIGFyZSB0aGUgcHJvcGVydHkgb2YgdGhlaXIgcmVzcGVj dGl2ZSBvd25lcnMuDQpTb21lIG9mIHRoZSBVUFMgY29ycG9yYXRlIGFwcGxpY2F0aW9ucyB1c2Ug VS5TLiBjaXR5LCBzdGF0ZSwgYW5kIHBvc3RhbCBjb2RlIGluZm9ybWF0aW9uIG9idGFpbmVkIGJ5 IFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJbmMuIHVuZGVyIGEgbm9uLWV4Y2x1 c2l2ZSBsaWNlbnNlIGZyb20gdGhlIFVuaXRlZCBTdGF0ZXMgUG9zdGFsIFNlcnZpY2UuIA0K"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'UploadDocument',
'params' =>
array (
'test' => true,
'account_number' => 'your-account-number',
'key' => 'your-key-from-authenticate-request',
'filename' => 'test.txt',
'file_format' => 'txt',
'document_type' => '013',
'file_contents' => 'Tm90aWNlDQpJbiBhbGwgY29tbXVuaWNhdGlvbnMgd2l0aCBVUFMgY29uY2VybmluZyB0aGlzIGRvY3VtZW50LCBwbGVhc2UgcmVmZXIgdG8gdGhlIGRvY3VtZW50IGRhdGUgbG9jYXRlZCBvbiB0aGUgY292ZXIuDQpDb3B5cmlnaHQNClRoZSB1c2UsIGRpc2Nsb3N1cmUsIHJlcHJvZHVjdGlvbiwgbW9kaWZpY2F0aW9uLCB0cmFuc2Zlciwgb3IgdHJhbnNtaXR0YWwgb2YgdGhpcyB3b3JrIGZvciBhbnkgcHVycG9zZSBpbiBhbnkgZm9ybSBvciBieSBhbnkgbWVhbnMgd2l0aG91dCB0aGUgd3JpdHRlbiBw ZXJtaXNzaW9uIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBpcyBzdHJpY3RseSBwcm9oaWJpdGVk Lg0KwqkgQ29weXJpZ2h0IDIwMTYgVW5pdGVkIFBhcmNlbCBTZXJ2aWNlIG9mIEFtZXJpY2EsIElu Yy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC4NClRyYWRlbWFya3MNClVQUyBPbkxpbmXCriBpcyBhIHJl Z2lzdGVyZWQgdHJhZGVtYXJrIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJ bmMuIEFsbCBvdGhlciB0cmFkZW1hcmtzIGFyZSB0aGUgcHJvcGVydHkgb2YgdGhlaXIgcmVzcGVj dGl2ZSBvd25lcnMuDQpTb21lIG9mIHRoZSBVUFMgY29ycG9yYXRlIGFwcGxpY2F0aW9ucyB1c2Ug VS5TLiBjaXR5LCBzdGF0ZSwgYW5kIHBvc3RhbCBjb2RlIGluZm9ybWF0aW9uIG9idGFpbmVkIGJ5 IFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJbmMuIHVuZGVyIGEgbm9uLWV4Y2x1 c2l2ZSBsaWNlbnNlIGZyb20gdGhlIFVuaXRlZCBTdGF0ZXMgUG9zdGFsIFNlcnZpY2UuIA0K',
),
)
);
rs.request(
{'action': 'UploadDocument',
'carrier': 'UPS-REST',
'params': {'account_number': 'your-account-number',
'document_type': '013',
'file_contents': 'Tm90aWNlDQpJbiBhbGwgY29tbXVuaWNhdGlvbnMgd2l0aCBVUFMgY29uY2VybmluZyB0aGlzIGRvY3VtZW50LCBwbGVhc2UgcmVmZXIgdG8gdGhlIGRvY3VtZW50IGRhdGUgbG9jYXRlZCBvbiB0aGUgY292ZXIuDQpDb3B5cmlnaHQNClRoZSB1c2UsIGRpc2Nsb3N1cmUsIHJlcHJvZHVjdGlvbiwgbW9kaWZpY2F0aW9uLCB0cmFuc2Zlciwgb3IgdHJhbnNtaXR0YWwgb2YgdGhpcyB3b3JrIGZvciBhbnkgcHVycG9zZSBpbiBhbnkgZm9ybSBvciBieSBhbnkgbWVhbnMgd2l0aG91dCB0aGUgd3JpdHRlbiBw '
'ZXJtaXNzaW9uIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBpcyBzdHJpY3RseSBwcm9oaWJpdGVk '
'Lg0KwqkgQ29weXJpZ2h0IDIwMTYgVW5pdGVkIFBhcmNlbCBTZXJ2aWNlIG9mIEFtZXJpY2EsIElu '
'Yy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC4NClRyYWRlbWFya3MNClVQUyBPbkxpbmXCriBpcyBhIHJl '
'Z2lzdGVyZWQgdHJhZGVtYXJrIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJ '
'bmMuIEFsbCBvdGhlciB0cmFkZW1hcmtzIGFyZSB0aGUgcHJvcGVydHkgb2YgdGhlaXIgcmVzcGVj '
'dGl2ZSBvd25lcnMuDQpTb21lIG9mIHRoZSBVUFMgY29ycG9yYXRlIGFwcGxpY2F0aW9ucyB1c2Ug '
'VS5TLiBjaXR5LCBzdGF0ZSwgYW5kIHBvc3RhbCBjb2RlIGluZm9ybWF0aW9uIG9idGFpbmVkIGJ5 '
'IFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJbmMuIHVuZGVyIGEgbm9uLWV4Y2x1 '
'c2l2ZSBsaWNlbnNlIGZyb20gdGhlIFVuaXRlZCBTdGF0ZXMgUG9zdGFsIFNlcnZpY2UuIA0K',
'file_format': 'txt',
'filename': 'test.txt',
'key': 'your-key-from-authenticate-request',
'test': True}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"UploadDocument",
"params"=>
{"test"=>true,
"account_number"=>"your-account-number",
"key"=>"your-key-from-authenticate-request",
"filename"=>"test.txt",
"file_format"=>"txt",
"document_type"=>"013",
"file_contents"=>
"Tm90aWNlDQpJbiBhbGwgY29tbXVuaWNhdGlvbnMgd2l0aCBVUFMgY29uY2VybmluZyB0aGlzIGRvY3VtZW50LCBwbGVhc2UgcmVmZXIgdG8gdGhlIGRvY3VtZW50IGRhdGUgbG9jYXRlZCBvbiB0aGUgY292ZXIuDQpDb3B5cmlnaHQNClRoZSB1c2UsIGRpc2Nsb3N1cmUsIHJlcHJvZHVjdGlvbiwgbW9kaWZpY2F0aW9uLCB0cmFuc2Zlciwgb3IgdHJhbnNtaXR0YWwgb2YgdGhpcyB3b3JrIGZvciBhbnkgcHVycG9zZSBpbiBhbnkgZm9ybSBvciBieSBhbnkgbWVhbnMgd2l0aG91dCB0aGUgd3JpdHRlbiBw ZXJtaXNzaW9uIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBpcyBzdHJpY3RseSBwcm9oaWJpdGVk Lg0KwqkgQ29weXJpZ2h0IDIwMTYgVW5pdGVkIFBhcmNlbCBTZXJ2aWNlIG9mIEFtZXJpY2EsIElu Yy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC4NClRyYWRlbWFya3MNClVQUyBPbkxpbmXCriBpcyBhIHJl Z2lzdGVyZWQgdHJhZGVtYXJrIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJ bmMuIEFsbCBvdGhlciB0cmFkZW1hcmtzIGFyZSB0aGUgcHJvcGVydHkgb2YgdGhlaXIgcmVzcGVj dGl2ZSBvd25lcnMuDQpTb21lIG9mIHRoZSBVUFMgY29ycG9yYXRlIGFwcGxpY2F0aW9ucyB1c2Ug VS5TLiBjaXR5LCBzdGF0ZSwgYW5kIHBvc3RhbCBjb2RlIGluZm9ybWF0aW9uIG9idGFpbmVkIGJ5 IFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJbmMuIHVuZGVyIGEgbm9uLWV4Y2x1 c2l2ZSBsaWNlbnNlIGZyb20gdGhlIFVuaXRlZCBTdGF0ZXMgUG9zdGFsIFNlcnZpY2UuIA0K"}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "UploadDocument",
"params": {
"test": true,
"account_number": "your-account-number",
"key": "your-key-from-authenticate-request",
"filename": "test.txt",
"file_format": "txt",
"document_type": "013",
"file_contents": "Tm90aWNlDQpJbiBhbGwgY29tbXVuaWNhdGlvbnMgd2l0aCBVUFMgY29uY2VybmluZyB0aGlzIGRvY3VtZW50LCBwbGVhc2UgcmVmZXIgdG8gdGhlIGRvY3VtZW50IGRhdGUgbG9jYXRlZCBvbiB0aGUgY292ZXIuDQpDb3B5cmlnaHQNClRoZSB1c2UsIGRpc2Nsb3N1cmUsIHJlcHJvZHVjdGlvbiwgbW9kaWZpY2F0aW9uLCB0cmFuc2Zlciwgb3IgdHJhbnNtaXR0YWwgb2YgdGhpcyB3b3JrIGZvciBhbnkgcHVycG9zZSBpbiBhbnkgZm9ybSBvciBieSBhbnkgbWVhbnMgd2l0aG91dCB0aGUgd3JpdHRlbiBw ZXJtaXNzaW9uIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBpcyBzdHJpY3RseSBwcm9oaWJpdGVk Lg0KwqkgQ29weXJpZ2h0IDIwMTYgVW5pdGVkIFBhcmNlbCBTZXJ2aWNlIG9mIEFtZXJpY2EsIElu Yy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC4NClRyYWRlbWFya3MNClVQUyBPbkxpbmXCriBpcyBhIHJl Z2lzdGVyZWQgdHJhZGVtYXJrIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJ bmMuIEFsbCBvdGhlciB0cmFkZW1hcmtzIGFyZSB0aGUgcHJvcGVydHkgb2YgdGhlaXIgcmVzcGVj dGl2ZSBvd25lcnMuDQpTb21lIG9mIHRoZSBVUFMgY29ycG9yYXRlIGFwcGxpY2F0aW9ucyB1c2Ug VS5TLiBjaXR5LCBzdGF0ZSwgYW5kIHBvc3RhbCBjb2RlIGluZm9ybWF0aW9uIG9idGFpbmVkIGJ5 IFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJbmMuIHVuZGVyIGEgbm9uLWV4Y2x1 c2l2ZSBsaWNlbnNlIGZyb20gdGhlIFVuaXRlZCBTdGF0ZXMgUG9zdGFsIFNlcnZpY2UuIA0K"
}
}
)
UPS-REST - Upload Link Customs Document
{
"carrier": "UPS-REST",
"action": "LinkDocument",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT_NUMBER",
"document_id": "document123.pdf",
"shipment_id": "abc123"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'LinkDocument',
'params' =>
array (
'test' => true,
'key' => 'your-key-from-authenticate-request',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'document_id' => 'document123.pdf',
'shipment_id' => 'abc123',
),
)
);
rs.request(
{'action': 'LinkDocument',
'carrier': 'UPS-REST',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'document_id': 'document123.pdf',
'key': 'your-key-from-authenticate-request',
'shipment_id': 'abc123',
'test': True}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"LinkDocument",
"params"=>
{"test"=>true,
"key"=>"your-key-from-authenticate-request",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"document_id"=>"document123.pdf",
"shipment_id"=>"abc123"}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "LinkDocument",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"account_number": "YOUR_ACCOUNT_NUMBER",
"document_id": "document123.pdf",
"shipment_id": "abc123"
}
}
)
UPS-REST - Void Shipment
{
"carrier": "UPS-REST",
"action": "VoidShipment",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"shipment_id": "1Z2220060294314162"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'VoidShipment',
'params' =>
array (
'test' => true,
'key' => 'your-key-from-authenticate-request',
'shipment_id' => '1Z2220060294314162',
),
)
);
rs.request(
{'action': 'VoidShipment',
'carrier': 'UPS-REST',
'params': {'key': 'your-key-from-authenticate-request',
'shipment_id': '1Z2220060294314162',
'test': True}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"VoidShipment",
"params"=>
{"test"=>true,
"key"=>"your-key-from-authenticate-request",
"shipment_id"=>"1Z2220060294314162"}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "VoidShipment",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"shipment_id": "1Z2220060294314162"
}
}
)
USPS - Address Validation
{
"carrier": "USPS",
"action": "AddressValidate",
"params": {
"username": "YOURUSERNAME",
"to_name": "John Doe",
"to_addr1": "2920 Zoo Drive",
"to_state": "CA",
"to_city": "San Diego",
"to_code": "92101",
"to_country": "US",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'USPS',
'action' => 'AddressValidate',
'params' =>
array (
'username' => 'YOURUSERNAME',
'to_name' => 'John Doe',
'to_addr1' => '2920 Zoo Drive',
'to_state' => 'CA',
'to_city' => 'San Diego',
'to_code' => '92101',
'to_country' => 'US',
'test' => true,
),
)
);
rs.request(
{'action': 'AddressValidate',
'carrier': 'USPS',
'params': {'test': True,
'to_addr1': '2920 Zoo Drive',
'to_city': 'San Diego',
'to_code': '92101',
'to_country': 'US',
'to_name': 'John Doe',
'to_state': 'CA',
'username': 'YOURUSERNAME'}}
)
rs.request(
{"carrier"=>"USPS",
"action"=>"AddressValidate",
"params"=>
{"username"=>"YOURUSERNAME",
"to_name"=>"John Doe",
"to_addr1"=>"2920 Zoo Drive",
"to_state"=>"CA",
"to_city"=>"San Diego",
"to_code"=>"92101",
"to_country"=>"US",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "USPS",
"action": "AddressValidate",
"params": {
"username": "YOURUSERNAME",
"to_name": "John Doe",
"to_addr1": "2920 Zoo Drive",
"to_state": "CA",
"to_city": "San Diego",
"to_code": "92101",
"to_country": "US",
"test": true
}
}
)
USPS - Address Validation City/State from Zip
{
"carrier": "USPS",
"action": "AddressValidate",
"params": {
"username": "YOURUSERNAME",
"to_code": "92101",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'USPS',
'action' => 'AddressValidate',
'params' =>
array (
'username' => 'YOURUSERNAME',
'to_code' => '92101',
'test' => true,
),
)
);
rs.request(
{'action': 'AddressValidate',
'carrier': 'USPS',
'params': {'test': True, 'to_code': '92101', 'username': 'YOURUSERNAME'}}
)
rs.request(
{"carrier"=>"USPS",
"action"=>"AddressValidate",
"params"=>{"username"=>"YOURUSERNAME", "to_code"=>"92101", "test"=>true}}
)
rocketshipit.request(
{
"carrier": "USPS",
"action": "AddressValidate",
"params": {
"username": "YOURUSERNAME",
"to_code": "92101",
"test": true
}
}
)
USPS - Create Manifest
{
"carrier": "USPS",
"action": "CreateManifest",
"params": {
"username": "YOUR_USERNAME",
"shipment_ids": ["420941159205590202518101026815"],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"image_type": "PDF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'USPS',
'action' => 'CreateManifest',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'shipment_ids' =>
array (
0 => '420941159205590202518101026815',
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'image_type' => 'PDF',
'test' => true,
),
)
);
rs.request(
{'action': 'CreateManifest',
'carrier': 'USPS',
'params': {'image_type': 'PDF',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipment_ids': ['420941159205590202518101026815'],
'shipper': 'RocketShipIt',
'test': True,
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"USPS",
"action"=>"CreateManifest",
"params"=>
{"username"=>"YOUR_USERNAME",
"shipment_ids"=>["420941159205590202518101026815"],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"image_type"=>"PDF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "USPS",
"action": "CreateManifest",
"params": {
"username": "YOUR_USERNAME",
"shipment_ids": ["420941159205590202518101026815"],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"image_type": "PDF",
"test": true
}
}
)
USPS - EMRS Return Label
{
"carrier": "USPS",
"action": "SubmitShipment",
"params": {
"permit_number": "293829",
"permit_issuing_po_city": "New York",
"permit_issuing_po_state": "NY",
"permit_issuing_po_zip5": "10001",
"pdu_firm_name": "Acme Inc",
"pdu_po_box": "PO Box 100",
"pdu_city": "Wilkes Barre",
"pdu_state": "PA",
"pdu_zip5": "18702",
"pdu_zip4": "1234",
"packages": [
{
"weight": 4,
"length": 7,
"width": 7,
"height": 8
}
],
"service": "PRIORITY",
"shipper": "RocketShipIt",
"ship_contact": "John Doe",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"ship_country": "US",
"from_name": "John Doe",
"from_addr1": "940 Presidio Ave",
"from_addr2": "#103",
"from_state": "CA",
"from_city": "San Francisco",
"from_code": "94115",
"from_country": "US",
"image_type": "PDF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'USPS',
'action' => 'SubmitShipment',
'params' =>
array (
'permit_number' => '293829',
'permit_issuing_po_city' => 'New York',
'permit_issuing_po_state' => 'NY',
'permit_issuing_po_zip5' => '10001',
'pdu_firm_name' => 'Acme Inc',
'pdu_po_box' => 'PO Box 100',
'pdu_city' => 'Wilkes Barre',
'pdu_state' => 'PA',
'pdu_zip5' => '18702',
'pdu_zip4' => '1234',
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'width' => 7,
'height' => 8,
),
),
'service' => 'PRIORITY',
'shipper' => 'RocketShipIt',
'ship_contact' => 'John Doe',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'ship_country' => 'US',
'from_name' => 'John Doe',
'from_addr1' => '940 Presidio Ave',
'from_addr2' => '#103',
'from_state' => 'CA',
'from_city' => 'San Francisco',
'from_code' => '94115',
'from_country' => 'US',
'image_type' => 'PDF',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'USPS',
'params': {'from_addr1': '940 Presidio Ave',
'from_addr2': '#103',
'from_city': 'San Francisco',
'from_code': '94115',
'from_country': 'US',
'from_name': 'John Doe',
'from_state': 'CA',
'image_type': 'PDF',
'packages': [{'height': 8, 'length': 7, 'weight': 4, 'width': 7}],
'pdu_city': 'Wilkes Barre',
'pdu_firm_name': 'Acme Inc',
'pdu_po_box': 'PO Box 100',
'pdu_state': 'PA',
'pdu_zip4': '1234',
'pdu_zip5': '18702',
'permit_issuing_po_city': 'New York',
'permit_issuing_po_state': 'NY',
'permit_issuing_po_zip5': '10001',
'permit_number': '293829',
'service': 'PRIORITY',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_contact': 'John Doe',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True}}
)
rs.request(
{"carrier"=>"USPS",
"action"=>"SubmitShipment",
"params"=>
{"permit_number"=>"293829",
"permit_issuing_po_city"=>"New York",
"permit_issuing_po_state"=>"NY",
"permit_issuing_po_zip5"=>"10001",
"pdu_firm_name"=>"Acme Inc",
"pdu_po_box"=>"PO Box 100",
"pdu_city"=>"Wilkes Barre",
"pdu_state"=>"PA",
"pdu_zip5"=>"18702",
"pdu_zip4"=>"1234",
"packages"=>[{"weight"=>4, "length"=>7, "width"=>7, "height"=>8}],
"service"=>"PRIORITY",
"shipper"=>"RocketShipIt",
"ship_contact"=>"John Doe",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"ship_country"=>"US",
"from_name"=>"John Doe",
"from_addr1"=>"940 Presidio Ave",
"from_addr2"=>"#103",
"from_state"=>"CA",
"from_city"=>"San Francisco",
"from_code"=>"94115",
"from_country"=>"US",
"image_type"=>"PDF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "USPS",
"action": "SubmitShipment",
"params": {
"permit_number": "293829",
"permit_issuing_po_city": "New York",
"permit_issuing_po_state": "NY",
"permit_issuing_po_zip5": "10001",
"pdu_firm_name": "Acme Inc",
"pdu_po_box": "PO Box 100",
"pdu_city": "Wilkes Barre",
"pdu_state": "PA",
"pdu_zip5": "18702",
"pdu_zip4": "1234",
"packages": [
{
"weight": 4,
"length": 7,
"width": 7,
"height": 8
}
],
"service": "PRIORITY",
"shipper": "RocketShipIt",
"ship_contact": "John Doe",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"ship_country": "US",
"from_name": "John Doe",
"from_addr1": "940 Presidio Ave",
"from_addr2": "#103",
"from_state": "CA",
"from_city": "San Francisco",
"from_code": "94115",
"from_country": "US",
"image_type": "PDF",
"test": true
}
}
)
USPS - Label
{
"carrier": "USPS",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"packages": [
{
"weight": 4,
"length": 7,
"width": 7,
"height": 8
}
],
"service": "PRIORITY",
"shipper": "RocketShipIt",
"ship_contact": "John Doe",
"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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PDF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'USPS',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'width' => 7,
'height' => 8,
),
),
'service' => 'PRIORITY',
'shipper' => 'RocketShipIt',
'ship_contact' => 'John Doe',
'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_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'PDF',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'USPS',
'params': {'image_type': 'PDF',
'packages': [{'height': 8, 'length': 7, 'weight': 4, 'width': 7}],
'service': 'PRIORITY',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_contact': 'John Doe',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'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',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"USPS",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"packages"=>[{"weight"=>4, "length"=>7, "width"=>7, "height"=>8}],
"service"=>"PRIORITY",
"shipper"=>"RocketShipIt",
"ship_contact"=>"John Doe",
"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_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"PDF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "USPS",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"packages": [
{
"weight": 4,
"length": 7,
"width": 7,
"height": 8
}
],
"service": "PRIORITY",
"shipper": "RocketShipIt",
"ship_contact": "John Doe",
"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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PDF",
"test": true
}
}
)
USPS - Label First Class Mail International
{
"carrier": "USPS",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"packages": [
{
"weight": 2,
"length": 6,
"width": 7,
"height": 8
}
],
"customs": [
{
"customs_description": "my shipment",
"customs_quantity": 1,
"customs_weight": 2,
"customs_value": 5.0,
"customs_hs_tariff": "",
"customs_origin_country": "US"
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "Toronto Zoo",
"to_addr1": "2000 Meadowvale Road",
"to_state": "MB",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_phone": "1231231234",
"to_country": "CA",
"test": true,
"service": "US-FCI",
"reference_value": "asdf",
"customs_content_type": "SAMPLE"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'USPS',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'packages' =>
array (
0 =>
array (
'weight' => 2,
'length' => 6,
'width' => 7,
'height' => 8,
),
),
'customs' =>
array (
0 =>
array (
'customs_description' => 'my shipment',
'customs_quantity' => 1,
'customs_weight' => 2,
'customs_value' => 5.0,
'customs_hs_tariff' => '',
'customs_origin_country' => 'US',
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'Toronto Zoo',
'to_addr1' => '2000 Meadowvale Road',
'to_state' => 'MB',
'to_city' => 'Toronto',
'to_code' => 'M1B5K7',
'to_phone' => '1231231234',
'to_country' => 'CA',
'test' => true,
'service' => 'US-FCI',
'reference_value' => 'asdf',
'customs_content_type' => 'SAMPLE',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'USPS',
'params': {'customs': [{'customs_description': 'my shipment',
'customs_hs_tariff': '',
'customs_origin_country': 'US',
'customs_quantity': 1,
'customs_value': 5.0,
'customs_weight': 2}],
'customs_content_type': 'SAMPLE',
'packages': [{'height': 8, 'length': 6, 'weight': 2, 'width': 7}],
'reference_value': 'asdf',
'service': 'US-FCI',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '2000 Meadowvale Road',
'to_city': 'Toronto',
'to_code': 'M1B5K7',
'to_country': 'CA',
'to_name': 'Toronto Zoo',
'to_phone': '1231231234',
'to_state': 'MB',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"USPS",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"packages"=>[{"weight"=>2, "length"=>6, "width"=>7, "height"=>8}],
"customs"=>
[{"customs_description"=>"my shipment",
"customs_quantity"=>1,
"customs_weight"=>2,
"customs_value"=>5.0,
"customs_hs_tariff"=>"",
"customs_origin_country"=>"US"}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"Toronto Zoo",
"to_addr1"=>"2000 Meadowvale Road",
"to_state"=>"MB",
"to_city"=>"Toronto",
"to_code"=>"M1B5K7",
"to_phone"=>"1231231234",
"to_country"=>"CA",
"test"=>true,
"service"=>"US-FCI",
"reference_value"=>"asdf",
"customs_content_type"=>"SAMPLE"}}
)
rocketshipit.request(
{
"carrier": "USPS",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"packages": [
{
"weight": 2,
"length": 6,
"width": 7,
"height": 8
}
],
"customs": [
{
"customs_description": "my shipment",
"customs_quantity": 1,
"customs_weight": 2,
"customs_value": 5.0,
"customs_hs_tariff": "",
"customs_origin_country": "US"
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "Toronto Zoo",
"to_addr1": "2000 Meadowvale Road",
"to_state": "MB",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_phone": "1231231234",
"to_country": "CA",
"test": true,
"service": "US-FCI",
"reference_value": "asdf",
"customs_content_type": "SAMPLE"
}
}
)
USPS - Label International Express Mail
{
"carrier": "USPS",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"packages": [
{
"weight": 5,
"length": 6,
"width": 7,
"height": 8
}
],
"customs": [
{
"customs_description": "my shipment",
"customs_quantity": 1,
"customs_weight": 2.5,
"customs_value": 5.0,
"customs_hs_tariff": "",
"customs_origin_country": "US"
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "Toronto Zoo",
"to_addr1": "2000 Meadowvale Road",
"to_state": "MB",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_phone": "1231231234",
"to_country": "CA",
"test": true,
"service": "US-EMI",
"reference_value": "asdf",
"customs_content_type": "SAMPLE"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'USPS',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 6,
'width' => 7,
'height' => 8,
),
),
'customs' =>
array (
0 =>
array (
'customs_description' => 'my shipment',
'customs_quantity' => 1,
'customs_weight' => 2.5,
'customs_value' => 5.0,
'customs_hs_tariff' => '',
'customs_origin_country' => 'US',
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'Toronto Zoo',
'to_addr1' => '2000 Meadowvale Road',
'to_state' => 'MB',
'to_city' => 'Toronto',
'to_code' => 'M1B5K7',
'to_phone' => '1231231234',
'to_country' => 'CA',
'test' => true,
'service' => 'US-EMI',
'reference_value' => 'asdf',
'customs_content_type' => 'SAMPLE',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'USPS',
'params': {'customs': [{'customs_description': 'my shipment',
'customs_hs_tariff': '',
'customs_origin_country': 'US',
'customs_quantity': 1,
'customs_value': 5.0,
'customs_weight': 2.5}],
'customs_content_type': 'SAMPLE',
'packages': [{'height': 8, 'length': 6, 'weight': 5, 'width': 7}],
'reference_value': 'asdf',
'service': 'US-EMI',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '2000 Meadowvale Road',
'to_city': 'Toronto',
'to_code': 'M1B5K7',
'to_country': 'CA',
'to_name': 'Toronto Zoo',
'to_phone': '1231231234',
'to_state': 'MB',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"USPS",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"packages"=>[{"weight"=>5, "length"=>6, "width"=>7, "height"=>8}],
"customs"=>
[{"customs_description"=>"my shipment",
"customs_quantity"=>1,
"customs_weight"=>2.5,
"customs_value"=>5.0,
"customs_hs_tariff"=>"",
"customs_origin_country"=>"US"}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"Toronto Zoo",
"to_addr1"=>"2000 Meadowvale Road",
"to_state"=>"MB",
"to_city"=>"Toronto",
"to_code"=>"M1B5K7",
"to_phone"=>"1231231234",
"to_country"=>"CA",
"test"=>true,
"service"=>"US-EMI",
"reference_value"=>"asdf",
"customs_content_type"=>"SAMPLE"}}
)
rocketshipit.request(
{
"carrier": "USPS",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"packages": [
{
"weight": 5,
"length": 6,
"width": 7,
"height": 8
}
],
"customs": [
{
"customs_description": "my shipment",
"customs_quantity": 1,
"customs_weight": 2.5,
"customs_value": 5.0,
"customs_hs_tariff": "",
"customs_origin_country": "US"
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "Toronto Zoo",
"to_addr1": "2000 Meadowvale Road",
"to_state": "MB",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_phone": "1231231234",
"to_country": "CA",
"test": true,
"service": "US-EMI",
"reference_value": "asdf",
"customs_content_type": "SAMPLE"
}
}
)
USPS - Label International Priority Mail
{
"carrier": "USPS",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"packages": [
{
"weight": 5,
"length": 6,
"width": 7,
"height": 8
}
],
"customs": [
{
"customs_description": "my shipment",
"customs_quantity": 1,
"customs_weight": 2.5,
"customs_value": 5.0,
"customs_hs_tariff": "",
"customs_origin_country": "US"
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "Toronto Zoo",
"to_addr1": "2000 Meadowvale Road",
"to_state": "MB",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_phone": "1231231234",
"to_country": "CA",
"test": true,
"service": "US-PMI",
"reference_value": "asdf",
"customs_content_type": "SAMPLE"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'USPS',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 6,
'width' => 7,
'height' => 8,
),
),
'customs' =>
array (
0 =>
array (
'customs_description' => 'my shipment',
'customs_quantity' => 1,
'customs_weight' => 2.5,
'customs_value' => 5.0,
'customs_hs_tariff' => '',
'customs_origin_country' => 'US',
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'to_name' => 'Toronto Zoo',
'to_addr1' => '2000 Meadowvale Road',
'to_state' => 'MB',
'to_city' => 'Toronto',
'to_code' => 'M1B5K7',
'to_phone' => '1231231234',
'to_country' => 'CA',
'test' => true,
'service' => 'US-PMI',
'reference_value' => 'asdf',
'customs_content_type' => 'SAMPLE',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'USPS',
'params': {'customs': [{'customs_description': 'my shipment',
'customs_hs_tariff': '',
'customs_origin_country': 'US',
'customs_quantity': 1,
'customs_value': 5.0,
'customs_weight': 2.5}],
'customs_content_type': 'SAMPLE',
'packages': [{'height': 8, 'length': 6, 'weight': 5, 'width': 7}],
'reference_value': 'asdf',
'service': 'US-PMI',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '2000 Meadowvale Road',
'to_city': 'Toronto',
'to_code': 'M1B5K7',
'to_country': 'CA',
'to_name': 'Toronto Zoo',
'to_phone': '1231231234',
'to_state': 'MB',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"USPS",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"packages"=>[{"weight"=>5, "length"=>6, "width"=>7, "height"=>8}],
"customs"=>
[{"customs_description"=>"my shipment",
"customs_quantity"=>1,
"customs_weight"=>2.5,
"customs_value"=>5.0,
"customs_hs_tariff"=>"",
"customs_origin_country"=>"US"}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"to_name"=>"Toronto Zoo",
"to_addr1"=>"2000 Meadowvale Road",
"to_state"=>"MB",
"to_city"=>"Toronto",
"to_code"=>"M1B5K7",
"to_phone"=>"1231231234",
"to_country"=>"CA",
"test"=>true,
"service"=>"US-PMI",
"reference_value"=>"asdf",
"customs_content_type"=>"SAMPLE"}}
)
rocketshipit.request(
{
"carrier": "USPS",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"packages": [
{
"weight": 5,
"length": 6,
"width": 7,
"height": 8
}
],
"customs": [
{
"customs_description": "my shipment",
"customs_quantity": 1,
"customs_weight": 2.5,
"customs_value": 5.0,
"customs_hs_tariff": "",
"customs_origin_country": "US"
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "Toronto Zoo",
"to_addr1": "2000 Meadowvale Road",
"to_state": "MB",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_phone": "1231231234",
"to_country": "CA",
"test": true,
"service": "US-PMI",
"reference_value": "asdf",
"customs_content_type": "SAMPLE"
}
}
)
USPS - Rate International
{
"carrier": "USPS",
"action": "GetAllRates",
"params": {
"packages": [
{
"weight": 6,
"length": 5,
"width": 3,
"height": 10
}
],
"ship_code": "59759",
"to_country": "AU"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'USPS',
'action' => 'GetAllRates',
'params' =>
array (
'packages' =>
array (
0 =>
array (
'weight' => 6,
'length' => 5,
'width' => 3,
'height' => 10,
),
),
'ship_code' => '59759',
'to_country' => 'AU',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'USPS',
'params': {'packages': [{'height': 10, 'length': 5, 'weight': 6, 'width': 3}],
'ship_code': '59759',
'to_country': 'AU'}}
)
rs.request(
{"carrier"=>"USPS",
"action"=>"GetAllRates",
"params"=>
{"packages"=>[{"weight"=>6, "length"=>5, "width"=>3, "height"=>10}],
"ship_code"=>"59759",
"to_country"=>"AU"}}
)
rocketshipit.request(
{
"carrier": "USPS",
"action": "GetAllRates",
"params": {
"packages": [
{
"weight": 6,
"length": 5,
"width": 3,
"height": 10
}
],
"ship_code": "59759",
"to_country": "AU"
}
}
)
USPS - Rate Regional
{
"carrier": "USPS",
"action": "GetAllRates",
"params": {
"packages": [
{
"weight": 6
}
],
"service": "Priority Commercial",
"ship_code": "59759",
"packaging_type": "Regional Rate Box A",
"to_code": "90210"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'USPS',
'action' => 'GetAllRates',
'params' =>
array (
'packages' =>
array (
0 =>
array (
'weight' => 6,
),
),
'service' => 'Priority Commercial',
'ship_code' => '59759',
'packaging_type' => 'Regional Rate Box A',
'to_code' => '90210',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'USPS',
'params': {'packages': [{'weight': 6}],
'packaging_type': 'Regional Rate Box A',
'service': 'Priority Commercial',
'ship_code': '59759',
'to_code': '90210'}}
)
rs.request(
{"carrier"=>"USPS",
"action"=>"GetAllRates",
"params"=>
{"packages"=>[{"weight"=>6}],
"service"=>"Priority Commercial",
"ship_code"=>"59759",
"packaging_type"=>"Regional Rate Box A",
"to_code"=>"90210"}}
)
rocketshipit.request(
{
"carrier": "USPS",
"action": "GetAllRates",
"params": {
"packages": [
{
"weight": 6
}
],
"service": "Priority Commercial",
"ship_code": "59759",
"packaging_type": "Regional Rate Box A",
"to_code": "90210"
}
}
)
USPS - Rates
{
"carrier": "USPS",
"action": "GetAllRates",
"params": {
"username": "YOUR_USERNAME",
"packages": [
{
"weight": 6
}
],
"ship_code": "59759",
"to_code": "90210"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'USPS',
'action' => 'GetAllRates',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'packages' =>
array (
0 =>
array (
'weight' => 6,
),
),
'ship_code' => '59759',
'to_code' => '90210',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'USPS',
'params': {'packages': [{'weight': 6}],
'ship_code': '59759',
'to_code': '90210',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"USPS",
"action"=>"GetAllRates",
"params"=>
{"username"=>"YOUR_USERNAME",
"packages"=>[{"weight"=>6}],
"ship_code"=>"59759",
"to_code"=>"90210"}}
)
rocketshipit.request(
{
"carrier": "USPS",
"action": "GetAllRates",
"params": {
"username": "YOUR_USERNAME",
"packages": [
{
"weight": 6
}
],
"ship_code": "59759",
"to_code": "90210"
}
}
)
USPS - Rates First Class
{
"carrier": "USPS",
"action": "GetAllRates",
"params": {
"username": "YOUR_USERNAME",
"service": "First Class",
"packages": [
{
"weight": 0.3,
"first_class_mail_type": "PARCEL"
}
],
"ship_code": "59759",
"to_code": "90210"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'USPS',
'action' => 'GetAllRates',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'service' => 'First Class',
'packages' =>
array (
0 =>
array (
'weight' => 0.3,
'first_class_mail_type' => 'PARCEL',
),
),
'ship_code' => '59759',
'to_code' => '90210',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'USPS',
'params': {'packages': [{'first_class_mail_type': 'PARCEL', 'weight': 0.3}],
'service': 'First Class',
'ship_code': '59759',
'to_code': '90210',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"USPS",
"action"=>"GetAllRates",
"params"=>
{"username"=>"YOUR_USERNAME",
"service"=>"First Class",
"packages"=>[{"weight"=>0.3, "first_class_mail_type"=>"PARCEL"}],
"ship_code"=>"59759",
"to_code"=>"90210"}}
)
rocketshipit.request(
{
"carrier": "USPS",
"action": "GetAllRates",
"params": {
"username": "YOUR_USERNAME",
"service": "First Class",
"packages": [
{
"weight": 0.3,
"first_class_mail_type": "PARCEL"
}
],
"ship_code": "59759",
"to_code": "90210"
}
}
)
USPS - Time in Transit
{
"carrier": "USPS-REST",
"action": "TimeInTransit",
"params": {
"key": "your-key-from-authenticate-request",
"test": true,
"shipper": "RocketShipIt",
"ship_contact": "Mark Sanborn",
"ship_phone": "1231231234",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_code": "90210"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'USPS-REST',
'action' => 'TimeInTransit',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'test' => true,
'shipper' => 'RocketShipIt',
'ship_contact' => 'Mark Sanborn',
'ship_phone' => '1231231234',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_country' => 'US',
'to_code' => '90210',
),
)
);
rs.request(
{'action': 'TimeInTransit',
'carrier': 'USPS-REST',
'params': {'key': 'your-key-from-authenticate-request',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_contact': 'Mark Sanborn',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_code': '90210',
'to_country': 'US'}}
)
rs.request(
{"carrier"=>"USPS-REST",
"action"=>"TimeInTransit",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"test"=>true,
"shipper"=>"RocketShipIt",
"ship_contact"=>"Mark Sanborn",
"ship_phone"=>"1231231234",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_country"=>"US",
"to_code"=>"90210"}}
)
rocketshipit.request(
{
"carrier": "USPS-REST",
"action": "TimeInTransit",
"params": {
"key": "your-key-from-authenticate-request",
"test": true,
"shipper": "RocketShipIt",
"ship_contact": "Mark Sanborn",
"ship_phone": "1231231234",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_code": "90210"
}
}
)
USPS - Tracking
{
"carrier": "USPS",
"action": "track",
"params": {
"username": "YOUR_USERNAME",
"tracking_number": "9361289878130102925130"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'USPS',
'action' => 'track',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'tracking_number' => '9361289878130102925130',
),
)
);
rs.request(
{'action': 'track',
'carrier': 'USPS',
'params': {'tracking_number': '9361289878130102925130',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"USPS",
"action"=>"track",
"params"=>
{"username"=>"YOUR_USERNAME", "tracking_number"=>"9361289878130102925130"}}
)
rocketshipit.request(
{
"carrier": "USPS",
"action": "track",
"params": {
"username": "YOUR_USERNAME",
"tracking_number": "9361289878130102925130"
}
}
)
USPS-REST - Address Validation City/State from Zip
{
"carrier": "USPS-REST",
"action": "AddressValidate",
"params": {
"key": "your-key-from-authenticate-request",
"to_code": "92101",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'USPS-REST',
'action' => 'AddressValidate',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'to_code' => '92101',
'test' => true,
),
)
);
rs.request(
{'action': 'AddressValidate',
'carrier': 'USPS-REST',
'params': {'key': 'your-key-from-authenticate-request',
'test': True,
'to_code': '92101'}}
)
rs.request(
{"carrier"=>"USPS-REST",
"action"=>"AddressValidate",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"to_code"=>"92101",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "USPS-REST",
"action": "AddressValidate",
"params": {
"key": "your-key-from-authenticate-request",
"to_code": "92101",
"test": true
}
}
)
USPS-REST - Authenticate
{
"carrier": "USPS-REST",
"action": "Authenticate",
"params": {
"client_id": "abc123",
"client_secret": "def987",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'USPS-REST',
'action' => 'Authenticate',
'params' =>
array (
'client_id' => 'abc123',
'client_secret' => 'def987',
'test' => true,
),
)
);
rs.request(
{'action': 'Authenticate',
'carrier': 'USPS-REST',
'params': {'client_id': 'abc123', 'client_secret': 'def987', 'test': True}}
)
rs.request(
{"carrier"=>"USPS-REST",
"action"=>"Authenticate",
"params"=>{"client_id"=>"abc123", "client_secret"=>"def987", "test"=>true}}
)
rocketshipit.request(
{
"carrier": "USPS-REST",
"action": "Authenticate",
"params": {
"client_id": "abc123",
"client_secret": "def987",
"test": true
}
}
)
USPS-REST - Create Manifest
{
"carrier": "USPS-REST",
"action": "CreateManifest",
"params": {
"key": "your-key-from-authenticate-request",
"shipment_ids": [
"420941159205590202518101026815"
],
"shipper": "Acme Inc",
"ship_addr1": "5333 Zoo Dr",
"ship_city": "Los Angeles",
"ship_state": "CA",
"ship_code": "90027",
"ship_phone": "1231231234",
"image_type": "PDF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'USPS-REST',
'action' => 'CreateManifest',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'shipment_ids' =>
array (
0 => '420941159205590202518101026815',
),
'shipper' => 'Acme Inc',
'ship_addr1' => '5333 Zoo Dr',
'ship_city' => 'Los Angeles',
'ship_state' => 'CA',
'ship_code' => '90027',
'ship_phone' => '1231231234',
'image_type' => 'PDF',
'test' => true,
),
)
);
rs.request(
{'action': 'CreateManifest',
'carrier': 'USPS-REST',
'params': {'image_type': 'PDF',
'key': 'your-key-from-authenticate-request',
'ship_addr1': '5333 Zoo Dr',
'ship_city': 'Los Angeles',
'ship_code': '90027',
'ship_phone': '1231231234',
'ship_state': 'CA',
'shipment_ids': ['420941159205590202518101026815'],
'shipper': 'Acme Inc',
'test': True}}
)
rs.request(
{"carrier"=>"USPS-REST",
"action"=>"CreateManifest",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"shipment_ids"=>["420941159205590202518101026815"],
"shipper"=>"Acme Inc",
"ship_addr1"=>"5333 Zoo Dr",
"ship_city"=>"Los Angeles",
"ship_state"=>"CA",
"ship_code"=>"90027",
"ship_phone"=>"1231231234",
"image_type"=>"PDF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "USPS-REST",
"action": "CreateManifest",
"params": {
"key": "your-key-from-authenticate-request",
"shipment_ids": [
"420941159205590202518101026815"
],
"shipper": "Acme Inc",
"ship_addr1": "5333 Zoo Dr",
"ship_city": "Los Angeles",
"ship_state": "CA",
"ship_code": "90027",
"ship_phone": "1231231234",
"image_type": "PDF",
"test": true
}
}
)
USPS-REST - Get Purchase Token
{
"carrier": "USPS-REST",
"action": "PurchasePostage",
"params": {
"key": "your-key-from-authenticate-request",
"account_number": "1000005549",
"crid": "94879959",
"mid": "901097701",
"manifest_id": "901097701",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'USPS-REST',
'action' => 'PurchasePostage',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'account_number' => '1000005549',
'crid' => '94879959',
'mid' => '901097701',
'manifest_id' => '901097701',
'test' => true,
),
)
);
rs.request(
{'action': 'PurchasePostage',
'carrier': 'USPS-REST',
'params': {'account_number': '1000005549',
'crid': '94879959',
'key': 'your-key-from-authenticate-request',
'manifest_id': '901097701',
'mid': '901097701',
'test': True}}
)
rs.request(
{"carrier"=>"USPS-REST",
"action"=>"PurchasePostage",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"account_number"=>"1000005549",
"crid"=>"94879959",
"mid"=>"901097701",
"manifest_id"=>"901097701",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "USPS-REST",
"action": "PurchasePostage",
"params": {
"key": "your-key-from-authenticate-request",
"account_number": "1000005549",
"crid": "94879959",
"mid": "901097701",
"manifest_id": "901097701",
"test": true
}
}
)
USPS-REST - Label
{
"carrier": "USPS-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"payment_token": "key-from-PurchasePostage-response",
"packages": [
{
"weight": 4.3,
"length": 7,
"width": 7,
"height": 8
}
],
"service": "PARCEL_SELECT",
"shipper": "RocketShipIt",
"ship_contact": "John Doe",
"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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PDF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'USPS-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'payment_token' => 'key-from-PurchasePostage-response',
'packages' =>
array (
0 =>
array (
'weight' => 4.3,
'length' => 7,
'width' => 7,
'height' => 8,
),
),
'service' => 'PARCEL_SELECT',
'shipper' => 'RocketShipIt',
'ship_contact' => 'John Doe',
'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_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'PDF',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'USPS-REST',
'params': {'image_type': 'PDF',
'key': 'your-key-from-authenticate-request',
'packages': [{'height': 8, 'length': 7, 'weight': 4.3, 'width': 7}],
'payment_token': 'key-from-PurchasePostage-response',
'service': 'PARCEL_SELECT',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_contact': 'John Doe',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'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'}}
)
rs.request(
{"carrier"=>"USPS-REST",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"payment_token"=>"key-from-PurchasePostage-response",
"packages"=>[{"weight"=>4.3, "length"=>7, "width"=>7, "height"=>8}],
"service"=>"PARCEL_SELECT",
"shipper"=>"RocketShipIt",
"ship_contact"=>"John Doe",
"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_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"PDF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "USPS-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"payment_token": "key-from-PurchasePostage-response",
"packages": [
{
"weight": 4.3,
"length": 7,
"width": 7,
"height": 8
}
],
"service": "PARCEL_SELECT",
"shipper": "RocketShipIt",
"ship_contact": "John Doe",
"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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PDF",
"test": true
}
}
)
USPS-REST - Label Return
{
"carrier": "USPS-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"payment_token": "key-from-PurchasePostage-response",
"return_code": "PRINT_RETURN_LABEL",
"service": "GROUND_RETURN_SERVICE",
"packages": [
{
"weight": 4.3,
"length": 7,
"width": 7,
"height": 8
}
],
"shipper": "RocketShipIt",
"ship_contact": "John Doe",
"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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115-1234",
"to_country": "US",
"image_type": "PDF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'USPS-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'payment_token' => 'key-from-PurchasePostage-response',
'return_code' => 'PRINT_RETURN_LABEL',
'service' => 'GROUND_RETURN_SERVICE',
'packages' =>
array (
0 =>
array (
'weight' => 4.3,
'length' => 7,
'width' => 7,
'height' => 8,
),
),
'shipper' => 'RocketShipIt',
'ship_contact' => 'John Doe',
'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_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115-1234',
'to_country' => 'US',
'image_type' => 'PDF',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'USPS-REST',
'params': {'image_type': 'PDF',
'key': 'your-key-from-authenticate-request',
'packages': [{'height': 8, 'length': 7, 'weight': 4.3, 'width': 7}],
'payment_token': 'key-from-PurchasePostage-response',
'return_code': 'PRINT_RETURN_LABEL',
'service': 'GROUND_RETURN_SERVICE',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_contact': 'John Doe',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '940 Presidio Ave',
'to_addr2': '#103',
'to_city': 'San Francisco',
'to_code': '94115-1234',
'to_country': 'US',
'to_name': 'John Doe',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"USPS-REST",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"payment_token"=>"key-from-PurchasePostage-response",
"return_code"=>"PRINT_RETURN_LABEL",
"service"=>"GROUND_RETURN_SERVICE",
"packages"=>[{"weight"=>4.3, "length"=>7, "width"=>7, "height"=>8}],
"shipper"=>"RocketShipIt",
"ship_contact"=>"John Doe",
"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_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115-1234",
"to_country"=>"US",
"image_type"=>"PDF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "USPS-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"payment_token": "key-from-PurchasePostage-response",
"return_code": "PRINT_RETURN_LABEL",
"service": "GROUND_RETURN_SERVICE",
"packages": [
{
"weight": 4.3,
"length": 7,
"width": 7,
"height": 8
}
],
"shipper": "RocketShipIt",
"ship_contact": "John Doe",
"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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115-1234",
"to_country": "US",
"image_type": "PDF",
"test": true
}
}
)
USPS-REST - Rate Single with rate indicator
{
"carrier": "USPS-REST",
"action": "GetAllRates",
"params": {
"test": true,
"price_type": "RETAIL",
"rate_indicator": "PA",
"service": "PRIORITY_MAIL_EXPRESS",
"packages": [
{
"weight": 6
}
],
"ship_code": "59759",
"to_code": "90210"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'USPS-REST',
'action' => 'GetAllRates',
'params' =>
array (
'test' => true,
'price_type' => 'RETAIL',
'rate_indicator' => 'PA',
'service' => 'PRIORITY_MAIL_EXPRESS',
'packages' =>
array (
0 =>
array (
'weight' => 6,
),
),
'ship_code' => '59759',
'to_code' => '90210',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'USPS-REST',
'params': {'packages': [{'weight': 6}],
'price_type': 'RETAIL',
'rate_indicator': 'PA',
'service': 'PRIORITY_MAIL_EXPRESS',
'ship_code': '59759',
'test': True,
'to_code': '90210'}}
)
rs.request(
{"carrier"=>"USPS-REST",
"action"=>"GetAllRates",
"params"=>
{"test"=>true,
"price_type"=>"RETAIL",
"rate_indicator"=>"PA",
"service"=>"PRIORITY_MAIL_EXPRESS",
"packages"=>[{"weight"=>6}],
"ship_code"=>"59759",
"to_code"=>"90210"}}
)
rocketshipit.request(
{
"carrier": "USPS-REST",
"action": "GetAllRates",
"params": {
"test": true,
"price_type": "RETAIL",
"rate_indicator": "PA",
"service": "PRIORITY_MAIL_EXPRESS",
"packages": [
{
"weight": 6
}
],
"ship_code": "59759",
"to_code": "90210"
}
}
)
USPS-REST - Rates
{
"carrier": "USPS-REST",
"action": "GetAllRates",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"price_type": "RETAIL",
"packages": [
{
"weight": 6
}
],
"ship_code": "59759",
"to_code": "90210"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'USPS-REST',
'action' => 'GetAllRates',
'params' =>
array (
'test' => true,
'key' => 'your-key-from-authenticate-request',
'price_type' => 'RETAIL',
'packages' =>
array (
0 =>
array (
'weight' => 6,
),
),
'ship_code' => '59759',
'to_code' => '90210',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'USPS-REST',
'params': {'key': 'your-key-from-authenticate-request',
'packages': [{'weight': 6}],
'price_type': 'RETAIL',
'ship_code': '59759',
'test': True,
'to_code': '90210'}}
)
rs.request(
{"carrier"=>"USPS-REST",
"action"=>"GetAllRates",
"params"=>
{"test"=>true,
"key"=>"your-key-from-authenticate-request",
"price_type"=>"RETAIL",
"packages"=>[{"weight"=>6}],
"ship_code"=>"59759",
"to_code"=>"90210"}}
)
rocketshipit.request(
{
"carrier": "USPS-REST",
"action": "GetAllRates",
"params": {
"test": true,
"key": "your-key-from-authenticate-request",
"price_type": "RETAIL",
"packages": [
{
"weight": 6
}
],
"ship_code": "59759",
"to_code": "90210"
}
}
)
USPS-REST - Tracking
{
"carrier": "USPS-REST",
"action": "track",
"params": {
"key": "your-key-from-authenticate-request",
"tracking_number": "9405509206486033133221"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'USPS-REST',
'action' => 'track',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'tracking_number' => '9405509206486033133221',
),
)
);
rs.request(
{'action': 'track',
'carrier': 'USPS-REST',
'params': {'key': 'your-key-from-authenticate-request',
'tracking_number': '9405509206486033133221'}}
)
rs.request(
{"carrier"=>"USPS-REST",
"action"=>"track",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"tracking_number"=>"9405509206486033133221"}}
)
rocketshipit.request(
{
"carrier": "USPS-REST",
"action": "track",
"params": {
"key": "your-key-from-authenticate-request",
"tracking_number": "9405509206486033133221"
}
}
)
USPS-REST - Void Shipment
{
"carrier": "USPS-REST",
"action": "VoidShipment",
"params": {
"key": "your-key-from-authenticate-request",
"payment_token": "your-payment-token from PurchasePostage call",
"shipment_id": "1234567890",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'USPS-REST',
'action' => 'VoidShipment',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'payment_token' => 'your-payment-token from PurchasePostage call',
'shipment_id' => '1234567890',
'test' => true,
),
)
);
rs.request(
{'action': 'VoidShipment',
'carrier': 'USPS-REST',
'params': {'key': 'your-key-from-authenticate-request',
'payment_token': 'your-payment-token from PurchasePostage call',
'shipment_id': '1234567890',
'test': True}}
)
rs.request(
{"carrier"=>"USPS-REST",
"action"=>"VoidShipment",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"payment_token"=>"your-payment-token from PurchasePostage call",
"shipment_id"=>"1234567890",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "USPS-REST",
"action": "VoidShipment",
"params": {
"key": "your-key-from-authenticate-request",
"payment_token": "your-payment-token from PurchasePostage call",
"shipment_id": "1234567890",
"test": true
}
}
)
USPS-eVS - Label
{
"carrier": "USPS-eVS",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 4.3,
"length": 7,
"width": 7,
"height": 8
}
],
"service": "PRIORITY",
"shipper": "RocketShipIt",
"ship_contact": "John Doe",
"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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PDF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'USPS-eVS',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 4.3,
'length' => 7,
'width' => 7,
'height' => 8,
),
),
'service' => 'PRIORITY',
'shipper' => 'RocketShipIt',
'ship_contact' => 'John Doe',
'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_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'PDF',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'USPS-eVS',
'params': {'image_type': 'PDF',
'packages': [{'height': 8, 'length': 7, 'weight': 4.3, 'width': 7}],
'password': 'YOUR_PASSWORD',
'service': 'PRIORITY',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_contact': 'John Doe',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'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',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"USPS-eVS",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"packages"=>[{"weight"=>4.3, "length"=>7, "width"=>7, "height"=>8}],
"service"=>"PRIORITY",
"shipper"=>"RocketShipIt",
"ship_contact"=>"John Doe",
"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_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"PDF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "USPS-eVS",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 4.3,
"length": 7,
"width": 7,
"height": 8
}
],
"service": "PRIORITY",
"shipper": "RocketShipIt",
"ship_contact": "John Doe",
"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_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PDF",
"test": true
}
}
)
USPS-eVS - Label APO
{
"carrier": "USPS-eVS",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 4.3,
"length": 7,
"width": 7,
"height": 8
}
],
"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_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
}
],
"service": "PRIORITY",
"shipper": "RocketShipIt",
"ship_contact": "John Doe",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "CPT JOHN DOE",
"to_addr1": "PSC 556 BOX 177",
"to_state": "AP",
"to_city": "APO",
"to_code": "96386",
"to_phone": "1231231234",
"to_country": "US",
"image_type": "PDF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'USPS-eVS',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 4.3,
'length' => 7,
'width' => 7,
'height' => 8,
),
),
'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',
),
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,
),
),
'service' => 'PRIORITY',
'shipper' => 'RocketShipIt',
'ship_contact' => 'John Doe',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_phone' => '1231231234',
'ship_country' => 'US',
'to_name' => 'CPT JOHN DOE',
'to_addr1' => 'PSC 556 BOX 177',
'to_state' => 'AP',
'to_city' => 'APO',
'to_code' => '96386',
'to_phone' => '1231231234',
'to_country' => 'US',
'image_type' => 'PDF',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'USPS-eVS',
'params': {'customs': [{'country_of_manufacture': 'US',
'customs_description': 'My Description',
'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}],
'image_type': 'PDF',
'packages': [{'height': 8, 'length': 7, 'weight': 4.3, 'width': 7}],
'password': 'YOUR_PASSWORD',
'service': 'PRIORITY',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_contact': 'John Doe',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': 'PSC 556 BOX 177',
'to_city': 'APO',
'to_code': '96386',
'to_country': 'US',
'to_name': 'CPT JOHN DOE',
'to_phone': '1231231234',
'to_state': 'AP',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"USPS-eVS",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"packages"=>[{"weight"=>4.3, "length"=>7, "width"=>7, "height"=>8}],
"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_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}],
"service"=>"PRIORITY",
"shipper"=>"RocketShipIt",
"ship_contact"=>"John Doe",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_phone"=>"1231231234",
"ship_country"=>"US",
"to_name"=>"CPT JOHN DOE",
"to_addr1"=>"PSC 556 BOX 177",
"to_state"=>"AP",
"to_city"=>"APO",
"to_code"=>"96386",
"to_phone"=>"1231231234",
"to_country"=>"US",
"image_type"=>"PDF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "USPS-eVS",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 4.3,
"length": 7,
"width": 7,
"height": 8
}
],
"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_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
}
],
"service": "PRIORITY",
"shipper": "RocketShipIt",
"ship_contact": "John Doe",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "CPT JOHN DOE",
"to_addr1": "PSC 556 BOX 177",
"to_state": "AP",
"to_city": "APO",
"to_code": "96386",
"to_phone": "1231231234",
"to_country": "US",
"image_type": "PDF",
"test": true
}
}
)
USPS-eVS - Label Express Mail International
{
"carrier": "USPS-eVS",
"action": "SubmitShipment",
"params": {
"test": true,
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"service": "US-EMI",
"customs_content_type": "SAMPLE",
"packages": [
{
"weight": 4.3,
"length": 7,
"width": 7,
"height": 8
}
],
"customs": [
{
"customs_quantity_units": "EA",
"customs_quantity": 1,
"customs_value": 50.00,
"country_of_manufacture": "US",
"customs_weight": 2,
"customs_description": "My Description"
},
{
"customs_quantity_units": "EA",
"customs_quantity": 1,
"customs_value": 50.00,
"country_of_manufacture": "US",
"customs_weight": 2,
"customs_description": "My Description",
"number_of_packages_per_commodity": 2
}
],
"shipper": "RocketShipIt",
"ship_contact": "John Doe",
"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": "2000 Meadowvale Rd",
"to_state": "ON",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_phone": "1231231234",
"to_country": "CA",
"image_type": "PDF"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'USPS-eVS',
'action' => 'SubmitShipment',
'params' =>
array (
'test' => true,
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'service' => 'US-EMI',
'customs_content_type' => 'SAMPLE',
'packages' =>
array (
0 =>
array (
'weight' => 4.3,
'length' => 7,
'width' => 7,
'height' => 8,
),
),
'customs' =>
array (
0 =>
array (
'customs_quantity_units' => 'EA',
'customs_quantity' => 1,
'customs_value' => 50.0,
'country_of_manufacture' => 'US',
'customs_weight' => 2,
'customs_description' => 'My Description',
),
1 =>
array (
'customs_quantity_units' => 'EA',
'customs_quantity' => 1,
'customs_value' => 50.0,
'country_of_manufacture' => 'US',
'customs_weight' => 2,
'customs_description' => 'My Description',
'number_of_packages_per_commodity' => 2,
),
),
'shipper' => 'RocketShipIt',
'ship_contact' => 'John Doe',
'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' => '2000 Meadowvale Rd',
'to_state' => 'ON',
'to_city' => 'Toronto',
'to_code' => 'M1B5K7',
'to_phone' => '1231231234',
'to_country' => 'CA',
'image_type' => 'PDF',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'USPS-eVS',
'params': {'customs': [{'country_of_manufacture': 'US',
'customs_description': 'My Description',
'customs_quantity': 1,
'customs_quantity_units': 'EA',
'customs_value': 50.0,
'customs_weight': 2},
{'country_of_manufacture': 'US',
'customs_description': 'My Description',
'customs_quantity': 1,
'customs_quantity_units': 'EA',
'customs_value': 50.0,
'customs_weight': 2,
'number_of_packages_per_commodity': 2}],
'customs_content_type': 'SAMPLE',
'image_type': 'PDF',
'packages': [{'height': 8, 'length': 7, 'weight': 4.3, 'width': 7}],
'password': 'YOUR_PASSWORD',
'service': 'US-EMI',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_contact': 'John Doe',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '2000 Meadowvale Rd',
'to_city': 'Toronto',
'to_code': 'M1B5K7',
'to_country': 'CA',
'to_name': 'JOHN DOE',
'to_phone': '1231231234',
'to_state': 'ON',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"USPS-eVS",
"action"=>"SubmitShipment",
"params"=>
{"test"=>true,
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"service"=>"US-EMI",
"customs_content_type"=>"SAMPLE",
"packages"=>[{"weight"=>4.3, "length"=>7, "width"=>7, "height"=>8}],
"customs"=>
[{"customs_quantity_units"=>"EA",
"customs_quantity"=>1,
"customs_value"=>50.0,
"country_of_manufacture"=>"US",
"customs_weight"=>2,
"customs_description"=>"My Description"},
{"customs_quantity_units"=>"EA",
"customs_quantity"=>1,
"customs_value"=>50.0,
"country_of_manufacture"=>"US",
"customs_weight"=>2,
"customs_description"=>"My Description",
"number_of_packages_per_commodity"=>2}],
"shipper"=>"RocketShipIt",
"ship_contact"=>"John Doe",
"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"=>"2000 Meadowvale Rd",
"to_state"=>"ON",
"to_city"=>"Toronto",
"to_code"=>"M1B5K7",
"to_phone"=>"1231231234",
"to_country"=>"CA",
"image_type"=>"PDF"}}
)
rocketshipit.request(
{
"carrier": "USPS-eVS",
"action": "SubmitShipment",
"params": {
"test": true,
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"service": "US-EMI",
"customs_content_type": "SAMPLE",
"packages": [
{
"weight": 4.3,
"length": 7,
"width": 7,
"height": 8
}
],
"customs": [
{
"customs_quantity_units": "EA",
"customs_quantity": 1,
"customs_value": 50.00,
"country_of_manufacture": "US",
"customs_weight": 2,
"customs_description": "My Description"
},
{
"customs_quantity_units": "EA",
"customs_quantity": 1,
"customs_value": 50.00,
"country_of_manufacture": "US",
"customs_weight": 2,
"customs_description": "My Description",
"number_of_packages_per_commodity": 2
}
],
"shipper": "RocketShipIt",
"ship_contact": "John Doe",
"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": "2000 Meadowvale Rd",
"to_state": "ON",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_phone": "1231231234",
"to_country": "CA",
"image_type": "PDF"
}
}
)
USPS-eVS - Label First Class Mail International
{
"carrier": "USPS-eVS",
"action": "SubmitShipment",
"params": {
"test": true,
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"service": "US-FCI",
"customs_content_type": "SAMPLE",
"packages": [
{
"weight": 3,
"length": 7,
"width": 7,
"height": 8
}
],
"customs": [
{
"customs_quantity_units": "EA",
"customs_quantity": 1,
"customs_value": 50.00,
"country_of_manufacture": "US",
"customs_weight": 2,
"customs_description": "My Description"
}
],
"shipper": "RocketShipIt",
"ship_contact": "John Doe",
"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": "2000 Meadowvale Rd",
"to_state": "ON",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_phone": "1231231234",
"to_country": "CA",
"image_type": "PDF"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'USPS-eVS',
'action' => 'SubmitShipment',
'params' =>
array (
'test' => true,
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'service' => 'US-FCI',
'customs_content_type' => 'SAMPLE',
'packages' =>
array (
0 =>
array (
'weight' => 3,
'length' => 7,
'width' => 7,
'height' => 8,
),
),
'customs' =>
array (
0 =>
array (
'customs_quantity_units' => 'EA',
'customs_quantity' => 1,
'customs_value' => 50.0,
'country_of_manufacture' => 'US',
'customs_weight' => 2,
'customs_description' => 'My Description',
),
),
'shipper' => 'RocketShipIt',
'ship_contact' => 'John Doe',
'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' => '2000 Meadowvale Rd',
'to_state' => 'ON',
'to_city' => 'Toronto',
'to_code' => 'M1B5K7',
'to_phone' => '1231231234',
'to_country' => 'CA',
'image_type' => 'PDF',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'USPS-eVS',
'params': {'customs': [{'country_of_manufacture': 'US',
'customs_description': 'My Description',
'customs_quantity': 1,
'customs_quantity_units': 'EA',
'customs_value': 50.0,
'customs_weight': 2}],
'customs_content_type': 'SAMPLE',
'image_type': 'PDF',
'packages': [{'height': 8, 'length': 7, 'weight': 3, 'width': 7}],
'password': 'YOUR_PASSWORD',
'service': 'US-FCI',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_contact': 'John Doe',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '2000 Meadowvale Rd',
'to_city': 'Toronto',
'to_code': 'M1B5K7',
'to_country': 'CA',
'to_name': 'JOHN DOE',
'to_phone': '1231231234',
'to_state': 'ON',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"USPS-eVS",
"action"=>"SubmitShipment",
"params"=>
{"test"=>true,
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"service"=>"US-FCI",
"customs_content_type"=>"SAMPLE",
"packages"=>[{"weight"=>3, "length"=>7, "width"=>7, "height"=>8}],
"customs"=>
[{"customs_quantity_units"=>"EA",
"customs_quantity"=>1,
"customs_value"=>50.0,
"country_of_manufacture"=>"US",
"customs_weight"=>2,
"customs_description"=>"My Description"}],
"shipper"=>"RocketShipIt",
"ship_contact"=>"John Doe",
"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"=>"2000 Meadowvale Rd",
"to_state"=>"ON",
"to_city"=>"Toronto",
"to_code"=>"M1B5K7",
"to_phone"=>"1231231234",
"to_country"=>"CA",
"image_type"=>"PDF"}}
)
rocketshipit.request(
{
"carrier": "USPS-eVS",
"action": "SubmitShipment",
"params": {
"test": true,
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"service": "US-FCI",
"customs_content_type": "SAMPLE",
"packages": [
{
"weight": 3,
"length": 7,
"width": 7,
"height": 8
}
],
"customs": [
{
"customs_quantity_units": "EA",
"customs_quantity": 1,
"customs_value": 50.00,
"country_of_manufacture": "US",
"customs_weight": 2,
"customs_description": "My Description"
}
],
"shipper": "RocketShipIt",
"ship_contact": "John Doe",
"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": "2000 Meadowvale Rd",
"to_state": "ON",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_phone": "1231231234",
"to_country": "CA",
"image_type": "PDF"
}
}
)
USPS-eVS - Label Priority Mail International
{
"carrier": "USPS-eVS",
"action": "SubmitShipment",
"params": {
"test": true,
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"service": "US-PMI",
"customs_content_type": "SAMPLE",
"packages": [
{
"weight": 4.3,
"length": 7,
"width": 7,
"height": 8
}
],
"customs": [
{
"customs_quantity_units": "EA",
"customs_quantity": 1,
"customs_value": 50.00,
"country_of_manufacture": "US",
"customs_weight": 2,
"customs_description": "My Description"
},
{
"customs_quantity_units": "EA",
"customs_quantity": 1,
"customs_value": 50.00,
"country_of_manufacture": "US",
"customs_weight": 2,
"customs_description": "My Description",
"number_of_packages_per_commodity": 2
}
],
"shipper": "RocketShipIt",
"ship_contact": "John Doe",
"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": "2000 Meadowvale Rd",
"to_state": "ON",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_phone": "1231231234",
"to_country": "CA",
"image_type": "PDF"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'USPS-eVS',
'action' => 'SubmitShipment',
'params' =>
array (
'test' => true,
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'service' => 'US-PMI',
'customs_content_type' => 'SAMPLE',
'packages' =>
array (
0 =>
array (
'weight' => 4.3,
'length' => 7,
'width' => 7,
'height' => 8,
),
),
'customs' =>
array (
0 =>
array (
'customs_quantity_units' => 'EA',
'customs_quantity' => 1,
'customs_value' => 50.0,
'country_of_manufacture' => 'US',
'customs_weight' => 2,
'customs_description' => 'My Description',
),
1 =>
array (
'customs_quantity_units' => 'EA',
'customs_quantity' => 1,
'customs_value' => 50.0,
'country_of_manufacture' => 'US',
'customs_weight' => 2,
'customs_description' => 'My Description',
'number_of_packages_per_commodity' => 2,
),
),
'shipper' => 'RocketShipIt',
'ship_contact' => 'John Doe',
'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' => '2000 Meadowvale Rd',
'to_state' => 'ON',
'to_city' => 'Toronto',
'to_code' => 'M1B5K7',
'to_phone' => '1231231234',
'to_country' => 'CA',
'image_type' => 'PDF',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'USPS-eVS',
'params': {'customs': [{'country_of_manufacture': 'US',
'customs_description': 'My Description',
'customs_quantity': 1,
'customs_quantity_units': 'EA',
'customs_value': 50.0,
'customs_weight': 2},
{'country_of_manufacture': 'US',
'customs_description': 'My Description',
'customs_quantity': 1,
'customs_quantity_units': 'EA',
'customs_value': 50.0,
'customs_weight': 2,
'number_of_packages_per_commodity': 2}],
'customs_content_type': 'SAMPLE',
'image_type': 'PDF',
'packages': [{'height': 8, 'length': 7, 'weight': 4.3, 'width': 7}],
'password': 'YOUR_PASSWORD',
'service': 'US-PMI',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_contact': 'John Doe',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '2000 Meadowvale Rd',
'to_city': 'Toronto',
'to_code': 'M1B5K7',
'to_country': 'CA',
'to_name': 'JOHN DOE',
'to_phone': '1231231234',
'to_state': 'ON',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"USPS-eVS",
"action"=>"SubmitShipment",
"params"=>
{"test"=>true,
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"service"=>"US-PMI",
"customs_content_type"=>"SAMPLE",
"packages"=>[{"weight"=>4.3, "length"=>7, "width"=>7, "height"=>8}],
"customs"=>
[{"customs_quantity_units"=>"EA",
"customs_quantity"=>1,
"customs_value"=>50.0,
"country_of_manufacture"=>"US",
"customs_weight"=>2,
"customs_description"=>"My Description"},
{"customs_quantity_units"=>"EA",
"customs_quantity"=>1,
"customs_value"=>50.0,
"country_of_manufacture"=>"US",
"customs_weight"=>2,
"customs_description"=>"My Description",
"number_of_packages_per_commodity"=>2}],
"shipper"=>"RocketShipIt",
"ship_contact"=>"John Doe",
"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"=>"2000 Meadowvale Rd",
"to_state"=>"ON",
"to_city"=>"Toronto",
"to_code"=>"M1B5K7",
"to_phone"=>"1231231234",
"to_country"=>"CA",
"image_type"=>"PDF"}}
)
rocketshipit.request(
{
"carrier": "USPS-eVS",
"action": "SubmitShipment",
"params": {
"test": true,
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"service": "US-PMI",
"customs_content_type": "SAMPLE",
"packages": [
{
"weight": 4.3,
"length": 7,
"width": 7,
"height": 8
}
],
"customs": [
{
"customs_quantity_units": "EA",
"customs_quantity": 1,
"customs_value": 50.00,
"country_of_manufacture": "US",
"customs_weight": 2,
"customs_description": "My Description"
},
{
"customs_quantity_units": "EA",
"customs_quantity": 1,
"customs_value": 50.00,
"country_of_manufacture": "US",
"customs_weight": 2,
"customs_description": "My Description",
"number_of_packages_per_commodity": 2
}
],
"shipper": "RocketShipIt",
"ship_contact": "John Doe",
"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": "2000 Meadowvale Rd",
"to_state": "ON",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_phone": "1231231234",
"to_country": "CA",
"image_type": "PDF"
}
}
)
USPS-eVS - Void
{
"carrier": "USPS-eVS",
"action": "VoidShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'USPS-eVS',
'action' => 'VoidShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'test' => true,
),
)
);
rs.request(
{'action': 'VoidShipment',
'carrier': 'USPS-eVS',
'params': {'password': 'YOUR_PASSWORD',
'test': True,
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"USPS-eVS",
"action"=>"VoidShipment",
"params"=>
{"username"=>"YOUR_USERNAME", "password"=>"YOUR_PASSWORD", "test"=>true}}
)
rocketshipit.request(
{
"carrier": "USPS-eVS",
"action": "VoidShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"test": true
}
}
)