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(
{u'action': u'GetAllRates',
u'carrier': u'amazon-mws',
u'params': {u'key': u'YOUR_SELLER_ID',
u'order': {u'id': u'111-7676169-9674624',
u'items': [{u'id': u'28367575711066',
u'quantity': 1}]},
u'packages': [{u'height': 5,
u'length': 5,
u'weight': 5,
u'width': 5}],
u'password': u'YOUR_SECRET_KEY',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_email': u'john@doe.com',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'username': u'YOUR_ACCESS_KEY_ID',
u'weight_unit': u'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": 5,
"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",
"to_name": "John Doe",
"to_addr1": "73 Harbord Street",
"to_state": "ON",
"to_city": "Toronto",
"to_code": "M5S1G4",
"to_phone": "1231231234",
"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' => 5,
'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',
'to_name' => 'John Doe',
'to_addr1' => '73 Harbord Street',
'to_state' => 'ON',
'to_city' => 'Toronto',
'to_code' => 'M5S1G4',
'to_phone' => '1231231234',
'test' => true,
),
)
);
rs.request(
{u'action': u'SubmitShipment',
u'carrier': u'Asendia',
u'params': {u'account_number': u'YOUR_ASENDIA_ACCOUNT_NUMBER',
u'customs': [{u'customs_description': u'foo',
u'customs_quantity': 2,
u'invoice_line_part_number': u'abc123',
u'invoice_line_value': u'10.00'}],
u'key': u'YOUR_ASENDIA_API_KEY',
u'meter_number': u'YOUR_ASENDIA_DATA_SOURCE',
u'monetary_value': 20.0,
u'packages': [{u'height': 5,
u'length': 5,
u'weight': 5,
u'width': 5}],
u'password': u'YOUR_ASENDIA_PASSWORD',
u'service': u'A105',
u'ship_addr1': u'5333 Zoo Dr',
u'ship_city': u'Los Angeles',
u'ship_code': u'90027',
u'ship_phone': u'1231231234',
u'ship_state': u'CA',
u'shipper': u'TEST LABEL',
u'test': True,
u'to_addr1': u'73 Harbord Street',
u'to_city': u'Toronto',
u'to_code': u'M5S1G4',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'ON',
u'username': u'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"=>5, "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",
"to_name"=>"John Doe",
"to_addr1"=>"73 Harbord Street",
"to_state"=>"ON",
"to_city"=>"Toronto",
"to_code"=>"M5S1G4",
"to_phone"=>"1231231234",
"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": 5,
"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",
"to_name": "John Doe",
"to_addr1": "73 Harbord Street",
"to_state": "ON",
"to_city": "Toronto",
"to_code": "M5S1G4",
"to_phone": "1231231234",
"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(
{u'action': u'GetAllRates',
u'carrier': u'asendia',
u'params': {u'account_number': u'YOUR_ASENDIA_ACCOUNT_NUMBER',
u'key': u'YOUR_ASENDIA_API_KEY',
u'length_unit': u'IN',
u'meter_number': u'YOUR_ASENDIA_DATA_SOURCE',
u'packages': [{u'height': 5,
u'length': 5,
u'weight': 5,
u'width': 5}],
u'packaging_type': u'02',
u'password': u'YOUR_ASENDIA_PASSWORD',
u'pickup_type': u'01',
u'ship_country': u'US',
u'to_code': u'V4W1N7',
u'to_country': u'CA',
u'username': u'YOUR_ASENDIA_USERNAME',
u'weight_unit': u'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"
}
}
)
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(
{u'batch': [{u'request': {u'action': u'GetAllRates',
u'carrier': u'UPS',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'customer_classification': u'01',
u'customs': [],
u'key': u'YOUR_UPS_API_KEY',
u'length_unit': u'IN',
u'packages': [{u'height': 5,
u'length': 5,
u'weight': 5,
u'width': 5}],
u'packaging_type': u'02',
u'password': u'YOUR_PASSWORD',
u'pickup_type': u'01',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'to_code': u'90210',
u'to_country': u'US',
u'username': u'YOUR_USERNAME',
u'weight_unit': u'LBS'}},
u'request_id': u'UPS Rates'},
{u'request': {u'action': u'GetAllRates',
u'carrier': u'USPS',
u'params': {u'packages': [{u'weight': 6}],
u'ship_code': u'59759',
u'to_code': u'90210',
u'username': u'YOUR_USERNAME'}},
u'request_id': u'USPS Rates'},
{u'request': {u'action': u'GetAllRates',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'customs': [],
u'dropoff_type': u'REGULAR_PICKUP',
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'negotiated_rates': True,
u'packages': [{u'weight': 2}],
u'packaging_type': u'YOUR_PACKAGING',
u'password': u'YOUR_PASSWORD',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_code': u'90210',
u'to_country': u'US',
u'weight_unit': u'LB'}},
u'request_id': u'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(
{u'action': u'Authenticate',
u'carrier': u'CHRobinson',
u'params': {u'client_id': u'your-client-id',
u'client_secret': u'your-client-secret',
u'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(
{u'action': u'GetAllRates',
u'carrier': u'CHRobinson',
u'params': {u'account_number': u'1231234',
u'customs': [],
u'key': u'your-key-from-authenticate-request',
u'packages': [{u'freight_class': u'50', u'weight': 200}],
u'ship_addr1': u'14800 Charlson Rd',
u'ship_addr2': u'Building 1',
u'ship_city': u'Eden Prairie',
u'ship_code': u'55347',
u'ship_country': u'US',
u'ship_date': u'2024-01-22',
u'ship_state': u'MN',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'800 Washington Avenue North',
u'to_city': u'Minneapolis',
u'to_code': u'55401',
u'to_country': u'US',
u'to_state': u'MN',
u'weight_unit': u'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(
{u'action': u'Track',
u'carrier': u'CHRobinson',
u'params': {u'account_number': u'your-account-number',
u'key': u'your-key-from-authenticate-request',
u'test': True,
u'tracking_number': u'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(
{u'action': u'CreateManifest',
u'carrier': u'Canada',
u'params': {u'account_number': u'2004381',
u'contract_id': u'42708517',
u'group_ids': [u'5432', u'1234'],
u'image_type': u'PDF',
u'password': u'0bfa9fcb9853d1f51ee57a',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Ottawa',
u'ship_code': u'K1A0B1',
u'ship_country': u'CA',
u'ship_phone': u'1231231234',
u'ship_state': u'ON',
u'shipper': u'RocketShipIt',
u'test': True,
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'canada',
u'params': {u'packages': [{u'height': 5,
u'length': 7,
u'weight': 4,
u'width': 5}],
u'service': u'DOM.EP',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Ottawa',
u'ship_code': u'K1A0B1',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'ON',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'361A Old Finch Avenue',
u'to_addr2': u'#103',
u'to_city': u'Toronto',
u'to_code': u'M1B5K7',
u'to_country': u'CA',
u'to_name': u'John Doe',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'canada',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'customs': [{u'customs_description': u'books',
u'customs_line_amount': 10.0,
u'customs_quantity': 2,
u'customs_quantity_units': u'EA',
u'customs_weight': 4}],
u'packages': [{u'height': 5,
u'length': 7,
u'weight': 30,
u'width': 5}],
u'password': u'YOUR_PASSWORD',
u'reason_for_export': u'SOG',
u'service': u'USA.EP',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Ottawa',
u'ship_code': u'K1A0B1',
u'ship_country': u'CA',
u'ship_phone': u'1231231234',
u'ship_state': u'ON',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'940 Presidio Ave',
u'to_addr2': u'103',
u'to_city': u'San Francisco',
u'to_code': u'94115',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_phone': u'123-123-1234',
u'to_state': u'CA',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'Canada',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'packages': [{u'weight': 2}],
u'password': u'YOUR_PASSWORD',
u'return_code': u'PRINT_RETURN_LABEL',
u'service': u'DOM.EP',
u'ship_addr1': u'2701 Return Avenue',
u'ship_city': u'Ottawa',
u'ship_code': u'K1A0B1',
u'ship_country': u'CA',
u'ship_name': u'Jane Doe Returner',
u'ship_state': u'ON',
u'shipper': u'Capsule Corp.',
u'test': True,
u'to_addr1': u'2701 Riverside Drive',
u'to_city': u'Ottawa',
u'to_code': u'K1A0B1',
u'to_company': u'Receiver of Return',
u'to_country': u'CA',
u'to_name': u'John Doe',
u'to_state': u'ON',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'Canada',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'packages': [{u'reference_value': u'my reference value',
u'reference_value2': u'another reference',
u'weight': 2}],
u'password': u'YOUR_PASSWORD',
u'return_code': u'PRINT_RETURN_LABEL',
u'service': u'DOM.EP',
u'ship_addr1': u'2701 Return Avenue',
u'ship_city': u'Ottawa',
u'ship_code': u'K1A0B1',
u'ship_country': u'CA',
u'ship_name': u'Jane Doe Returner',
u'ship_state': u'ON',
u'shipper': u'Capsule Corp.',
u'test': True,
u'to_addr1': u'2701 Riverside Drive',
u'to_city': u'Ottawa',
u'to_code': u'K1A0B1',
u'to_company': u'Receiver of Return',
u'to_country': u'CA',
u'to_name': u'John Doe',
u'to_state': u'ON',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'canada',
u'params': {u'account_number': u'2004381',
u'billing': [{u'account': u'1234567',
u'payment_type': u'third_party',
u'type': u'transportation'}],
u'contract_id': u'42708517',
u'packages': [{u'height': 5,
u'length': 7,
u'weight': 4,
u'width': 5}],
u'password': u'0bfa9fcb9853d1f51ee57a',
u'service': u'DOM.EP',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Ottawa',
u'ship_code': u'K1A0B1',
u'ship_country': u'CA',
u'ship_phone': u'1231231234',
u'ship_state': u'ON',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'361A Old Finch Avenue',
u'to_addr2': u'#103',
u'to_city': u'Toronto',
u'to_code': u'M1B5K7',
u'to_country': u'CA',
u'to_name': u'John Doe',
u'to_state': u'ON',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'canada',
u'params': {u'account_number': u'2004381',
u'addons': [u'PA19'],
u'contract_id': u'42708517',
u'packages': [{u'height': 5,
u'length': 7,
u'signature_type': u'DIRECT',
u'weight': 4,
u'width': 5}],
u'password': u'0bfa9fcb9853d1f51ee57a',
u'service': u'DOM.EP',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Ottawa',
u'ship_code': u'K1A0B1',
u'ship_country': u'CA',
u'ship_phone': u'1231231234',
u'ship_state': u'ON',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'361A Old Finch Avenue',
u'to_addr2': u'#103',
u'to_city': u'Toronto',
u'to_code': u'M1B5K7',
u'to_country': u'CA',
u'to_name': u'John Doe',
u'to_state': u'ON',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'canada',
u'params': {u'account_number': u'2004381',
u'contract_id': u'42708517',
u'packages': [{u'height': 5,
u'length': 7,
u'signature_type': u'DIRECT',
u'weight': 4,
u'width': 5}],
u'password': u'0bfa9fcb9853d1f51ee57a',
u'service': u'DOM.EP',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Ottawa',
u'ship_code': u'K1A0B1',
u'ship_country': u'CA',
u'ship_phone': u'1231231234',
u'ship_state': u'ON',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'361A Old Finch Avenue',
u'to_addr2': u'#103',
u'to_city': u'Toronto',
u'to_code': u'M1B5K7',
u'to_country': u'CA',
u'to_name': u'John Doe',
u'to_state': u'ON',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'canada',
u'params': {u'account_number': u'2004381',
u'contract_id': u'42708517',
u'packages': [{u'height': 5,
u'length': 7,
u'weight': 4,
u'width': 5}],
u'password': u'0bfa9fcb9853d1f51ee57a',
u'service': u'DOM.EP',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Ottawa',
u'ship_code': u'K1A0B1',
u'ship_country': u'CA',
u'ship_phone': u'1231231234',
u'ship_state': u'ON',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'361A Old Finch Avenue',
u'to_addr2': u'#103',
u'to_city': u'Toronto',
u'to_code': u'M1B5K7',
u'to_country': u'CA',
u'to_name': u'John Doe',
u'to_state': u'ON',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'canada',
u'params': {u'account_number': u'2004381',
u'contract_id': u'42708517',
u'image_type': u'ZPL',
u'packages': [{u'height': 5,
u'length': 7,
u'weight': 4,
u'width': 5}],
u'password': u'0bfa9fcb9853d1f51ee57a',
u'service': u'DOM.EP',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Ottawa',
u'ship_code': u'K1A0B1',
u'ship_country': u'CA',
u'ship_phone': u'1231231234',
u'ship_state': u'ON',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'361A Old Finch Avenue',
u'to_addr2': u'#103',
u'to_city': u'Toronto',
u'to_code': u'M1B5K7',
u'to_country': u'CA',
u'to_name': u'John Doe',
u'to_state': u'ON',
u'username': u'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(
{u'action': u'CancelPickup',
u'carrier': u'Canada',
u'params': {u'pickup_id': u'00110215', u'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(
{u'action': u'CreatePickup',
u'carrier': u'Canada',
u'params': {u'close_time': u'17:00',
u'contract_id': u'YOUR CONTRACT ID',
u'pickup_addr1': u'123 Main St',
u'pickup_city': u'Vancouver',
u'pickup_code': u'V4W1N7',
u'pickup_company_name': u'Acme Inc',
u'pickup_contact_name': u'Mark Sanborn',
u'pickup_country': u'US',
u'pickup_date': u'2019-06-20',
u'pickup_email': u'john.doe@example.com',
u'pickup_phone': u'123-123-1234',
u'pickup_quantity': 1,
u'pickup_state': u'BC',
u'ready_time': u'15:00',
u'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(
{u'action': u'PickupStatus', u'carrier': u'Canada', u'params': {u'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(
{u'action': u'GetAllRates',
u'carrier': u'canada',
u'params': {u'customs': [],
u'length_unit': u'CM',
u'packages': [{u'height': 26,
u'length': 6,
u'weight': 2,
u'width': 16}],
u'ship_code': u'V7A4M1',
u'ship_country': u'CA',
u'ship_state': u'BC',
u'shipper': u'John Doe',
u'test': True,
u'to_code': u'L3R9W6',
u'to_country': u'CA',
u'to_state': u'ON',
u'weight_unit': u'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(
{u'action': u'GetAllRates',
u'carrier': u'canada',
u'params': {u'customs': [],
u'packages': [{u'height': 5,
u'length': 5,
u'weight': 5,
u'width': 5}],
u'ship_city': u'BELLEVILLE',
u'ship_code': u'K8N5W6',
u'to_code': u'90210',
u'to_country': u'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(
{u'action': u'GetAllRates',
u'carrier': u'canada',
u'params': {u'customs': [],
u'packages': [{u'height': 5,
u'insured_value': 700,
u'length': 5,
u'weight': 5,
u'width': 5}],
u'ship_city': u'BELLEVILLE',
u'ship_code': u'K8N5W6',
u'to_code': u'90210',
u'to_country': u'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(
{u'action': u'track',
u'carrier': u'canada',
u'params': {u'password': u'YOUR_PASSWORD',
u'test': True,
u'tracking_number': u'1371134583769923',
u'username': u'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(
{u'action': u'VoidShipment',
u'carrier': u'canada',
u'params': {u'password': u'YOUR_PASSWORD',
u'ship_email': u'me@mycompany.com',
u'shipment_id': u'GT12345678RT',
u'test': True,
u'username': u'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(
{u'action': u'CreateManifest',
u'carrier': u'dhl-globalmail',
u'params': {u'key': u'YOUR_CLIENT_ID',
u'password': u'YOUR_PASSWORD',
u'pickup_location': u'5300000',
u'shipment_ids': [u'99999999999999999999999999999'],
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'DHL-GlobalMail',
u'params': {u'account_number': u'5337502',
u'customs_value': 10,
u'key': u'YOUR_CLIENT_ID',
u'packages': [{u'weight': 0.3}],
u'password': u'YOUR_PASSWORD',
u'service': u'22',
u'ship_addr1': u'5048 264 St',
u'ship_city': u'Aldergrove',
u'ship_code': u'V4W1N7',
u'ship_phone': u'123-123-1234',
u'ship_state': u'BC',
u'shipper': u'Mr. Returns',
u'to_addr1': u'1234 Main Street',
u'to_city': u'Anytown',
u'to_code': u'30297',
u'to_name': u'Joe Bloggs',
u'to_phone': u'123-123-1234',
u'to_state': u'GA',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'DHL',
u'params': {u'account_number': u'803921577',
u'image_type': u'PDF',
u'packages': [{u'height': 4,
u'length': 7,
u'weight': 4,
u'width': 4}],
u'service': u'N',
u'ship_addr1': u'1401 Park Ave',
u'ship_city': u'Emeryville',
u'ship_code': u'94608',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'CA',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'940 Presidio Ave',
u'to_addr2': u'#103',
u'to_city': u'San Francisco',
u'to_code': u'94115',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'DHL',
u'params': {u'account_number': u'803921577',
u'image_type': u'PDF',
u'notify': [{u'email': u'customer@email.com'}],
u'packages': [{u'height': 4,
u'length': 7,
u'weight': 4,
u'width': 4}],
u'service': u'D',
u'ship_addr1': u'1401 Park Ave',
u'ship_city': u'Emeryville',
u'ship_code': u'94608',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'CA',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'940 Presidio Ave',
u'to_addr2': u'#103',
u'to_city': u'San Francisco',
u'to_code': u'94115',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'DHL-GlobalMail',
u'params': {u'account_number': u'YOUR_ACCOUNT_PICKUP_ID',
u'key': u'YOUR_CLIENT_ID',
u'packages': [{u'weight': 0.3}],
u'password': u'YOUR_PASSWORD',
u'service': u'81',
u'ship_addr1': u'1500 South Point Dr.',
u'ship_city': u'Forrest Park',
u'ship_code': u'30297',
u'ship_phone': u'123-123-1234',
u'ship_state': u'GA',
u'shipper': u'Mr. Returns',
u'to_addr1': u'1234 Main Street',
u'to_city': u'Anytown',
u'to_code': u'30297',
u'to_name': u'Joe Bloggs',
u'to_phone': u'123-123-1234',
u'to_state': u'GA',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'DHL',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'currency': u'EUR',
u'customs_value': 45.99,
u'packages': [{u'height': 8,
u'length': 6,
u'reference_value': u'asdf',
u'weight': 5,
u'width': 7}],
u'password': u'YOUR_PASSWORD',
u'service': u'P',
u'ship_addr1': u'5684 Bay St',
u'ship_city': u'Emeryville',
u'ship_code': u'94608',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'CA',
u'shipment_description': u'Fashion goods',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'2000 Meadowvale Road',
u'to_city': u'Toronto',
u'to_code': u'M1B5K7',
u'to_country': u'CA',
u'to_name': u'Toronto Zoo',
u'to_phone': u'1231231234',
u'to_state': u'MB',
u'trade_terms': u'DAP',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'DHL',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'currency': u'EUR',
u'customs': [{u'commodity_code': u'cc',
u'commodity_name': u'cn',
u'customs_line_amount': 45.99,
u'customs_origin_country': u'CA',
u'customs_quantity': 1,
u'customs_quantity_units': u'EA',
u'customs_weight': 10,
u'invoice_line_description': u'My Description',
u'invoice_line_number': u'1',
u'invoice_line_part_number': u'123'}],
u'customs_forms': u'CMI',
u'customs_value': 45.99,
u'invoice': u'123',
u'invoice_date': u'2019-03-19',
u'packages': [{u'height': 8,
u'length': 6,
u'weight': 5,
u'width': 7}],
u'password': u'YOUR_PASSWORD',
u'reference_value': u'asdf',
u'service': u'P',
u'ship_addr1': u'5684 Bay St',
u'ship_city': u'Emeryville',
u'ship_code': u'94608',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'CA',
u'shipment_description': u'Fashion goods',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'2000 Meadowvale Road',
u'to_city': u'Toronto',
u'to_code': u'M1B5K7',
u'to_country': u'CA',
u'to_name': u'Toronto Zoo',
u'to_phone': u'1231231234',
u'to_state': u'MB',
u'trade_terms': u'DAP',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'DHL',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'addons': [u'DD'],
u'currency': u'EUR',
u'customs': [{u'commodity_code': u'cc',
u'commodity_name': u'cn',
u'customs_line_amount': 45.99,
u'customs_origin_country': u'CA',
u'customs_quantity': 1,
u'customs_quantity_units': u'EA',
u'customs_weight': 10,
u'invoice_line_description': u'My Description',
u'invoice_line_number': u'1',
u'invoice_line_part_number': u'123'}],
u'customs_account_number': u'1234',
u'customs_forms': u'CMI',
u'customs_payment_type': u'SENDER',
u'customs_value': 45.99,
u'invoice': u'123',
u'invoice_date': u'2019-03-19',
u'packages': [{u'height': 8,
u'length': 6,
u'weight': 5,
u'width': 7}],
u'password': u'YOUR_PASSWORD',
u'reference_value': u'asdf',
u'service': u'P',
u'ship_addr1': u'5684 Bay St',
u'ship_city': u'Emeryville',
u'ship_code': u'94608',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'CA',
u'shipment_description': u'Fashion goods',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'2000 Meadowvale Road',
u'to_city': u'Toronto',
u'to_code': u'M1B5K7',
u'to_country': u'CA',
u'to_name': u'Toronto Zoo',
u'to_phone': u'1231231234',
u'to_state': u'MB',
u'trade_terms': u'DAP',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'DHL',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'addons': [u'II'],
u'bill_country': u'XC',
u'billing': [{u'account': u'YOUR BILLING ACCOUNT NUMBER'}],
u'currency': u'USD',
u'customer_classification': u'01',
u'customs': [{u'commodity_code': u'000000',
u'commodity_name': u'cn',
u'country_of_manufacture': u'US',
u'customs_description': u'Acme product 1',
u'customs_hs_tariff': u'000000',
u'customs_line_amount': 79.99,
u'customs_origin_country': u'US',
u'customs_quantity': 1,
u'customs_quantity_units': u'PCS',
u'customs_value': 79.99,
u'customs_weight': 6.0,
u'invoice_line_description': u'Acme product 1'},
{u'commodity_code': u'000000',
u'commodity_name': u'cn',
u'country_of_manufacture': u'US',
u'customs_description': u'Acme Product 1',
u'customs_hs_tariff': u'000000',
u'customs_line_amount': 23.99,
u'customs_origin_country': u'US',
u'customs_quantity': 1,
u'customs_quantity_units': u'PCS',
u'customs_value': 23.99,
u'customs_weight': 6.0,
u'invoice_line_description': u'Acme Product 1'},
{u'commodity_code': u'000000',
u'commodity_name': u'cn',
u'country_of_manufacture': u'US',
u'customs_description': u'Acme Product 1',
u'customs_hs_tariff': u'000000',
u'customs_line_amount': 135.99,
u'customs_origin_country': u'US',
u'customs_quantity': 1,
u'customs_quantity_units': u'PCS',
u'customs_value': 135.99,
u'customs_weight': 6.0,
u'invoice_line_description': u'Acme Product 1'}],
u'customs_forms': u'CMI',
u'customs_payment_type': u'RECEIVER',
u'customs_value': 239.97,
u'image_type': u'pdf',
u'insured_value': 239.97,
u'invoice': u'C-8PDMV3',
u'label_stock_type': u'8X4_thermal',
u'length_unit': u'IN',
u'package_description': u'C-8PDMV3',
u'packages': [{u'height': 13,
u'length': 17,
u'reference_value': u'C-8PDMV3',
u'weight': 18.0,
u'width': 15}],
u'packaging_type': u'02',
u'password': u'YOUR_PASSWORD',
u'pickup_type': u'01',
u'request_archive_doc': True,
u'service': u'P',
u'ship_addr1': u'123 Not a Real Address st',
u'ship_addr2': u'',
u'ship_city': u'Opa-Locka',
u'ship_code': u'33054',
u'ship_contact': u'John Doe',
u'ship_country': u'US',
u'ship_name': u'John Doe',
u'ship_phone': u'+12366288450',
u'ship_state': u'FL',
u'ship_tax_id': u'15724854',
u'ship_tax_id2': u'5432523452342',
u'ship_tax_id_country': u'US',
u'ship_tax_id_country2': u'US',
u'ship_tax_id_type': u'EOR',
u'ship_tax_id_type2': u'VAT',
u'shipment_description': u'Product description',
u'shipper': u'Acme',
u'test': True,
u'to_addr1': u'123 West Bay Road',
u'to_addr2': u'Caribbean Plaza, North Building',
u'to_city': u'George Town',
u'to_code': None,
u'to_country': u'KY',
u'to_name': u'Jane Doe',
u'to_phone': u'+12359286260',
u'to_state': None,
u'to_tax_id': u'15724854',
u'to_tax_id2': u'5432523452342',
u'to_tax_id_country': u'US',
u'to_tax_id_country2': u'US',
u'to_tax_id_type': u'EOR',
u'to_tax_id_type2': u'VAT',
u'trade_terms': u'DDU',
u'username': u'YOUR_USERNAME',
u'weight_unit': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'DHL',
u'params': {u'account_number': u'',
u'currency': u'USD',
u'customs_value': 0,
u'documents_only': True,
u'image_type': u'PDF',
u'local_service': u'E',
u'packages': [{u'height': 1,
u'length': 1,
u'reference_value': u'SYK',
u'weight': 0.5,
u'width': 1}],
u'packaging_type': u'EE',
u'password': u'',
u'request_archive_doc': True,
u'service': u'X',
u'ship_addr1': u'Sanhedria Murchevet 102/8',
u'ship_city': u'Jerusalem',
u'ship_code': u'9770602',
u'ship_contact': u'Your Name',
u'ship_country': u'IL',
u'ship_phone': u'+9723128183524',
u'shipment_description': u'Documents',
u'shipper': u'Your Company',
u'to_addr1': u'1415 E 12TH ST',
u'to_city': u'BROOKLYN',
u'to_code': u'11230-6605',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'NY',
u'trade_terms': u'DAP',
u'username': u''}}
)
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(
{u'action': u'SubmitShipment',
u'carrier': u'DHL',
u'params': {u'account_number': u'803921577',
u'billing': [{u'account': u'abc123',
u'payment_type': u'third_party',
u'type': u'transportation'}],
u'image_type': u'PDF',
u'packages': [{u'height': 4,
u'length': 7,
u'weight': 4,
u'width': 4}],
u'service': u'N',
u'ship_addr1': u'1401 Park Ave',
u'ship_city': u'Emeryville',
u'ship_code': u'94608',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'CA',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'940 Presidio Ave',
u'to_addr2': u'#103',
u'to_city': u'San Francisco',
u'to_code': u'94115',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'DHL',
u'params': {u'account_number': u'803921577',
u'addons': [u'II'],
u'image_type': u'PDF',
u'insured_currenty': u'USD',
u'insured_value': 1000.0,
u'packages': [{u'height': 4,
u'length': 7,
u'weight': 4,
u'width': 4}],
u'service': u'N',
u'ship_addr1': u'1401 Park Ave',
u'ship_city': u'Emeryville',
u'ship_code': u'94608',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'CA',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'940 Presidio Ave',
u'to_addr2': u'#103',
u'to_city': u'San Francisco',
u'to_code': u'94115',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'DHL',
u'params': {u'account_number': u'803921577',
u'image_type': u'PDF',
u'packages': [{u'height': 4,
u'length': 7,
u'weight': 4,
u'width': 4}],
u'request_archive_doc': True,
u'service': u'N',
u'ship_addr1': u'1401 Park Ave',
u'ship_city': u'Emeryville',
u'ship_code': u'94608',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'CA',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'940 Presidio Ave',
u'to_addr2': u'#103',
u'to_city': u'San Francisco',
u'to_code': u'94115',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'DHL',
u'params': {u'account_number': u'803921577',
u'image_type': u'PDF',
u'packages': [{u'height': 1,
u'length': 7,
u'reference_value': u'asdf',
u'weight': 4,
u'width': 1}],
u'service': u'N',
u'ship_addr1': u'1401 Park Ave',
u'ship_city': u'Emeryville',
u'ship_code': u'94608',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'CA',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'940 Presidio Ave',
u'to_addr2': u'#103',
u'to_city': u'San Francisco',
u'to_code': u'94115',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'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(
{u'action': u'CancelPickup',
u'carrier': u'DHL',
u'params': {u'password': u'YOUR_PASSWORD',
u'pickup_id': u'2929AONCALL',
u'test': True,
u'username': u'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(
{u'action': u'CreatePickup',
u'carrier': u'DHL',
u'params': {u'account_number': u'803921577',
u'packages': [{u'height': 10,
u'length': 10,
u'weight': 5,
u'width': 10}],
u'password': u'YOUR_PASSWORD',
u'ship_addr1': u'101 Main st',
u'ship_city': u'San Francisco',
u'ship_code': u'94115',
u'ship_contact': u'John Doe',
u'ship_country': u'US',
u'ship_phone': u'123-123-1234',
u'shipper': u'Acme Inc.',
u'test': True,
u'to_code': u'90210',
u'username': u'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(
{u'action': u'GetAllRates',
u'carrier': u'DHL',
u'params': {u'packages': [{u'weight': 5}],
u'password': u'YOUR_PASSWORD',
u'ship_city': u'San Francisco',
u'ship_code': u'94115',
u'test': True,
u'to_code': u'90210',
u'username': u'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(
{u'action': u'GetAllRates',
u'carrier': u'DHL',
u'params': {u'currency': u'EUR',
u'customs_value': 100.2,
u'length_unit': u'CM',
u'packages': [{u'height': 4.0,
u'length': 15.0,
u'weight': 0.5,
u'width': 10.0}],
u'password': u'YOUR_PASSWORD',
u'ship_addr1': u'Dieselstrasse 5B',
u'ship_city': u'Kronberg',
u'ship_code': u'61476',
u'ship_country': u'DE',
u'shipper': u'Tom1again SRL',
u'test': True,
u'to_code': u'920004',
u'to_country': u'RO',
u'username': u'YOUR_USERNAME',
u'weight_unit': u'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(
{u'action': u'GetAllRates',
u'carrier': u'DHL',
u'params': {u'packages': [{u'weight': 5}, {u'weight': 5}],
u'password': u'YOUR_PASSWORD',
u'ship_city': u'San Francisco',
u'ship_code': u'94115',
u'test': True,
u'to_code': u'90210',
u'username': u'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(
{u'action': u'GetAllRates',
u'carrier': u'DHL',
u'params': {u'packages': [{u'insured_value': 200, u'weight': 5}],
u'password': u'YOUR_PASSWORD',
u'ship_city': u'San Francisco',
u'ship_code': u'94115',
u'test': True,
u'to_code': u'90210',
u'username': u'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(
{u'action': u'timeintransit',
u'carrier': u'DHL',
u'params': {u'currency': u'USD',
u'customs_value': 5000,
u'pickup_date': u'2018-06-25',
u'ready_time': u'0900',
u'ship_code': u'90210',
u'ship_contact': u'Mark Sanborn',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'CA',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_code': u'90210',
u'to_country': u'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(
{u'action': u'Track',
u'carrier': u'DHL',
u'params': {u'password': u'YOUR_PASSWORD',
u'test': True,
u'tracking_number': u'123456789',
u'username': u'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(
{u'action': u'CreateManifest',
u'carrier': u'DHL-ecommerce',
u'params': {u'account_number': u'YOUR_DHL_PICKUP_ID',
u'password': u'YOUR_DHL_CLIENT_SECRET',
u'shipment_ids': [u'PRCDZNRTDDIYKACEBKUMJQ'],
u'test': True,
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'DHL-ecommerce',
u'params': {u'account_number': u'YOUR_DHL_PICKUP_ID',
u'customs': [{u'commodity_code': u'000000',
u'invoice_line_description': u'Acme product 1',
u'invoice_line_origin_country_code': u'US',
u'invoice_line_part_number': u'abc123',
u'invoice_line_value': u'2.00'}],
u'monetary_value': 10.0,
u'packages': [{u'weight': 0.3}],
u'password': u'YOUR_DHL_CLIENT_SECRET',
u'service': u'PLT',
u'ship_addr1': u'1500 South Point Dr.',
u'ship_city': u'Forrest Park',
u'ship_code': u'30297',
u'ship_contact': u'John Smith',
u'ship_phone': u'123-123-1234',
u'ship_state': u'GA',
u'shipper': u'Mr. Returns',
u'to_addr1': u'5048 - 264th Street',
u'to_city': u'Aldergrove',
u'to_code': u'V4W1N7',
u'to_country': u'CA',
u'to_name': u'Joe Bloggs',
u'to_phone': u'123-123-1234',
u'to_state': u'BC',
u'username': u'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(
{u'action': u'GetAllRates',
u'carrier': u'DHL-ecommerce',
u'params': {u'account_number': u'YOUR_DHL_PICKUP_ID',
u'customer_classification': u'01',
u'customs': [],
u'length_unit': u'IN',
u'packages': [{u'height': 5,
u'length': 5,
u'weight': 5,
u'width': 5}],
u'packaging_type': u'02',
u'password': u'YOUR_DHL_CLIENT_SECRET',
u'pickup_type': u'01',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_code': u'90210',
u'to_country': u'US',
u'username': u'YOUR_DHL_CLIENT_ID',
u'weight_unit': u'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(
{u'action': u'Track',
u'carrier': u'DHL-ecommerce',
u'params': {u'account_number': u'YOUR_DHL_PICKUP_ID',
u'password': u'YOUR_DHL_CLIENT_SECRET',
u'tracking_number': u'RXGNDLFDMJXYGRYOUKQAOW',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'dhl-pl',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'image_type': u'LBLP',
u'packages': [{u'height': 10,
u'length': 10,
u'weight': 15,
u'width': 10}],
u'packaging_type': u'YOUR_PACKAGING',
u'password': u'YOUR_PASSWORD',
u'service': u'AH',
u'ship_addr1': u'Osmanska',
u'ship_addr2': u'2',
u'ship_city': u'Warszawa',
u'ship_code': u'02823',
u'ship_phone': u'123456789',
u'shipment_description': u'Toys',
u'shipper': u'Thomas Test',
u'test': True,
u'to_addr1': u'7 Wroblewskiego',
u'to_addr2': u'7',
u'to_city': u'Pulawy',
u'to_code': u'24100',
u'to_country': u'PL',
u'to_email': u'receiver@dhl.com',
u'to_name': u'John Doe',
u'to_phone': u'123456789',
u'username': u'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(
{u'action': u'CreatePickup',
u'carrier': u'DHL-PL',
u'params': {u'close_time': u'16:00',
u'password': u'YOUR_PASSWORD',
u'pickup_date': u'2017-04-17',
u'ready_time': u'08:00',
u'shipment_ids': [u'90000019278'],
u'special_instructions': u'Uwaga, paczki zawieraja szklo',
u'test': True,
u'username': u'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(
{u'action': u'Track',
u'carrier': u'DHL-PL',
u'params': {u'password': u'YOUR_PASSWORD',
u'shipment_id': u'11898773100',
u'test': True,
u'username': u'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(
{u'action': u'VoidShipment',
u'carrier': u'DHL-PL',
u'params': {u'password': u'YOUR_PASSWORD',
u'shipment_id': u'16257008778',
u'test': True,
u'username': u'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 - 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(
{u'action': u'GetAllRates',
u'carrier': u'DHL-REST',
u'params': {u'client_id': u'demo-key',
u'client_secret': u'demo-secret',
u'packages': [{u'weight': 5}],
u'ship_city': u'San Francisco',
u'ship_code': u'94115',
u'test': True,
u'to_code': u'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(
{u'action': u'Track',
u'carrier': u'DHL-REST',
u'params': {u'client_id': u'demo-key',
u'client_secret': u'demo-secret',
u'test': True,
u'tracking_number': u'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(
{u'action': u'track',
u'carrier': u'dpd',
u'params': {u'password': u'g30tr4ck',
u'test': True,
u'tracking_number': u'1371134583769923',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'Dicom',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'customs': [],
u'length_unit': u'IN',
u'packages': [{u'height': 5,
u'length': 5,
u'weight': 5,
u'width': 5}],
u'packaging_type': u'BX',
u'password': u'YOUR_PASSWORD',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Main St',
u'to_city': u'Emeryville',
u'to_code': u'90210',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'CA',
u'username': u'YOUR_USERNAME',
u'weight_unit': u'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(
{u'action': u'GetAllRates',
u'carrier': u'Dicom',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'customs': [],
u'division': u'express',
u'packages': [{u'height': 5,
u'length': 5,
u'packaging_type': u'Box',
u'weight': 50,
u'width': 5}],
u'password': u'YOUR_PASSWORD',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'to_code': u'V4W1N7',
u'to_country': u'CA',
u'to_state': u'BC',
u'username': u'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(
{u'action': u'Track',
u'carrier': u'Dicom',
u'params': {u'password': u'YOUR_PASSWORD',
u'tracking_number': u'W1234567',
u'username': u'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(
{u'action': u'AddressValidate',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'password': u'YOUR_PASSWORD',
u'test': True,
u'to_addr1': u'123 Main St',
u'to_city': u'Beverly Hills',
u'to_code': u'90210',
u'to_name': u'John Doe',
u'to_state': u'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(
{u'action': u'CreateManifest',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'password': u'YOUR_PASSWORD',
u'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(
{u'action': u'CreateManifest',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'carrier_code': u'FXSP',
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'password': u'YOUR_PASSWORD',
u'smart_post_hub_id': u'5552',
u'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(
{u'action': u'Notify',
u'carrier': u'fedex',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'password': u'YOUR_PASSWORD',
u'ship_email': u'acme@company.com',
u'shipper': u'Acme',
u'to_email': u'john.doe@email.com',
u'tracking_number': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'currency': u'USD',
u'customs': [{u'country_of_manufacture': u'US',
u'customs_description': u'My Description',
u'customs_line_amount': 50.0,
u'customs_quantity': 1,
u'customs_quantity_units': u'EA',
u'customs_weight': 2.5}],
u'customs_value': 200,
u'freight_account_number': u'510087020',
u'key': u'YOUR_KEY',
u'lift_gate_required': False,
u'meter_number': u'YOUR_METER_NUMBER',
u'packages': [{u'description': u'Bailing wire',
u'freight_class': u'50',
u'height': 70,
u'length': 119,
u'packaging_type': u'PALLET',
u'pieces': 10,
u'weight': 200,
u'width': 80}],
u'password': u'YOUR_PASSWORD',
u'service': u'FEDEX_FREIGHT_ECONOMY',
u'ship_addr1': u'298 CHERRY LN',
u'ship_city': u'New Castle',
u'ship_code': u'19720',
u'ship_country': u'US',
u'ship_phone': u'4403392600',
u'ship_state': u'DE',
u'shipper': u'WS1 LLC',
u'test': True,
u'to_addr1': u'4815 Dakhnah',
u'to_city': u'JEDDAH',
u'to_code': u'23344',
u'to_country': u'SA',
u'to_name': u'Ahmed',
u'to_phone': u'0561290777',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'addons': [],
u'billing': [{u'account': u'805222441',
u'addr1': u'2000 Freight LTL Testing',
u'city': u'Harrison',
u'company': u'Acme Inc.',
u'country_code': u'US',
u'payment_type': u'third_party',
u'phone': u'+18447630131',
u'postal_code': u'72601',
u'state': u'AR',
u'type': u'transportation'}],
u'customer_classification': u'01',
u'customs': [],
u'freight_account_number': u'YOUR_FREIGHT_ACCOUNT_NUMBER',
u'image_type': u'PDF',
u'key': u'YOUR_KEY',
u'lift_gate_required': False,
u'meter_number': u'YOUR_METER_NUMBER',
u'packageCount': 1,
u'package_count': 1,
u'packages': [{u'description': u'B48-48-16',
u'freight_class': u'CLASS_070',
u'height': 1,
u'length': 1,
u'packaging_type': u'PALLET',
u'pieces': 1,
u'weight': 155.0,
u'width': 1}],
u'packaging_type': u'YOUR_PACKAGING',
u'password': u'YOUR_PASSWORD',
u'residential': False,
u'service': u'FEDEX_FREIGHT_PRIORITY',
u'ship_addr1': u'1202 Chalet Ln',
u'ship_city': u'Harrison',
u'ship_code': u'72601',
u'ship_country': u'US',
u'ship_phone': u'+1 844-763-0135',
u'ship_state': u'AR',
u'shipper': u'Vendor - Harrison, AR',
u'special_instructions': u'',
u'test': True,
u'to_addr1': u'2000 Freight LTL Testing',
u'to_city': u'Harrison',
u'to_code': u'72601',
u'to_country': u'US',
u'to_name': u'Test Qa',
u'to_phone': u'+1 844-763-0131',
u'to_state': u'AR',
u'weight_unit': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'freight_account_number': u'YOUR_FREIGHT_ACCOUNT_NUMBER',
u'key': u'YOUR_KEY',
u'lift_gate_required': True,
u'meter_number': u'YOUR_METER_NUMBER',
u'packages': [{u'description': u'Bailing wire',
u'freight_class': u'50',
u'height': 100,
u'length': 150,
u'packaging_type': u'PALLET',
u'pieces': 10,
u'weight': 200.0,
u'width': 90}],
u'packaging_type': u'YOUR_PACKAGING',
u'password': u'YOUR_PASSWORD',
u'service': u'FEDEX_FREIGHT_ECONOMY',
u'ship_addr1': u'1202 Chalet Ln',
u'ship_addr2': u'Do Not Delete - Test Account',
u'ship_city': u'Harrison',
u'ship_code': u'72601',
u'ship_phone': u'8705551234',
u'ship_state': u'AR',
u'shipper': u'FedEx',
u'test': True,
u'to_addr1': u'1234 Main St',
u'to_addr2': u'Suite 200',
u'to_city': u'Akron',
u'to_code': u'44333',
u'to_name': u'ABC Widget Co',
u'to_phone': u'1231231234',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'freight_account_number': u'YOUR_FREIGHT_ACCOUNT_NUMBER',
u'key': u'YOUR_KEY',
u'lift_gate_required': True,
u'meter_number': u'YOUR_METER_NUMBER',
u'packages': [{u'description': u'Bailing wire',
u'freight_class': u'50',
u'height': 100,
u'length': 150,
u'packaging_type': u'PALLET',
u'pieces': 10,
u'weight': 200.0,
u'width': 90},
{u'description': u'Bailing wire',
u'freight_class': u'50',
u'height': 100,
u'length': 150,
u'packaging_type': u'PALLET',
u'pieces': 10,
u'weight': 200.0,
u'width': 90}],
u'packaging_type': u'YOUR_PACKAGING',
u'password': u'YOUR_PASSWORD',
u'service': u'FEDEX_FREIGHT_ECONOMY',
u'ship_addr1': u'1202 Chalet Ln',
u'ship_addr2': u'Do Not Delete - Test Account',
u'ship_city': u'Harrison',
u'ship_code': u'72601',
u'ship_phone': u'8705551234',
u'ship_state': u'AR',
u'shipper': u'FedEx',
u'test': True,
u'to_addr1': u'1234 Main St',
u'to_addr2': u'Suite 200',
u'to_city': u'Akron',
u'to_code': u'44333',
u'to_name': u'ABC Widget Co',
u'to_phone': u'1231231234',
u'to_state': u'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(
{u'action': u'GetAllRates',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'customs': [],
u'freight_account_number': u'YOUR_FREIGHT_ACCOUNT_NUMBER',
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'packages': [{u'freight_class': u'50', u'weight': 200}],
u'password': u'YOUR_PASSWORD',
u'ship_addr1': u'1202 Chalet Ln',
u'ship_addr2': u'Do Not Delete - Test Account',
u'ship_city': u'Harrison',
u'ship_code': u'72601',
u'ship_country': u'US',
u'ship_state': u'AR',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_city': u'Akron',
u'to_code': u'44333',
u'to_country': u'US',
u'to_state': u'OH',
u'weight_unit': u'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(
{u'action': u'GetAllRates',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'customs': [],
u'freight_account_number': u'YOUR_FREIGHT_ACCOUNT_NUMBER',
u'key': u'YOUR_KEY',
u'lift_gate_required': True,
u'meter_number': u'YOUR_METER_NUMBER',
u'packages': [{u'freight_class': u'50', u'weight': 200}],
u'password': u'YOUR_PASSWORD',
u'ship_addr1': u'1202 Chalet Ln',
u'ship_addr2': u'Do Not Delete - Test Account',
u'ship_city': u'Harrison',
u'ship_code': u'72601',
u'ship_country': u'US',
u'ship_state': u'AR',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_city': u'Akron',
u'to_code': u'44333',
u'to_country': u'US',
u'to_state': u'OH',
u'weight_unit': u'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(
{u'action': u'GetAllRates',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'addons': [u'INSIDE_DELIVERY',
u'LIMITED_ACCESS_DELIVERY',
u'CALL_BEFORE_DELIVERY'],
u'customs': [],
u'freight_account_number': u'YOUR_FREIGHT_ACCOUNT_NUMBER',
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'packages': [{u'freight_class': u'50', u'weight': 200}],
u'password': u'YOUR_PASSWORD',
u'ship_addr1': u'1202 Chalet Ln',
u'ship_addr2': u'Do Not Delete - Test Account',
u'ship_city': u'Harrison',
u'ship_code': u'72601',
u'ship_country': u'US',
u'ship_state': u'AR',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_city': u'Akron',
u'to_code': u'44333',
u'to_country': u'US',
u'to_state': u'OH',
u'weight_unit': u'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(
{u'action': u'GetTrackingDocuments',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'password': u'YOUR_PASSWORD',
u'secure_spod_account': u'82073541',
u'tracking_number': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'packages': [{u'weight': 15}],
u'packaging_type': u'YOUR_PACKAGING',
u'password': u'YOUR_PASSWORD',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Main St',
u'to_city': u'Beverly Hills',
u'to_code': u'90210',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'packages': [{u'alcohol': True, u'weight': 15}],
u'packaging_type': u'YOUR_PACKAGING',
u'password': u'YOUR_PASSWORD',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Main St',
u'to_city': u'Beverly Hills',
u'to_code': u'90210',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'packages': [{u'alcohol': True, u'weight': 15}],
u'packaging_type': u'YOUR_PACKAGING',
u'password': u'YOUR_PASSWORD',
u'recipient_type': u'LICENSEE',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Main St',
u'to_city': u'Beverly Hills',
u'to_code': u'90210',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'key': u'YOUR_KEY',
u'label': {u'printed_origin': {u'addr1': u'940 Presidio Ave',
u'city': u'San Francisco',
u'code': u'94112',
u'country': u'US',
u'name': u'John Doe',
u'phone': u'123-123-1234',
u'state': u'CA'}},
u'meter_number': u'YOUR_METER_NUMBER',
u'packages': [{u'weight': 15}],
u'packaging_type': u'YOUR_PACKAGING',
u'password': u'YOUR_PASSWORD',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Main St',
u'to_city': u'Beverly Hills',
u'to_code': u'90210',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'billing': [{u'account': u'abc123',
u'country_code': u'US',
u'payment_type': u'recipient',
u'postal_code': u'94608',
u'type': u'transportation'}],
u'image_type': u'GIF',
u'key': u'YOUR_FEDEX_API_KEY',
u'packages': [{u'length': 7, u'weight': 4}],
u'password': u'YOUR_PASSWORD',
u'service': u'FEDEX_GROUND',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'940 Presidio Ave',
u'to_addr2': u'#103',
u'to_city': u'San Francisco',
u'to_code': u'94115',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'CA',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'packages': [{u'dry_ice': {u'weight': 2}, u'weight': 15}],
u'packaging_type': u'YOUR_PACKAGING',
u'password': u'YOUR_PASSWORD',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Main St',
u'to_city': u'Beverly Hills',
u'to_code': u'90210',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'notify': [{u'email': u'customer@email.com',
u'type': u'ON_SHIPMENT,ON_TENDER,ON_EXCEPTION,ON_DELIVERY'}],
u'packages': [{u'weight': 15}],
u'packaging_type': u'YOUR_PACKAGING',
u'password': u'YOUR_PASSWORD',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Main St',
u'to_city': u'Beverly Hills',
u'to_code': u'90210',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'billing': [{u'account': u'abc123',
u'payment_type': u'collect',
u'type': u'transportation'}],
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'packages': [{u'height': 8,
u'length': 11,
u'reference_code': u'P_O_NUMBER',
u'reference_code2': u'CUSTOMER_REFERENCE',
u'reference_value': u'abc123',
u'reference_value2': u'123456',
u'weight': 5,
u'width': 14}],
u'packaging_type': u'YOUR_PACKAGING',
u'password': u'YOUR_PASSWORD',
u'ship_addr1': u'123 Main St.',
u'ship_city': u'Vancouver',
u'ship_code': u'98685',
u'ship_country': u'US',
u'ship_phone': u'123-123-1234',
u'ship_state': u'WA',
u'shipper': u'Acme Inc',
u'test': True,
u'to_addr1': u'123 Fake St.',
u'to_city': u'New Hyde Park',
u'to_code': u'11040',
u'to_country': u'US',
u'to_name': u'Big Box Store',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'key': u'YOUR_KEY',
u'label': {u'masked_data': [u'SHIPPER_ACCOUNT_NUMBER']},
u'meter_number': u'YOUR_METER_NUMBER',
u'packages': [{u'weight': 15}],
u'packaging_type': u'YOUR_PACKAGING',
u'password': u'YOUR_PASSWORD',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Main St',
u'to_city': u'Beverly Hills',
u'to_code': u'90210',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx',
u'params': {u'hold_addr1': u'8549 Wilshire Blvd',
u'hold_at_location': True,
u'hold_city': u'Beverly Hills',
u'hold_code': u'90211',
u'hold_country': u'US',
u'hold_phone': u'1231231234',
u'hold_state': u'CA',
u'packages': [{u'weight': 15}],
u'packaging_type': u'YOUR_PACKAGING',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Main St',
u'to_city': u'Beverly Hills',
u'to_code': u'90210',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'packages': [{u'signature_type': u'NO_SIGNATURE_REQUIRED',
u'weight': 15}],
u'packaging_type': u'YOUR_PACKAGING',
u'password': u'YOUR_PASSWORD',
u'residential': True,
u'service': u'GROUND_HOME_DELIVERY',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Main St',
u'to_city': u'Beverly Hills',
u'to_code': u'90210',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'cod_amount': 100,
u'cod_fund_type': u'CASH',
u'currency': u'INR',
u'customs': [{u'country_of_manufacture': u'US',
u'customs_description': u'My Description',
u'customs_line_amount': 50.0,
u'customs_quantity': 1,
u'customs_quantity_units': u'EA',
u'customs_weight': 2.5}],
u'image_type': u'PNG',
u'key': u'YOUR_KEY',
u'length_unit': u'IN',
u'meter_number': u'YOUR_METER_NUMBER',
u'packages': [{u'height': 1,
u'length': 1,
u'weight': 5,
u'width': 1}],
u'packaging_type': u'YOUR_PACKAGING',
u'password': u'YOUR_PASSWORD',
u'pickup_type': u'02',
u'purpose': u'SOLD',
u'service': u'STANDARD_OVERNIGHT',
u'ship_addr1': u'2000 Meadowvale Rd',
u'ship_city': u'mumbai',
u'ship_code': u'400037',
u'ship_contact': u'John Doe',
u'ship_country': u'IN',
u'ship_phone': u'1231231234',
u'ship_state': u'MH',
u'shipment_description': u'xxx',
u'shipper': u'John Doe',
u'test': True,
u'to_addr1': u'2300 Southern Blvd',
u'to_attention_name': u'John Doe',
u'to_city': u'Mumbai',
u'to_code': u'400037',
u'to_country': u'IN',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'MH',
u'weight_unit': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx',
u'params': {u'currency': u'CAD',
u'customs': [{u'country_of_manufacture': u'US',
u'customs_description': u'My Description',
u'customs_line_amount': 50.0,
u'customs_quantity': 1,
u'customs_quantity_units': u'EA',
u'customs_weight': 2.5}],
u'image_type': u'PNG',
u'length_unit': u'IN',
u'packages': [{u'height': 1,
u'length': 1,
u'weight': 5,
u'width': 1}],
u'packaging_type': u'YOUR_PACKAGING',
u'pickup_type': u'02',
u'service': u'INTERNATIONAL_PRIORITY',
u'ship_addr1': u'2000 Meadowvale Rd',
u'ship_city': u'Toronto',
u'ship_code': u'M1B5K7',
u'ship_contact': u'John Doe',
u'ship_country': u'CA',
u'ship_phone': u'1231231234',
u'ship_state': u'ON',
u'shipment_description': u'xxx',
u'shipper': u'John Doe',
u'sold_addr1': u'2000 Meadowvale Rd',
u'sold_city': u'Toronto',
u'sold_code': u'M1B5K7',
u'sold_company': u'Acme Inc.',
u'sold_country': u'CA',
u'sold_name': u'John Doe',
u'sold_phone': u'1231231234',
u'sold_state': u'ON',
u'sold_tax_id': u'123abc',
u'test': True,
u'to_addr1': u'2300 Southern Blvd',
u'to_attention_name': u'John Doe',
u'to_city': u'Bronx',
u'to_code': u'10460',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'NY',
u'weight_unit': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx',
u'params': {u'currency': u'CAD',
u'customs': [{u'country_of_manufacture': u'US',
u'customs_description': u'Legal Documents',
u'customs_line_amount': 0.0,
u'customs_quantity': 1,
u'customs_quantity_units': u'EA',
u'customs_weight': 1}],
u'customs_value': 0.0,
u'image_type': u'PNG',
u'length_unit': u'IN',
u'packages': [{u'weight': 1}],
u'packaging_type': u'FEDEX_ENVELOPE',
u'pickup_type': u'02',
u'service': u'INTERNATIONAL_PRIORITY',
u'ship_addr1': u'2000 Meadowvale Rd',
u'ship_city': u'Toronto',
u'ship_code': u'M1B5K7',
u'ship_contact': u'John Doe',
u'ship_country': u'CA',
u'ship_phone': u'1231231234',
u'ship_state': u'ON',
u'shipment_description': u'xxx',
u'shipper': u'John Doe',
u'sold_addr1': u'2000 Meadowvale Rd',
u'sold_city': u'Toronto',
u'sold_code': u'M1B5K7',
u'sold_company': u'Acme Inc.',
u'sold_country': u'CA',
u'sold_name': u'John Doe',
u'sold_phone': u'1231231234',
u'sold_state': u'ON',
u'sold_tax_id': u'123abc',
u'test': True,
u'to_addr1': u'2300 Southern Blvd',
u'to_attention_name': u'John Doe',
u'to_city': u'Bronx',
u'to_code': u'10460',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'NY',
u'weight_unit': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'b13a_filing_option': u'NOT_REQUIRED',
u'currency': u'USD',
u'customs': [{u'country_of_manufacture': u'US',
u'customs_description': u'Cards',
u'customs_line_amount': 55,
u'customs_quantity': 500,
u'customs_quantity_units': u'EA',
u'customs_weight': 10}],
u'customs_value': 262.89,
u'export_compliance_statement': u'NO EEI 30.37(f)',
u'fedex_one_rate': False,
u'generate_docs': [u'COMMERCIAL_INVOICE'],
u'key': u'YOUR_KEY',
u'length_unit': u'IN',
u'meter_number': u'YOUR_METER_NUMBER',
u'negotiated_rates': True,
u'packages': [{u'height': 0,
u'length': 0,
u'reference_code': u'INVOICE_NUMBER',
u'reference_value': u'79631',
u'weight': 12,
u'width': 0}],
u'packaging_type': u'YOUR_PACKAGING',
u'password': u'YOUR_PASSWORD',
u'service': u'INTERNATIONAL_PRIORITY',
u'ship_addr1': u'273 Cahaba Valley Pkwy',
u'ship_city': u'Pelham',
u'ship_code': u'35124',
u'ship_contact': u'Sales Person2',
u'ship_country': u'US',
u'ship_phone': u'(123) 123.6183',
u'ship_state': u'AL',
u'shipment_description': u'PRINTED MATERIALS',
u'shipper': u'Acme, Inc.',
u'sold_addr1': u'Calle 151',
u'sold_city': u'Bogota',
u'sold_code': u'110131',
u'sold_company': u'Acme, Inc.',
u'sold_country': u'CO',
u'sold_name': u'John Doe',
u'sold_phone': u'1113444356',
u'sold_state': None,
u'sold_tax_id': u'',
u'to_addr1': u'Calle 151',
u'to_attention_name': u'John Doe',
u'to_city': u'Bogota',
u'to_code': u'110131',
u'to_company': u'Bogota DC',
u'to_country': u'CO',
u'to_name': u'John Doe',
u'to_phone': u'1113444356',
u'to_state': None,
u'weight_unit': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx',
u'params': {u'currency': u'CAD',
u'customs': [{u'country_of_manufacture': u'US',
u'customs_description': u'My Description',
u'customs_hs_tariff': u'2000',
u'customs_line_amount': 50.0,
u'customs_quantity': 1,
u'customs_quantity_units': u'EA',
u'customs_weight': 2.5},
{u'country_of_manufacture': u'US',
u'customs_description': u'My Description',
u'customs_line_amount': 50.0,
u'customs_quantity': 1,
u'customs_quantity_units': u'EA',
u'customs_weight': 2.5,
u'number_of_packages_per_commodity': 2}],
u'customs_misc_charge': 10.0,
u'customs_misc_charge_type': u'OTHER',
u'customs_value': 100.0,
u'generate_docs': [u'COMMERCIAL_INVOICE',
u'NAFTA_CERTIFICATE_OF_ORIGIN'],
u'image_type': u'PNG',
u'length_unit': u'IN',
u'packages': [{u'height': 1,
u'length': 1,
u'weight': 5,
u'width': 1}],
u'packaging_type': u'YOUR_PACKAGING',
u'paperless_customs': True,
u'pickup_type': u'02',
u'service': u'INTERNATIONAL_PRIORITY',
u'ship_addr1': u'2000 Meadowvale Rd',
u'ship_city': u'Toronto',
u'ship_code': u'M1B5K7',
u'ship_contact': u'John Doe',
u'ship_country': u'CA',
u'ship_phone': u'1231231234',
u'ship_state': u'ON',
u'shipment_description': u'xxx',
u'shipper': u'John Doe',
u'sold_addr1': u'2000 Meadowvale Rd',
u'sold_city': u'Toronto',
u'sold_code': u'M1B5K7',
u'sold_company': u'Acme Inc.',
u'sold_country': u'CA',
u'sold_name': u'John Doe',
u'sold_phone': u'1231231234',
u'sold_state': u'ON',
u'sold_tax_id': u'123abc',
u'test': True,
u'to_addr1': u'2300 Southern Blvd',
u'to_attention_name': u'John Doe',
u'to_city': u'Bronx',
u'to_code': u'10460',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'NY',
u'weight_unit': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx',
u'params': {u'billing': [{u'payment_type': u'SENDER', u'type': u'duties'}],
u'currency': u'USD',
u'customs': [{u'country_of_manufacture': u'US',
u'customs_description': u'My Description',
u'customs_line_amount': 50.0,
u'customs_quantity': 1,
u'customs_quantity_units': u'EA',
u'customs_weight': 2.5}],
u'packages': [{u'weight': 15}],
u'packaging_type': u'YOUR_PACKAGING',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'2000 Meadowvale Rd',
u'to_city': u'Toronto',
u'to_code': u'M1B5K7',
u'to_country': u'CA',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx',
u'params': {u'currency': u'CAD',
u'customs': [{u'country_of_manufacture': u'US',
u'customs_description': u'My Description',
u'customs_hs_tariff': u'2000',
u'customs_line_amount': 50.0,
u'customs_quantity': 1,
u'customs_quantity_units': u'EA',
u'customs_weight': 2.5},
{u'country_of_manufacture': u'US',
u'customs_description': u'My Description',
u'customs_line_amount': 50.0,
u'customs_quantity': 1,
u'customs_quantity_units': u'EA',
u'customs_weight': 2.5,
u'number_of_packages_per_commodity': 2}],
u'customs_misc_charge': 10.0,
u'customs_misc_charge_type': u'OTHER',
u'customs_value': 100.0,
u'generate_docs': [u'COMMERCIAL_INVOICE',
u'NAFTA_CERTIFICATE_OF_ORIGIN'],
u'image_type': u'PNG',
u'length_unit': u'IN',
u'packages': [{u'height': 1,
u'length': 1,
u'weight': 5,
u'width': 1}],
u'packaging_type': u'YOUR_PACKAGING',
u'pickup_type': u'02',
u'service': u'INTERNATIONAL_PRIORITY',
u'ship_addr1': u'2000 Meadowvale Rd',
u'ship_city': u'Toronto',
u'ship_code': u'M1B5K7',
u'ship_contact': u'John Doe',
u'ship_country': u'CA',
u'ship_phone': u'1231231234',
u'ship_state': u'ON',
u'shipment_description': u'xxx',
u'shipper': u'John Doe',
u'sold_addr1': u'2000 Meadowvale Rd',
u'sold_city': u'Toronto',
u'sold_code': u'M1B5K7',
u'sold_company': u'Acme Inc.',
u'sold_country': u'CA',
u'sold_name': u'John Doe',
u'sold_phone': u'1231231234',
u'sold_state': u'ON',
u'sold_tax_id': u'123abc',
u'test': True,
u'to_addr1': u'2300 Southern Blvd',
u'to_attention_name': u'John Doe',
u'to_city': u'Bronx',
u'to_code': u'10460',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'NY',
u'weight_unit': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx',
u'params': {u'currency': u'CAD',
u'custom_images': [{u'document': u'CommercialInvoice',
u'id': u'IMAGE_1',
u'type': u'SIGNATURE'}],
u'customs': [{u'country_of_manufacture': u'US',
u'customs_description': u'My Description',
u'customs_hs_tariff': u'2000',
u'customs_line_amount': 50.0,
u'customs_quantity': 1,
u'customs_quantity_units': u'EA',
u'customs_weight': 2.5},
{u'country_of_manufacture': u'US',
u'customs_description': u'My Description',
u'customs_line_amount': 50.0,
u'customs_quantity': 1,
u'customs_quantity_units': u'EA',
u'customs_weight': 2.5,
u'number_of_packages_per_commodity': 2}],
u'customs_value': 100.0,
u'generate_docs': [u'COMMERCIAL_INVOICE',
u'NAFTA_CERTIFICATE_OF_ORIGIN'],
u'image_type': u'PNG',
u'length_unit': u'IN',
u'packages': [{u'height': 1,
u'length': 1,
u'weight': 5,
u'width': 1}],
u'packaging_type': u'YOUR_PACKAGING',
u'pickup_type': u'02',
u'service': u'INTERNATIONAL_PRIORITY',
u'ship_addr1': u'2000 Meadowvale Rd',
u'ship_city': u'Toronto',
u'ship_code': u'M1B5K7',
u'ship_contact': u'John Doe',
u'ship_country': u'CA',
u'ship_phone': u'1231231234',
u'ship_state': u'ON',
u'shipment_description': u'xxx',
u'shipper': u'John Doe',
u'sold_addr1': u'2000 Meadowvale Rd',
u'sold_city': u'Toronto',
u'sold_code': u'M1B5K7',
u'sold_company': u'Acme Inc.',
u'sold_country': u'CA',
u'sold_name': u'John Doe',
u'sold_phone': u'1231231234',
u'sold_state': u'ON',
u'sold_tax_id': u'123abc',
u'test': True,
u'to_addr1': u'2300 Southern Blvd',
u'to_attention_name': u'John Doe',
u'to_city': u'Bronx',
u'to_code': u'10460',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'NY',
u'weight_unit': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'packages': [{u'weight': 5}, {u'weight': 10}],
u'packaging_type': u'YOUR_PACKAGING',
u'password': u'YOUR_PASSWORD',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Main St',
u'to_city': u'Beverly Hills',
u'to_code': u'90210',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx',
u'params': {u'currency': u'CAD',
u'customs': [{u'country_of_manufacture': u'US',
u'customs_description': u'My Description',
u'customs_line_amount': 50.0,
u'customs_quantity': 1,
u'customs_quantity_units': u'EA',
u'customs_weight': 2.5}],
u'image_type': u'PNG',
u'length_unit': u'IN',
u'packages': [{u'height': 1,
u'length': 1,
u'weight': 5,
u'width': 1},
{u'height': 1,
u'length': 1,
u'weight': 5,
u'width': 1}],
u'packaging_type': u'YOUR_PACKAGING',
u'pickup_type': u'02',
u'service': u'INTERNATIONAL_PRIORITY',
u'ship_addr1': u'2000 Meadowvale Rd',
u'ship_city': u'Toronto',
u'ship_code': u'M1B5K7',
u'ship_contact': u'John Doe',
u'ship_country': u'CA',
u'ship_phone': u'1231231234',
u'ship_state': u'ON',
u'shipment_description': u'xxx',
u'shipper': u'John Doe',
u'sold_addr1': u'2000 Meadowvale Rd',
u'sold_city': u'Toronto',
u'sold_code': u'M1B5K7',
u'sold_company': u'Acme Inc.',
u'sold_country': u'CA',
u'sold_name': u'John Doe',
u'sold_phone': u'1231231234',
u'sold_state': u'ON',
u'sold_tax_id': u'123abc',
u'test': True,
u'to_addr1': u'2300 Southern Blvd',
u'to_attention_name': u'John Doe',
u'to_city': u'Bronx',
u'to_code': u'10460',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'NY',
u'weight_unit': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'packages': [{u'reference_code': u'INVOICE_NUMBER',
u'reference_code2': u'P_O_NUMBER',
u'reference_value': u'#123',
u'reference_value2': u'B2C',
u'weight': 15}],
u'packaging_type': u'YOUR_PACKAGING',
u'password': u'YOUR_PASSWORD',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Main St',
u'to_city': u'Beverly Hills',
u'to_code': u'90210',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'packages': [{u'weight': 15}],
u'packaging_type': u'YOUR_PACKAGING',
u'password': u'YOUR_PASSWORD',
u'residential': True,
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Main St',
u'to_city': u'Beverly Hills',
u'to_code': u'90210',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'notify': [{u'email': u'bob@email.com', u'type': u'RETURN'}],
u'packages': [{u'weight': 2}],
u'packaging_type': u'YOUR_PACKAGING',
u'password': u'YOUR_PASSWORD',
u'return_code': u'PRINT_RETURN_LABEL',
u'ship_addr1': u'940 Presidio Ave',
u'ship_addr2': u'#103',
u'ship_city': u'San Francisco',
u'ship_code': u'94115',
u'ship_phone': u'1231231234',
u'ship_state': u'CA',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'124 Main St',
u'to_city': u'Beverly Hills',
u'to_code': u'90210',
u'to_name': u'John Doe Schmoe',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'packages': [{u'weight': 2}],
u'packaging_type': u'YOUR_PACKAGING',
u'password': u'YOUR_PASSWORD',
u'return_code': u'PRINT_RETURN_LABEL',
u'ship_addr1': u'940 Presidio Ave',
u'ship_addr2': u'#103',
u'ship_city': u'San Francisco',
u'ship_code': u'94115',
u'ship_phone': u'1231231234',
u'ship_state': u'CA',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Main St',
u'to_city': u'Beverly Hills',
u'to_code': u'90210',
u'to_name': u'John Doe Schmoe',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx',
u'params': {u'billing': [{u'payment_type': u'SENDER',
u'type': u'transportation'},
{u'payment_type': u'SENDER', u'type': u'duties'}],
u'currency': u'USD',
u'customs': [{u'country_of_manufacture': u'CA',
u'customs_description': u'Acme Product',
u'customs_hs_tariff': u'9506.31.00.10',
u'customs_line_amount': 29.99,
u'customs_quantity': 1,
u'customs_quantity_units': u'EA',
u'customs_weight': 4}],
u'customs_account_number': u'1234567',
u'customs_value': 29.99,
u'generate_docs': [u'COMMERCIAL_INVOICE'],
u'image_type': u'ZPL',
u'invoice': u'372348',
u'invoice_date': u'20200519',
u'invoice_line_total': 29.99,
u'length_unit': u'IN',
u'negotiated_rates': True,
u'packages': [{u'height': 4,
u'insured_currency': u'USD',
u'insured_value': 29.99,
u'length': 40,
u'reference_code': u'P_O_NUMBER',
u'reference_code2': u'INVOICE_NUMBER',
u'reference_value': u'12345',
u'reference_value2': u'56789',
u'weight': 4,
u'width': 4}],
u'packaging_type': u'02',
u'paperless_customs': False,
u'return_code': u'PRINT_RETURN_LABEL',
u'return_reason': u'REJECTED',
u'saturday_delivery': False,
u'service': u'INTERNATIONAL_ECONOMY',
u'ship_addr1': u'9500 Meilleur',
u'ship_city': u'Montreal',
u'ship_code': u'H2N2B7',
u'ship_country': u'CA',
u'ship_name': u'Acme Inc',
u'ship_phone': u'1-888-123-1234',
u'ship_state': u'QC',
u'shipper': u'Acme Inc',
u'sold_addr1': u'10 FedEx Parkway',
u'sold_addr2': u'2nd Floor Horizontal',
u'sold_city': u'Collierville',
u'sold_code': u'38017',
u'sold_company': u'FedEx Services',
u'sold_country': u'US',
u'sold_name': u'FedEx Services',
u'sold_phone': u'18889085994',
u'sold_state': u'TN',
u'test': True,
u'to_addr1': u'10 FedEx Parkway',
u'to_addr2': u'2nd Floor Horizontal',
u'to_attention_name': u'FedEx Services',
u'to_city': u'Collierville',
u'to_code': u'38017',
u'to_country': u'US',
u'to_name': u'FedEx Services',
u'to_phone': u'1-888-123-1234',
u'to_state': u'TN',
u'weight_unit': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'packages': [{u'weight': 5}],
u'packaging_type': u'YOUR_PACKAGING',
u'password': u'YOUR_PASSWORD',
u'service': u'SMART_POST',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'smart_post_hub_id': u'5552',
u'smart_post_indicia': u'PARCEL_SELECT',
u'test': True,
u'to_addr1': u'123 Main St',
u'to_city': u'Beverly Hills',
u'to_code': u'90210',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'billing': [{u'account': u'abc123',
u'company': u'Acme Inc.',
u'country_code': u'US',
u'payment_type': u'third_party',
u'postal_code': u'94608',
u'type': u'transportation'}],
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'packages': [{u'weight': 15}],
u'packaging_type': u'YOUR_PACKAGING',
u'password': u'YOUR_PASSWORD',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Main St',
u'to_city': u'Beverly Hills',
u'to_code': u'90210',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'packages': [{u'insured_currency': u'USD',
u'insured_value': 899.0,
u'weight': 5}],
u'packaging_type': u'YOUR_PACKAGING',
u'password': u'YOUR_PASSWORD',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Main St',
u'to_city': u'Beverly Hills',
u'to_code': u'90210',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'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(
{u'action': u'FindLocations',
u'carrier': u'FedEx',
u'params': {u'attributes': [u'SATURDAY_DROPOFFS'],
u'locations': [u'FEDEX_OFFICE'],
u'radius': 50,
u'results_requested': 4,
u'ship_city': u'Briggs',
u'ship_code': u'78608-0001',
u'ship_country': u'US',
u'ship_state': u'TX',
u'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(
{u'action': u'CancelPickup',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'password': u'YOUR_PASSWORD',
u'pickup_id': u'CPU663460',
u'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(
{u'action': u'CreatePickup',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'carrier_code': u'FDXE',
u'close_time': u'1600',
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'password': u'YOUR_PASSWORD',
u'pickup_addr1': u'123 Main St',
u'pickup_addr2': u'123',
u'pickup_city': u'Emeryville',
u'pickup_code': u'94608',
u'pickup_company_name': u'Acme Inc',
u'pickup_contact_name': u'John Doe',
u'pickup_country': u'US',
u'pickup_date': u'20161212',
u'pickup_phone': u'123-123-1234',
u'pickup_state': u'CA',
u'ready_time': u'0800',
u'test': True,
u'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(
{u'action': u'CreatePickup',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'close_time': u'1600',
u'freight_account_number': u'YOUR_FREIGHT_ACCOUNT_NUMBER',
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'packages': [{u'freight_class': u'50',
u'packaging_type': u'PALLET',
u'pieces': 10,
u'weight': 200.0}],
u'password': u'YOUR_PASSWORD',
u'pickup_addr1': u'1202 Chalet Ln',
u'pickup_addr2': u'Do Not Delete - Test Account',
u'pickup_city': u'Harrison',
u'pickup_code': u'72601',
u'pickup_company_name': u'Acme Inc',
u'pickup_contact_name': u'John Doe',
u'pickup_country': u'US',
u'pickup_date': u'20161212',
u'pickup_phone': u'123-123-1234',
u'pickup_state': u'AR',
u'ready_time': u'0800',
u'service': u'FEDEX_FREIGHT_ECONOMY',
u'test': True,
u'to_addr1': u'123 Main st',
u'to_city': u'PITTSBURGH',
u'to_code': u'15220',
u'to_country': u'US',
u'to_state': u'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(
{u'action': u'CreatePickup',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'close_time': u'1600',
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'password': u'YOUR_PASSWORD',
u'pickup_addr1': u'123 Main St',
u'pickup_addr2': u'123',
u'pickup_city': u'Emeryville',
u'pickup_code': u'94608',
u'pickup_company_name': u'Acme Inc',
u'pickup_contact_name': u'John Doe',
u'pickup_country': u'US',
u'pickup_date': u'20161212',
u'pickup_phone': u'123-123-1234',
u'pickup_state': u'CA',
u'ready_time': u'0800',
u'test': True,
u'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(
{u'action': u'GetAllRates',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'cod_amount': 774.6,
u'cod_fund_type': u'PERSONAL_CHECK',
u'currency': u'USD',
u'customs': [],
u'dropoff_type': u'REGULAR_PICKUP',
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'packages': [{u'height': 6,
u'length': 30,
u'weight': 9,
u'width': 20}],
u'packaging_type': u'YOUR_PACKAGING',
u'password': u'YOUR_PASSWORD',
u'ship_city': u'Vancouver',
u'ship_code': u'98685',
u'ship_country': u'US',
u'ship_state': u'WA',
u'shipper': u'My Company',
u'test': True,
u'to_code': u'90210',
u'to_country': u'US',
u'to_state': u'CA',
u'weight_unit': u'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(
{u'action': u'GetAllRates',
u'carrier': u'FedEx',
u'params': {u'customs': [],
u'dropoff_type': u'REGULAR_PICKUP',
u'length_unit': u'IN',
u'packages': [{u'insured_value': 200, u'weight': 2}],
u'packaging_type': u'YOUR_PACKAGING',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_date': u'2042-09-15T08:00:00-00:00',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_code': u'90210',
u'to_country': u'US',
u'to_state': u'CA',
u'weight_unit': u'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(
{u'action': u'GetAllRates',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'cod_amount': 15,
u'cod_fund_type': u'GUARANTEED_FUNDS',
u'customs': [],
u'dropoff_type': u'REGULAR_PICKUP',
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'packages': [{u'height': 5,
u'length': 5,
u'weight': 4,
u'width': 5}],
u'packaging_type': u'YOUR_PACKAGING',
u'password': u'YOUR_PASSWORD',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'to_code': u'90210',
u'to_country': u'US',
u'to_state': u'CA',
u'weight_unit': u'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(
{u'action': u'GetAllRates',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'debug': True,
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'packages': [{u'dry_ice': {u'medical_use': False,
u'weight': 1},
u'height': 5,
u'insured_currency': u'USD',
u'insured_value': 450,
u'length': 5,
u'signature_type': u'DIRECT',
u'weight': 10,
u'width': 5}],
u'password': u'YOUR_PASSWORD',
u'ship_addr1': u'1452 56TH ST',
u'ship_city': u'BROOKLYN',
u'ship_code': u'11219-4682',
u'ship_country': u'US',
u'ship_phone': u'1212121212',
u'ship_state': u'NY',
u'shipper': u'd',
u'test': True,
u'to_code': u'28365',
u'to_country': u'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(
{u'action': u'GetAllRates',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'customs': [],
u'dropoff_type': u'REGULAR_PICKUP',
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'packages': [{u'insured_value': 200, u'weight': 2}],
u'packaging_type': u'YOUR_PACKAGING',
u'password': u'YOUR_PASSWORD',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_code': u'90210',
u'to_country': u'US',
u'to_state': u'CA',
u'weight_unit': u'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(
{u'action': u'GetAllRates',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'currency': u'USD',
u'customs': [{u'country_of_manufacture': u'US',
u'customs_description': u'Brass Trumpet in Case',
u'customs_hs_tariff': u'920510009000',
u'customs_line_amount': 50.0,
u'customs_quantity': 1,
u'customs_quantity_units': u'EA',
u'customs_weight': 2.5,
u'number_of_packages_per_commodity': 1}],
u'customs_value': 50.0,
u'dropoff_type': u'REGULAR_PICKUP',
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'negotiated_rates': True,
u'packages': [{u'weight': 2}],
u'packaging_type': u'YOUR_PACKAGING',
u'password': u'YOUR_PASSWORD',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'2020 ELLESMERE ROAD 6-7',
u'to_city': u'SCARBOROUGH',
u'to_code': u'M1H2Z8',
u'to_country': u'CA',
u'to_state': u'ON',
u'weight_unit': u'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(
{u'action': u'GetAllRates',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'customs': [],
u'dropoff_type': u'REGULAR_PICKUP',
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'negotiated_rates': True,
u'packages': [{u'weight': 2}],
u'packaging_type': u'YOUR_PACKAGING',
u'password': u'YOUR_PASSWORD',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_code': u'90210',
u'to_country': u'US',
u'to_state': u'CA',
u'weight_unit': u'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(
{u'action': u'GetAllRates',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'customs': [],
u'dropoff_type': u'REGULAR_PICKUP',
u'fedex_one_rate': True,
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'packages': [{u'weight': 2}],
u'packaging_type': u'FEDEX_SMALL_BOX',
u'password': u'YOUR_PASSWORD',
u'service': u'FEDEX_EXPRESS_SAVER',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_code': u'90210',
u'to_country': u'US',
u'to_state': u'CA',
u'weight_unit': u'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(
{u'action': u'GetAllRates',
u'carrier': u'FedEx',
u'params': {u'customs': [],
u'dropoff_type': u'REGULAR_PICKUP',
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'packages': [{u'weight': 2}],
u'packaging_type': u'YOUR_PACKAGING',
u'password': u'YOUR_PASSWORD',
u'residential': True,
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_code': u'90210',
u'to_country': u'US',
u'to_state': u'CA',
u'weight_unit': u'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(
{u'action': u'GetAllRates',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'customs': [],
u'dropoff_type': u'REGULAR_PICKUP',
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'packages': [{u'height': 5,
u'length': 5,
u'weight': 4,
u'width': 5}],
u'packaging_type': u'YOUR_PACKAGING',
u'password': u'YOUR_PASSWORD',
u'return_code': u'PRINT_RETURN_LABEL',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'to_code': u'90210',
u'to_country': u'US',
u'to_state': u'CA',
u'weight_unit': u'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(
{u'action': u'GetAllRates',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'customs': [],
u'dropoff_type': u'REGULAR_PICKUP',
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'packages': [{u'signature_type': u'DIRECT', u'weight': 2}],
u'packaging_type': u'YOUR_PACKAGING',
u'password': u'YOUR_PASSWORD',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_code': u'90210',
u'to_country': u'US',
u'to_state': u'CA',
u'weight_unit': u'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(
{u'action': u'GetAllRates',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'customs': [],
u'dropoff_type': u'REGULAR_PICKUP',
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'negotiated_rates': True,
u'packages': [{u'weight': 2}],
u'packaging_type': u'YOUR_PACKAGING',
u'password': u'YOUR_PASSWORD',
u'service': u'SMART_POST',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'smart_post_hub_id': u'5531',
u'smart_post_indicia': u'PARCEL_SELECT',
u'test': True,
u'to_code': u'90210',
u'to_country': u'US',
u'to_state': u'CA',
u'weight_unit': u'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(
{u'action': u'GetAllRates',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'customs': [],
u'dropoff_type': u'REGULAR_PICKUP',
u'hold_addr1': u'8549 Wilshire Blvd',
u'hold_at_location': True,
u'hold_city': u'Beverly Hills',
u'hold_code': u'90211',
u'hold_country': u'US',
u'hold_phone': u'1231231234',
u'hold_state': u'CA',
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'packages': [{u'insured_value': 200, u'weight': 2}],
u'packaging_type': u'YOUR_PACKAGING',
u'password': u'YOUR_PASSWORD',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_code': u'90210',
u'to_country': u'US',
u'weight_unit': u'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(
{u'action': u'TimeInTransit',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'password': u'YOUR_PASSWORD',
u'ship_code': u'94608',
u'ship_country': u'US',
u'test': True,
u'to_code': u'90210',
u'to_country': u'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(
{u'action': u'track',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'password': u'YOUR_PASSWORD',
u'tracking_number': u'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(
{u'action': u'track',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'password': u'YOUR_PASSWORD',
u'reference_type': u'TRACKING_NUMBER_OR_DOORTAG',
u'tracking_number': u'392845303162',
u'unique_id': u'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(
{u'action': u'track',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'password': u'YOUR_PASSWORD',
u'ship_date_begin': u'2016-01-01',
u'ship_date_end': u'2018-01-01',
u'tracking_id_type': u'TRACKING_CONTROL_NUMBER',
u'tracking_number': u'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(
{u'action': u'track',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'password': u'YOUR_PASSWORD',
u'tracking_id_type': u'CUSTOMER_REFERENCE',
u'tracking_number': u'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(
{u'action': u'track',
u'carrier': u'FedEx',
u'params': {u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'password': u'YOUR_PASSWORD',
u'ship_date_begin': u'2021-01-01',
u'ship_date_end': u'2021-01-11',
u'to_code': u'90210',
u'to_country': u'US',
u'tracking_id_type': u'CUSTOMER_REFERENCE',
u'tracking_number': u'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(
{u'action': u'UploadDocument',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'document_type': u'013',
u'file_contents': u'Tm90aWNlDQpJbiBhbGwgY29tbXVuaWNhdGlvbnMgd2l0aCBVUFMgY29uY2VybmluZyB0aGlzIGRvY3VtZW50LCBwbGVhc2UgcmVmZXIgdG8gdGhlIGRvY3VtZW50IGRhdGUgbG9jYXRlZCBvbiB0aGUgY292ZXIuDQpDb3B5cmlnaHQNClRoZSB1c2UsIGRpc2Nsb3N1cmUsIHJlcHJvZHVjdGlvbiwgbW9kaWZpY2F0aW9uLCB0cmFuc2Zlciwgb3IgdHJhbnNtaXR0YWwgb2YgdGhpcyB3b3JrIGZvciBhbnkgcHVycG9zZSBpbiBhbnkgZm9ybSBvciBieSBhbnkgbWVhbnMgd2l0aG91dCB0aGUgd3JpdHRlbiBw ZXJtaXNzaW9uIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBpcyBzdHJpY3RseSBwcm9oaWJpdGVk Lg0KwqkgQ29weXJpZ2h0IDIwMTYgVW5pdGVkIFBhcmNlbCBTZXJ2aWNlIG9mIEFtZXJpY2EsIElu Yy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC4NClRyYWRlbWFya3MNClVQUyBPbkxpbmXCriBpcyBhIHJl Z2lzdGVyZWQgdHJhZGVtYXJrIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJ bmMuIEFsbCBvdGhlciB0cmFkZW1hcmtzIGFyZSB0aGUgcHJvcGVydHkgb2YgdGhlaXIgcmVzcGVj dGl2ZSBvd25lcnMuDQpTb21lIG9mIHRoZSBVUFMgY29ycG9yYXRlIGFwcGxpY2F0aW9ucyB1c2Ug VS5TLiBjaXR5LCBzdGF0ZSwgYW5kIHBvc3RhbCBjb2RlIGluZm9ybWF0aW9uIG9idGFpbmVkIGJ5 IFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJbmMuIHVuZGVyIGEgbm9uLWV4Y2x1 c2l2ZSBsaWNlbnNlIGZyb20gdGhlIFVuaXRlZCBTdGF0ZXMgUG9zdGFsIFNlcnZpY2UuIA0K',
u'file_format': u'txt',
u'filename': u'test.txt',
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'password': u'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(
{u'action': u'UploadImages',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'images': [{u'content': u'Tm90aWNlDQpJbiBhbGwgY29tbXVuaWNhdGlvbnMgd2l0aCBVUFMgY29uY2VybmluZyB0aGlzIGRvY3VtZW50LCBwbGVhc2UgcmVmZXIgdG8gdGhlIGRvY3VtZW50IGRhdGUgbG9jYXRlZCBvbiB0aGUgY292ZXIuDQpDb3B5cmlnaHQNClRoZSB1c2UsIGRpc2Nsb3N1cmUsIHJlcHJvZHVjdGlvbiwgbW9kaWZpY2F0aW9uLCB0cmFuc2Zlciwgb3IgdHJhbnNtaXR0YWwgb2YgdGhpcyB3b3JrIGZvciBhbnkgcHVycG9zZSBpbiBhbnkgZm9ybSBvciBieSBhbnkgbWVhbnMgd2l0aG91dCB0aGUgd3JpdHRlbiBw ZXJtaXNzaW9uIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBpcyBzdHJpY3RseSBwcm9oaWJpdGVk Lg0KwqkgQ29weXJpZ2h0IDIwMTYgVW5pdGVkIFBhcmNlbCBTZXJ2aWNlIG9mIEFtZXJpY2EsIElu Yy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC4NClRyYWRlbWFya3MNClVQUyBPbkxpbmXCriBpcyBhIHJl Z2lzdGVyZWQgdHJhZGVtYXJrIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJ bmMuIEFsbCBvdGhlciB0cmFkZW1hcmtzIGFyZSB0aGUgcHJvcGVydHkgb2YgdGhlaXIgcmVzcGVj dGl2ZSBvd25lcnMuDQpTb21lIG9mIHRoZSBVUFMgY29ycG9yYXRlIGFwcGxpY2F0aW9ucyB1c2Ug VS5TLiBjaXR5LCBzdGF0ZSwgYW5kIHBvc3RhbCBjb2RlIGluZm9ybWF0aW9uIG9idGFpbmVkIGJ5 IFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJbmMuIHVuZGVyIGEgbm9uLWV4Y2x1 c2l2ZSBsaWNlbnNlIGZyb20gdGhlIFVuaXRlZCBTdGF0ZXMgUG9zdGFsIFNlcnZpY2UuIA0K',
u'id': u'IMAGE_1'},
{u'content': u'Tm90aWNlDQpJbiBhbGwgY29tbXVuaWNhdGlvbnMgd2l0aCBVUFMgY29uY2VybmluZyB0aGlzIGRvY3VtZW50LCBwbGVhc2UgcmVmZXIgdG8gdGhlIGRvY3VtZW50IGRhdGUgbG9jYXRlZCBvbiB0aGUgY292ZXIuDQpDb3B5cmlnaHQNClRoZSB1c2UsIGRpc2Nsb3N1cmUsIHJlcHJvZHVjdGlvbiwgbW9kaWZpY2F0aW9uLCB0cmFuc2Zlciwgb3IgdHJhbnNtaXR0YWwgb2YgdGhpcyB3b3JrIGZvciBhbnkgcHVycG9zZSBpbiBhbnkgZm9ybSBvciBieSBhbnkgbWVhbnMgd2l0aG91dCB0aGUgd3JpdHRlbiBw ZXJtaXNzaW9uIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBpcyBzdHJpY3RseSBwcm9oaWJpdGVk Lg0KwqkgQ29weXJpZ2h0IDIwMTYgVW5pdGVkIFBhcmNlbCBTZXJ2aWNlIG9mIEFtZXJpY2EsIElu Yy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC4NClRyYWRlbWFya3MNClVQUyBPbkxpbmXCriBpcyBhIHJl Z2lzdGVyZWQgdHJhZGVtYXJrIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJ bmMuIEFsbCBvdGhlciB0cmFkZW1hcmtzIGFyZSB0aGUgcHJvcGVydHkgb2YgdGhlaXIgcmVzcGVj dGl2ZSBvd25lcnMuDQpTb21lIG9mIHRoZSBVUFMgY29ycG9yYXRlIGFwcGxpY2F0aW9ucyB1c2Ug VS5TLiBjaXR5LCBzdGF0ZSwgYW5kIHBvc3RhbCBjb2RlIGluZm9ybWF0aW9uIG9idGFpbmVkIGJ5 IFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJbmMuIHVuZGVyIGEgbm9uLWV4Y2x1 c2l2ZSBsaWNlbnNlIGZyb20gdGhlIFVuaXRlZCBTdGF0ZXMgUG9zdGFsIFNlcnZpY2UuIA0K',
u'id': u'IMAGE_2'}],
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'password': u'YOUR_PASSWORD',
u'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(
{u'action': u'VoidShipment',
u'carrier': u'FedEx',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'password': u'YOUR_PASSWORD',
u'shipment_id': u'123123123',
u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx-FIMS',
u'params': {u'airway_bill': u'123456789098',
u'customs': [{u'country_of_manufacture': u'US',
u'customs_description': u'books',
u'customs_hs_tariff': u'2100',
u'customs_line_amount': 10,
u'customs_weight': 10}],
u'packages': [{u'height': 10,
u'length': 10,
u'weight': 15,
u'width': 10}],
u'password': u'YOUR_FIMS_SERVICE_ID',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Main St',
u'to_city': u'Beverly Hills',
u'to_code': u'90210',
u'to_country': u'CA',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'CA',
u'username': u'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(
{u'action': u'AddressValidate',
u'carrier': u'FedEx-REST',
u'params': {u'key': u'your-key-from-authenticate-request',
u'test': True,
u'to_addr1': u'123 Main St',
u'to_city': u'Beverly Hills',
u'to_code': u'90210',
u'to_name': u'John Doe',
u'to_state': u'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(
{u'action': u'Authenticate',
u'carrier': u'FedEx-REST',
u'params': {u'client_id': u'abc123',
u'client_secret': u'def987',
u'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(
{u'action': u'GetAllRates',
u'carrier': u'FedEx-REST',
u'params': {u'customs': [],
u'freight_account_number': u'abc123',
u'key': u'your-key-from-authenticate-request',
u'packages': [{u'description': u'furniture',
u'freight_class': u'50',
u'sub_packaging_type': u'PALLET',
u'weight': 200}],
u'ship_addr1': u'1202 Chalet Ln',
u'ship_addr2': u'Do Not Delete - Test Account',
u'ship_city': u'Harrison',
u'ship_code': u'72601',
u'ship_country': u'US',
u'ship_state': u'AR',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_city': u'Akron',
u'to_code': u'44333',
u'to_country': u'US',
u'to_state': u'OH',
u'weight_unit': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx-REST',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'key': u'your-key-from-authenticate-request',
u'packages': [{u'weight': 15}],
u'packaging_type': u'YOUR_PACKAGING',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Main St',
u'to_city': u'Beverly Hills',
u'to_code': u'90210',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'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 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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx-REST',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'key': u'your-key-from-authenticate-request',
u'packages': [{u'alcohol': True, u'weight': 15}],
u'packaging_type': u'YOUR_PACKAGING',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Main St',
u'to_city': u'Beverly Hills',
u'to_code': u'90210',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx-REST',
u'params': {u'key': u'your-key-from-authenticate-request',
u'packages': [{u'alcohol': True, u'weight': 15}],
u'packaging_type': u'YOUR_PACKAGING',
u'recipient_type': u'LICENSEE',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Main St',
u'to_city': u'Beverly Hills',
u'to_code': u'90210',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx-REST',
u'params': {u'key': u'your-key-from-authenticate-request',
u'label': {u'printed_origin': {u'addr1': u'940 Presidio Ave',
u'city': u'San Francisco',
u'code': u'94112',
u'country': u'US',
u'name': u'John Doe',
u'phone': u'123-123-1234',
u'state': u'CA'}},
u'packages': [{u'weight': 15}],
u'packaging_type': u'YOUR_PACKAGING',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Main St',
u'to_city': u'Beverly Hills',
u'to_code': u'90210',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx-REST',
u'params': {u'billing': [{u'account': u'abc123',
u'country_code': u'US',
u'payment_type': u'recipient',
u'postal_code': u'94608',
u'type': u'transportation'}],
u'image_type': u'GIF',
u'key': u'your-key-from-authenticate-request',
u'packages': [{u'length': 7, u'weight': 4}],
u'service': u'FEDEX_GROUND',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'940 Presidio Ave',
u'to_addr2': u'#103',
u'to_city': u'San Francisco',
u'to_code': u'94115',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx-REST',
u'params': {u'key': u'your-key-from-authenticate-request',
u'packages': [{u'dry_ice': {u'weight': 2}, u'weight': 15}],
u'packaging_type': u'YOUR_PACKAGING',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Main St',
u'to_city': u'Beverly Hills',
u'to_code': u'90210',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx-REST',
u'params': {u'key': u'your-key-from-authenticate-request',
u'notify': [{u'email': u'customer@email.com',
u'type': u'ON_SHIPMENT,ON_TENDER,ON_EXCEPTION,ON_DELIVERY'}],
u'packages': [{u'weight': 15}],
u'packaging_type': u'YOUR_PACKAGING',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Main St',
u'to_city': u'Beverly Hills',
u'to_code': u'90210',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx-REST',
u'params': {u'billing': [{u'account': u'abc123',
u'payment_type': u'collect',
u'type': u'transportation'}],
u'key': u'your-key-from-authenticate-request',
u'packages': [{u'height': 8,
u'length': 11,
u'reference_code': u'P_O_NUMBER',
u'reference_code2': u'CUSTOMER_REFERENCE',
u'reference_value': u'abc123',
u'reference_value2': u'123456',
u'weight': 5,
u'width': 14}],
u'packaging_type': u'YOUR_PACKAGING',
u'ship_addr1': u'123 Main St.',
u'ship_city': u'Vancouver',
u'ship_code': u'98685',
u'ship_country': u'US',
u'ship_phone': u'123-123-1234',
u'ship_state': u'WA',
u'shipper': u'Acme Inc',
u'test': True,
u'to_addr1': u'123 Fake St.',
u'to_city': u'New Hyde Park',
u'to_code': u'11040',
u'to_country': u'US',
u'to_name': u'Big Box Store',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx-REST',
u'params': {u'key': u'your-key-from-authenticate-request',
u'label': {u'masked_data': [u'SHIPPER_ACCOUNT_NUMBER']},
u'packages': [{u'weight': 15}],
u'packaging_type': u'YOUR_PACKAGING',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Main St',
u'to_city': u'Beverly Hills',
u'to_code': u'90210',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx-REST',
u'params': {u'hold_addr1': u'8549 Wilshire Blvd',
u'hold_at_location': True,
u'hold_city': u'Beverly Hills',
u'hold_code': u'90211',
u'hold_country': u'US',
u'hold_phone': u'1231231234',
u'hold_state': u'CA',
u'key': u'your-key-from-authenticate-request',
u'packages': [{u'weight': 15}],
u'packaging_type': u'YOUR_PACKAGING',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Main St',
u'to_city': u'Beverly Hills',
u'to_code': u'90210',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx',
u'params': {u'key': u'your-key-from-authenticate-request',
u'packages': [{u'signature_type': u'NO_SIGNATURE_REQUIRED',
u'weight': 15}],
u'packaging_type': u'YOUR_PACKAGING',
u'residential': True,
u'service': u'GROUND_HOME_DELIVERY',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Main St',
u'to_city': u'Beverly Hills',
u'to_code': u'90210',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'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": "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-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'test' => true,
'customs_value' => 10,
'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx-REST',
u'params': {u'currency': u'CAD',
u'customs': [{u'country_of_manufacture': u'US',
u'customs_description': u'My Description',
u'customs_line_amount': 50.0,
u'customs_quantity': 1,
u'customs_quantity_units': u'EA',
u'customs_weight': 2.5}],
u'customs_value': 10,
u'image_type': u'PNG',
u'key': u'your-key-from-authenticate-request',
u'length_unit': u'IN',
u'packages': [{u'height': 1,
u'length': 1,
u'weight': 5,
u'width': 1}],
u'packaging_type': u'YOUR_PACKAGING',
u'pickup_type': u'02',
u'service': u'INTERNATIONAL_PRIORITY',
u'ship_addr1': u'2000 Meadowvale Rd',
u'ship_city': u'Toronto',
u'ship_code': u'M1B5K7',
u'ship_contact': u'John Doe',
u'ship_country': u'CA',
u'ship_phone': u'1231231234',
u'ship_state': u'ON',
u'shipment_description': u'xxx',
u'shipper': u'John Doe',
u'sold_addr1': u'2000 Meadowvale Rd',
u'sold_city': u'Toronto',
u'sold_code': u'M1B5K7',
u'sold_company': u'Acme Inc.',
u'sold_country': u'CA',
u'sold_name': u'John Doe',
u'sold_phone': u'1231231234',
u'sold_state': u'ON',
u'sold_tax_id': u'123abc',
u'test': True,
u'to_addr1': u'2300 Southern Blvd',
u'to_attention_name': u'John Doe',
u'to_city': u'Bronx',
u'to_code': u'10460',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'NY',
u'weight_unit': u'LB'}}
)
rs.request(
{"carrier"=>"FedEx-REST",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"test"=>true,
"customs_value"=>10,
"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-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"test": true,
"customs_value": 10,
"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-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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx-REST',
u'params': {u'currency': u'CAD',
u'customs': [{u'country_of_manufacture': u'US',
u'customs_description': u'Legal Documents',
u'customs_line_amount': 0.0,
u'customs_quantity': 1,
u'customs_quantity_units': u'EA',
u'customs_weight': 1}],
u'customs_value': 0.0,
u'image_type': u'PNG',
u'key': u'your-key-from-authenticate-request',
u'length_unit': u'IN',
u'packages': [{u'weight': 1}],
u'packaging_type': u'FEDEX_ENVELOPE',
u'pickup_type': u'02',
u'service': u'INTERNATIONAL_PRIORITY',
u'ship_addr1': u'2000 Meadowvale Rd',
u'ship_city': u'Toronto',
u'ship_code': u'M1B5K7',
u'ship_contact': u'John Doe',
u'ship_country': u'CA',
u'ship_phone': u'1231231234',
u'ship_state': u'ON',
u'shipment_description': u'xxx',
u'shipper': u'John Doe',
u'sold_addr1': u'2000 Meadowvale Rd',
u'sold_city': u'Toronto',
u'sold_code': u'M1B5K7',
u'sold_company': u'Acme Inc.',
u'sold_country': u'CA',
u'sold_name': u'John Doe',
u'sold_phone': u'1231231234',
u'sold_state': u'ON',
u'sold_tax_id': u'123abc',
u'test': True,
u'to_addr1': u'2300 Southern Blvd',
u'to_attention_name': u'John Doe',
u'to_city': u'Bronx',
u'to_code': u'10460',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'NY',
u'weight_unit': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx-REST',
u'params': {u'b13a_filing_option': u'NOT_REQUIRED',
u'currency': u'USD',
u'customs': [{u'country_of_manufacture': u'US',
u'customs_description': u'Cards',
u'customs_line_amount': 55,
u'customs_quantity': 500,
u'customs_quantity_units': u'EA',
u'customs_weight': 10}],
u'customs_value': 262.89,
u'export_compliance_statement': u'NO EEI 30.37(f)',
u'fedex_one_rate': False,
u'generate_docs': [u'COMMERCIAL_INVOICE'],
u'key': u'your-key-from-authenticate-request',
u'length_unit': u'IN',
u'negotiated_rates': True,
u'packages': [{u'height': 0,
u'length': 0,
u'reference_code': u'INVOICE_NUMBER',
u'reference_value': u'79631',
u'weight': 12,
u'width': 0}],
u'packaging_type': u'YOUR_PACKAGING',
u'service': u'INTERNATIONAL_PRIORITY',
u'ship_addr1': u'273 Cahaba Valley Pkwy',
u'ship_city': u'Pelham',
u'ship_code': u'35124',
u'ship_contact': u'Sales Person2',
u'ship_country': u'US',
u'ship_phone': u'(123) 123.6183',
u'ship_state': u'AL',
u'shipment_description': u'PRINTED MATERIALS',
u'shipper': u'Acme, Inc.',
u'sold_addr1': u'Calle 151',
u'sold_city': u'Bogota',
u'sold_code': u'110131',
u'sold_company': u'Acme, Inc.',
u'sold_country': u'CO',
u'sold_name': u'John Doe',
u'sold_phone': u'1113444356',
u'sold_state': None,
u'sold_tax_id': u'',
u'test': True,
u'to_addr1': u'Calle 151',
u'to_attention_name': u'John Doe',
u'to_city': u'Bogota',
u'to_code': u'110131',
u'to_company': u'Bogota DC',
u'to_country': u'CO',
u'to_name': u'John Doe',
u'to_phone': u'1113444356',
u'to_state': None,
u'weight_unit': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx',
u'params': {u'currency': u'CAD',
u'customs': [{u'country_of_manufacture': u'US',
u'customs_description': u'My Description',
u'customs_hs_tariff': u'2000',
u'customs_line_amount': 50.0,
u'customs_quantity': 1,
u'customs_quantity_units': u'EA',
u'customs_weight': 2.5},
{u'country_of_manufacture': u'US',
u'customs_description': u'My Description',
u'customs_line_amount': 50.0,
u'customs_quantity': 1,
u'customs_quantity_units': u'EA',
u'customs_weight': 2.5,
u'number_of_packages_per_commodity': 2}],
u'customs_misc_charge': 10.0,
u'customs_misc_charge_type': u'OTHER',
u'customs_value': 100.0,
u'generate_docs': [u'COMMERCIAL_INVOICE',
u'NAFTA_CERTIFICATE_OF_ORIGIN'],
u'image_type': u'PNG',
u'key': u'your-key-from-authenticate-request',
u'length_unit': u'IN',
u'packages': [{u'height': 1,
u'length': 1,
u'weight': 5,
u'width': 1}],
u'packaging_type': u'YOUR_PACKAGING',
u'paperless_customs': True,
u'pickup_type': u'02',
u'service': u'INTERNATIONAL_PRIORITY',
u'ship_addr1': u'2000 Meadowvale Rd',
u'ship_city': u'Toronto',
u'ship_code': u'M1B5K7',
u'ship_contact': u'John Doe',
u'ship_country': u'CA',
u'ship_phone': u'1231231234',
u'ship_state': u'ON',
u'shipment_description': u'xxx',
u'shipper': u'John Doe',
u'sold_addr1': u'2000 Meadowvale Rd',
u'sold_city': u'Toronto',
u'sold_code': u'M1B5K7',
u'sold_company': u'Acme Inc.',
u'sold_country': u'CA',
u'sold_name': u'John Doe',
u'sold_phone': u'1231231234',
u'sold_state': u'ON',
u'sold_tax_id': u'123abc',
u'test': True,
u'to_addr1': u'2300 Southern Blvd',
u'to_attention_name': u'John Doe',
u'to_city': u'Bronx',
u'to_code': u'10460',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'NY',
u'weight_unit': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx-REST',
u'params': {u'billing': [{u'payment_type': u'SENDER', u'type': u'duties'}],
u'currency': u'USD',
u'customs': [{u'country_of_manufacture': u'US',
u'customs_description': u'My Description',
u'customs_line_amount': 50.0,
u'customs_quantity': 1,
u'customs_quantity_units': u'EA',
u'customs_weight': 2.5}],
u'key': u'your-key-from-authenticate-request',
u'packages': [{u'weight': 15}],
u'packaging_type': u'YOUR_PACKAGING',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'2000 Meadowvale Rd',
u'to_city': u'Toronto',
u'to_code': u'M1B5K7',
u'to_country': u'CA',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx-REST',
u'params': {u'currency': u'CAD',
u'customs': [{u'country_of_manufacture': u'US',
u'customs_description': u'My Description',
u'customs_hs_tariff': u'2000',
u'customs_line_amount': 50.0,
u'customs_quantity': 1,
u'customs_quantity_units': u'EA',
u'customs_weight': 2.5},
{u'country_of_manufacture': u'US',
u'customs_description': u'My Description',
u'customs_line_amount': 50.0,
u'customs_quantity': 1,
u'customs_quantity_units': u'EA',
u'customs_weight': 2.5,
u'number_of_packages_per_commodity': 2}],
u'customs_misc_charge': 10.0,
u'customs_misc_charge_type': u'OTHER',
u'customs_value': 100.0,
u'generate_docs': [u'COMMERCIAL_INVOICE',
u'NAFTA_CERTIFICATE_OF_ORIGIN'],
u'image_type': u'PNG',
u'key': u'your-key-from-authenticate-request',
u'length_unit': u'IN',
u'packages': [{u'height': 1,
u'length': 1,
u'weight': 5,
u'width': 1}],
u'packaging_type': u'YOUR_PACKAGING',
u'pickup_type': u'02',
u'service': u'INTERNATIONAL_PRIORITY',
u'ship_addr1': u'2000 Meadowvale Rd',
u'ship_city': u'Toronto',
u'ship_code': u'M1B5K7',
u'ship_contact': u'John Doe',
u'ship_country': u'CA',
u'ship_phone': u'1231231234',
u'ship_state': u'ON',
u'shipment_description': u'xxx',
u'shipper': u'John Doe',
u'sold_addr1': u'2000 Meadowvale Rd',
u'sold_city': u'Toronto',
u'sold_code': u'M1B5K7',
u'sold_company': u'Acme Inc.',
u'sold_country': u'CA',
u'sold_name': u'John Doe',
u'sold_phone': u'1231231234',
u'sold_state': u'ON',
u'sold_tax_id': u'123abc',
u'test': True,
u'to_addr1': u'2300 Southern Blvd',
u'to_attention_name': u'John Doe',
u'to_city': u'Bronx',
u'to_code': u'10460',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'NY',
u'weight_unit': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx-REST',
u'params': {u'currency': u'CAD',
u'custom_images': [{u'document': u'CommercialInvoice',
u'id': u'IMAGE_1',
u'type': u'SIGNATURE'}],
u'customs': [{u'country_of_manufacture': u'US',
u'customs_description': u'My Description',
u'customs_hs_tariff': u'2000',
u'customs_line_amount': 50.0,
u'customs_quantity': 1,
u'customs_quantity_units': u'EA',
u'customs_weight': 2.5},
{u'country_of_manufacture': u'US',
u'customs_description': u'My Description',
u'customs_line_amount': 50.0,
u'customs_quantity': 1,
u'customs_quantity_units': u'EA',
u'customs_weight': 2.5,
u'number_of_packages_per_commodity': 2}],
u'customs_value': 100.0,
u'generate_docs': [u'COMMERCIAL_INVOICE',
u'NAFTA_CERTIFICATE_OF_ORIGIN'],
u'image_type': u'PNG',
u'key': u'your-key-from-authenticate-request',
u'length_unit': u'IN',
u'packages': [{u'height': 1,
u'length': 1,
u'weight': 5,
u'width': 1}],
u'packaging_type': u'YOUR_PACKAGING',
u'pickup_type': u'02',
u'service': u'INTERNATIONAL_PRIORITY',
u'ship_addr1': u'2000 Meadowvale Rd',
u'ship_city': u'Toronto',
u'ship_code': u'M1B5K7',
u'ship_contact': u'John Doe',
u'ship_country': u'CA',
u'ship_phone': u'1231231234',
u'ship_state': u'ON',
u'shipment_description': u'xxx',
u'shipper': u'John Doe',
u'sold_addr1': u'2000 Meadowvale Rd',
u'sold_city': u'Toronto',
u'sold_code': u'M1B5K7',
u'sold_company': u'Acme Inc.',
u'sold_country': u'CA',
u'sold_name': u'John Doe',
u'sold_phone': u'1231231234',
u'sold_state': u'ON',
u'sold_tax_id': u'123abc',
u'test': True,
u'to_addr1': u'2300 Southern Blvd',
u'to_attention_name': u'John Doe',
u'to_city': u'Bronx',
u'to_code': u'10460',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'NY',
u'weight_unit': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx-REST',
u'params': {u'account_number': u'your-account-number',
u'key': u'your-key-from-authenticate-request',
u'packages': [{u'battery': {u'packing_type': u'PACKED_WITH_EQUIPMENT',
u'type': u'LITHIUM_ION'},
u'weight': 15}],
u'packaging_type': u'YOUR_PACKAGING',
u'service': u'FEDEX_2_DAY',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Main St',
u'to_city': u'Beverly Hills',
u'to_code': u'90210',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'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",
"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-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'YOUR_KEY',
'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',
'password' => 'YOUR_PASSWORD',
'packaging_type' => 'YOUR_PACKAGING',
'test' => true,
),
)
);
rs.request(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx-REST',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'packages': [{u'weight': 5}, {u'weight': 10}],
u'packaging_type': u'YOUR_PACKAGING',
u'password': u'YOUR_PASSWORD',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Main St',
u'to_city': u'Beverly Hills',
u'to_code': u'90210',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'CA'}}
)
rs.request(
{"carrier"=>"FedEx-REST",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"YOUR_KEY",
"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",
"password"=>"YOUR_PASSWORD",
"packaging_type"=>"YOUR_PACKAGING",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"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-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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx-REST',
u'params': {u'currency': u'CAD',
u'customs': [{u'country_of_manufacture': u'US',
u'customs_description': u'My Description',
u'customs_line_amount': 50.0,
u'customs_quantity': 1,
u'customs_quantity_units': u'EA',
u'customs_weight': 2.5}],
u'image_type': u'PNG',
u'key': u'your-key-from-authenticate-request',
u'length_unit': u'IN',
u'packages': [{u'height': 1,
u'length': 1,
u'weight': 5,
u'width': 1},
{u'height': 1,
u'length': 1,
u'weight': 5,
u'width': 1}],
u'packaging_type': u'YOUR_PACKAGING',
u'pickup_type': u'02',
u'service': u'INTERNATIONAL_PRIORITY',
u'ship_addr1': u'2000 Meadowvale Rd',
u'ship_city': u'Toronto',
u'ship_code': u'M1B5K7',
u'ship_contact': u'John Doe',
u'ship_country': u'CA',
u'ship_phone': u'1231231234',
u'ship_state': u'ON',
u'shipment_description': u'xxx',
u'shipper': u'John Doe',
u'sold_addr1': u'2000 Meadowvale Rd',
u'sold_city': u'Toronto',
u'sold_code': u'M1B5K7',
u'sold_company': u'Acme Inc.',
u'sold_country': u'CA',
u'sold_name': u'John Doe',
u'sold_phone': u'1231231234',
u'sold_state': u'ON',
u'sold_tax_id': u'123abc',
u'test': True,
u'to_addr1': u'2300 Southern Blvd',
u'to_attention_name': u'John Doe',
u'to_city': u'Bronx',
u'to_code': u'10460',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'NY',
u'weight_unit': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx-REST',
u'params': {u'dropoff_type': u'REGULAR_PICKUP',
u'fedex_one_rate': True,
u'packages': [{u'weight': 15}],
u'packaging_type': u'FEDEX_SMALL_BOX',
u'service': u'FEDEX_EXPRESS_SAVER',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Main St',
u'to_city': u'Beverly Hills',
u'to_code': u'90210',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx-REST',
u'params': {u'key': u'your-key-from-authenticate-request',
u'packages': [{u'reference_code': u'INVOICE_NUMBER',
u'reference_code2': u'P_O_NUMBER',
u'reference_value': u'#123',
u'reference_value2': u'B2C',
u'weight': 15}],
u'packaging_type': u'YOUR_PACKAGING',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Main St',
u'to_city': u'Beverly Hills',
u'to_code': u'90210',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx-REST',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'key': u'YOUR_KEY',
u'meter_number': u'YOUR_METER_NUMBER',
u'packages': [{u'weight': 15}],
u'packaging_type': u'YOUR_PACKAGING',
u'password': u'YOUR_PASSWORD',
u'residential': True,
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Main St',
u'to_city': u'Beverly Hills',
u'to_code': u'90210',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx-REST',
u'params': {u'key': u'your-key-from-authenticate-request',
u'notify': [{u'email': u'bob@email.com', u'type': u'RETURN'}],
u'packages': [{u'weight': 2}],
u'packaging_type': u'YOUR_PACKAGING',
u'return_code': u'PRINT_RETURN_LABEL',
u'ship_addr1': u'940 Presidio Ave',
u'ship_addr2': u'#103',
u'ship_city': u'San Francisco',
u'ship_code': u'94115',
u'ship_phone': u'1231231234',
u'ship_state': u'CA',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'124 Main St',
u'to_city': u'Beverly Hills',
u'to_code': u'90210',
u'to_name': u'John Doe Schmoe',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx-REST',
u'params': {u'key': u'your-key-from-authenticate-request',
u'packages': [{u'weight': 2}],
u'packaging_type': u'YOUR_PACKAGING',
u'return_code': u'PRINT_RETURN_LABEL',
u'ship_addr1': u'940 Presidio Ave',
u'ship_addr2': u'#103',
u'ship_city': u'San Francisco',
u'ship_code': u'94115',
u'ship_phone': u'1231231234',
u'ship_state': u'CA',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Main St',
u'to_city': u'Beverly Hills',
u'to_code': u'90210',
u'to_name': u'John Doe Schmoe',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx-REST',
u'params': {u'key': u'your-key-from-authenticate-request',
u'packages': [{u'weight': 5}],
u'packaging_type': u'YOUR_PACKAGING',
u'service': u'SMART_POST',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'smart_post_hub_id': u'5552',
u'smart_post_indicia': u'PARCEL_SELECT',
u'test': True,
u'to_addr1': u'123 Main St',
u'to_city': u'Beverly Hills',
u'to_code': u'90210',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx-REST',
u'params': {u'billing': [{u'account': u'abc123',
u'company': u'Acme Inc.',
u'country_code': u'US',
u'payment_type': u'third_party',
u'postal_code': u'94608',
u'type': u'transportation'}],
u'key': u'your-key-from-authenticate-request',
u'packages': [{u'weight': 15}],
u'packaging_type': u'YOUR_PACKAGING',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Main St',
u'to_city': u'Beverly Hills',
u'to_code': u'90210',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'FedEx-REST',
u'params': {u'key': u'your-key-from-authenticate-request',
u'packages': [{u'insured_currency': u'USD',
u'insured_value': 899.0,
u'weight': 5}],
u'packaging_type': u'YOUR_PACKAGING',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Main St',
u'to_city': u'Beverly Hills',
u'to_code': u'90210',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'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(
{u'action': u'FindLocations',
u'carrier': u'FedEx-REST',
u'params': {u'attributes': [u'SATURDAY_DROPOFFS'],
u'key': u'your-key-from-authenticate-request',
u'locations': [u'FEDEX_OFFICE'],
u'radius': 50,
u'results_requested': 4,
u'ship_city': u'Briggs',
u'ship_code': u'78608-0001',
u'ship_country': u'US',
u'ship_state': u'TX',
u'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(
{u'action': u'CancelPickup',
u'carrier': u'FedEx-REST',
u'params': {u'key': u'your-key-from-authenticate-request',
u'pickup_id': u'CPU663460',
u'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(
{u'action': u'CreatePickup',
u'carrier': u'FedEx-REST',
u'params': {u'carrier_code': u'FDXE',
u'close_time': u'1600',
u'key': u'your-key-from-authenticate-request',
u'pickup_addr1': u'123 Main St',
u'pickup_addr2': u'123',
u'pickup_city': u'Emeryville',
u'pickup_code': u'94608',
u'pickup_company_name': u'Acme Inc',
u'pickup_contact_name': u'John Doe',
u'pickup_country': u'US',
u'pickup_date': u'20161212',
u'pickup_phone': u'123-123-1234',
u'pickup_state': u'CA',
u'ready_time': u'0800',
u'test': True,
u'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(
{u'action': u'CreatePickup',
u'carrier': u'FedEx-REST',
u'params': {u'close_time': u'1600',
u'key': u'your-key-from-authenticate-request',
u'pickup_addr1': u'123 Main St',
u'pickup_addr2': u'123',
u'pickup_city': u'Emeryville',
u'pickup_code': u'94608',
u'pickup_company_name': u'Acme Inc',
u'pickup_contact_name': u'John Doe',
u'pickup_country': u'US',
u'pickup_date': u'20161212',
u'pickup_phone': u'123-123-1234',
u'pickup_state': u'CA',
u'ready_time': u'0800',
u'test': True,
u'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(
{u'action': u'GetAllRates',
u'carrier': u'FedEx-REST',
u'params': {u'account_number': u'1234567890',
u'customs': [],
u'dropoff_type': u'USE_SCHEDULED_PICKUP',
u'key': u'your-key-from-authenticate-request',
u'negotiated_rates': True,
u'packages': [{u'weight': 2}, {u'weight': 5}],
u'packaging_type': u'YOUR_PACKAGING',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_state': u'MT',
u'shipper': u'My Company',
u'test': True,
u'to_code': u'90210',
u'to_country': u'US',
u'to_state': u'CA',
u'weight_unit': u'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(
{u'action': u'GetAllRates',
u'carrier': u'FedEx-REST',
u'params': {u'account_number': u'your-account-number',
u'customs': [{u'country_of_manufacture': u'US',
u'customs_description': u'Brass Trumpet in Case',
u'customs_quantity': 1,
u'customs_quantity_units': u'EA',
u'customs_value': 10.0,
u'customs_weight': 2.5}],
u'dropoff_type': u'USE_SCHEDULED_PICKUP',
u'key': u'your-key-from-authenticate-request',
u'negotiated_rates': True,
u'packages': [{u'weight': 2.5}],
u'packaging_type': u'YOUR_PACKAGING',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Burnsville',
u'ship_code': u'55337',
u'ship_country': u'US',
u'ship_phone': u'123-123-1234',
u'ship_state': u'MN',
u'to_city': u'New Glasgow',
u'to_code': u'B2H3Y5',
u'to_country': u'CA',
u'to_state': u'NS',
u'weight_unit': u'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(
{u'action': u'GetAllRates',
u'carrier': u'FedEx-REST',
u'params': {u'customs': [],
u'dropoff_type': u'USE_SCHEDULED_PICKUP',
u'fedex_one_rate': True,
u'packages': [{u'weight': 2}],
u'packaging_type': u'FEDEX_SMALL_BOX',
u'service': u'FEDEX_EXPRESS_SAVER',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_code': u'90210',
u'to_country': u'US',
u'to_state': u'CA',
u'weight_unit': u'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(
{u'action': u'TimeInTransit',
u'carrier': u'FedEx-REST',
u'params': {u'key': u'your-key-from-authenticate-request',
u'ship_code': u'94608',
u'ship_country': u'US',
u'test': True,
u'to_code': u'90210',
u'to_country': u'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(
{u'action': u'track',
u'carrier': u'FedEx-REST',
u'params': {u'key': u'your-key-from-authenticate-request',
u'test': True,
u'tracking_number': u'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 - 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(
{u'action': u'UploadDocument',
u'carrier': u'FedEx-REST',
u'params': {u'document_type': u'013',
u'file_contents': u'Tm90aWNlDQpJbiBhbGwgY29tbXVuaWNhdGlvbnMgd2l0aCBVUFMgY29uY2VybmluZyB0aGlzIGRvY3VtZW50LCBwbGVhc2UgcmVmZXIgdG8gdGhlIGRvY3VtZW50IGRhdGUgbG9jYXRlZCBvbiB0aGUgY292ZXIuDQpDb3B5cmlnaHQNClRoZSB1c2UsIGRpc2Nsb3N1cmUsIHJlcHJvZHVjdGlvbiwgbW9kaWZpY2F0aW9uLCB0cmFuc2Zlciwgb3IgdHJhbnNtaXR0YWwgb2YgdGhpcyB3b3JrIGZvciBhbnkgcHVycG9zZSBpbiBhbnkgZm9ybSBvciBieSBhbnkgbWVhbnMgd2l0aG91dCB0aGUgd3JpdHRlbiBwZXJtaXNzaW9uIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBpcyBzdHJpY3RseSBwcm9oaWJpdGVkLg0KwqkgQ29weXJpZ2h0IDIwMTYgVW5pdGVkIFBhcmNlbCBTZXJ2aWNlIG9mIEFtZXJpY2EsIEluYy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC4NClRyYWRlbWFya3MNClVQUyBPbkxpbmXCriBpcyBhIHJlZ2lzdGVyZWQgdHJhZGVtYXJrIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJbmMuIEFsbCBvdGhlciB0cmFkZW1hcmtzIGFyZSB0aGUgcHJvcGVydHkgb2YgdGhlaXIgcmVzcGVjdGl2ZSBvd25lcnMuDQpTb21lIG9mIHRoZSBVUFMgY29ycG9yYXRlIGFwcGxpY2F0aW9ucyB1c2UgVS5TLiBjaXR5LCBzdGF0ZSwgYW5kIHBvc3RhbCBjb2RlIGluZm9ybWF0aW9uIG9idGFpbmVkIGJ5IFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJbmMuIHVuZGVyIGEgbm9uLWV4Y2x1c2l2ZSBsaWNlbnNlIGZyb20gdGhlIFVuaXRlZCBTdGF0ZXMgUG9zdGFsIFNlcnZpY2UuIA0K',
u'file_format': u'txt',
u'filename': u'test.txt',
u'key': u'your-key-from-authenticate-request',
u'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(
{u'action': u'uploadimages',
u'carrier': u'FedEx-REST',
u'params': {u'images': [{u'content': u'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+A8AAQUBAScY42YAAAAASUVORK5CYII=',
u'id': u'IMAGE_1',
u'mime_type': u'image/png',
u'type': u'SIGNATURE'}],
u'key': u'your-key-from-authenticate-request',
u'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(
{u'action': u'VoidShipment',
u'carrier': u'FedEx-REST',
u'params': {u'key': u'your-key-from-authenticate-request',
u'shipment_id': u'123123123',
u'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(
{u'action': u'SubmitShipment',
u'carrier': u'GLS',
u'params': {u'account_number': u'YOUR_ACCOUNT',
u'packages': [{u'weight': 15}],
u'password': u'YOUR_PASSWORD',
u'service': u'PDS',
u'ship_addr1': u'1401 Park Ave',
u'ship_city': u'Emeryville',
u'ship_code': u'94608',
u'ship_phone': u'1231231234',
u'ship_state': u'CA',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Main St',
u'to_city': u'Beverly Hills',
u'to_code': u'90210',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'CA',
u'username': u'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(
{u'action': u'VoidShipment',
u'carrier': u'GLS',
u'params': {u'account_number': u'YOUR_ACCOUNT',
u'password': u'YOUR_PASSWORD',
u'shipment_id': u'ABC123',
u'test': True,
u'username': u'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(
{u'action': u'GetAllRates',
u'carrier': u'GLS',
u'params': {u'account_number': u'YOUR_ACCOUNT',
u'password': u'YOUR_PASSWORD',
u'ship_code': u'94608',
u'test': True,
u'to_code': u'90210',
u'username': u'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(
{u'action': u'Track',
u'carrier': u'GLS',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'password': u'YOUR_PASSWORD',
u'tracking_number': u'123456789012',
u'username': u'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(
{u'action': u'GetAllRates',
u'carrier': u'od',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'customs': [],
u'packages': [{u'freight_class': u'200', u'weight': 200}],
u'password': u'YOUR_PASSWORD',
u'ship_addr1': u'1202 Chalet Ln',
u'ship_addr2': u'Do Not Delete - Test Account',
u'ship_city': u'Harrison',
u'ship_code': u'72601',
u'ship_country': u'US',
u'ship_state': u'AR',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_city': u'Akron',
u'to_code': u'44333',
u'to_country': u'US',
u'to_state': u'OH',
u'username': u'YOUR_USERNAME',
u'weight_unit': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'OD',
u'params': {u'packages': [{u'description': u'This is a test shipment',
u'freight_class': u'50',
u'height': 100,
u'length': 150,
u'packaging_type': u'skid',
u'pieces': 10,
u'weight': 200.0,
u'width': 90}],
u'password': u'YOUR_PASSWORD',
u'ship_addr1': u'1202 Chalet Ln',
u'ship_addr2': u'fake shipment',
u'ship_city': u'San Diego',
u'ship_code': u'92101',
u'ship_email': u'your@email.com',
u'ship_phone': u'8705551234',
u'ship_state': u'CA',
u'shipper': u'Acme Company',
u'test': True,
u'to_addr1': u'1234 Main St',
u'to_addr2': u'Suite 200',
u'to_city': u'Akron',
u'to_code': u'44333',
u'to_name': u'ABC Widget Co',
u'to_phone': u'1231231234',
u'to_state': u'OH',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'OnTrac',
u'params': {u'packages': [{u'weight': 15}],
u'packaging_type': u'YOUR_PACKAGING',
u'service': u'S',
u'ship_addr1': u'940 Presidio Ave',
u'ship_city': u'San Francisco',
u'ship_code': u'94115',
u'ship_phone': u'1231231234',
u'ship_state': u'CA',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Main St',
u'to_city': u'Beverly Hills',
u'to_code': u'90210',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'OnTrac',
u'params': {u'packages': [{u'weight': 15}],
u'packaging_type': u'YOUR_PACKAGING',
u'reference_value': u'my ref 1',
u'reference_value2': u'my ref 2',
u'reference_value3': u'my ref 3',
u'service': u'S',
u'ship_addr1': u'940 Presidio Ave',
u'ship_city': u'San Francisco',
u'ship_code': u'94115',
u'ship_phone': u'1231231234',
u'ship_state': u'CA',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Main St',
u'to_city': u'Beverly Hills',
u'to_code': u'90210',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'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(
{u'action': u'CreatePickup',
u'carrier': u'OnTrac',
u'params': {u'account_number': u'37',
u'close_time': u'17:00:00.0Z',
u'password': u'testpass',
u'pickup_addr1': u'940 Presidio Ave',
u'pickup_city': u'San Francisco',
u'pickup_code': u'94115',
u'pickup_company_name': u'Acme Inc',
u'pickup_contact_name': u'Mark Sanborn',
u'pickup_date': u'20160112',
u'pickup_phone': u'123-123-1234',
u'pickup_state': u'CA',
u'ready_time': u'12:00:00.0Z',
u'test': True,
u'to_code': u'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(
{u'action': u'GetAllRates',
u'carrier': u'OnTrac',
u'params': {u'account_number': u'37',
u'customs': [],
u'packages': [{u'height': 7,
u'length': 5,
u'weight': 20.2,
u'width': 7}],
u'password': u'testpass',
u'service': u'',
u'ship_code': u'90210',
u'test': True,
u'to_code': u'94115',
u'weight_unit': u'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(
{u'action': u'track',
u'carrier': u'OnTrac',
u'params': {u'tracking_number': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'Purolator',
u'params': {u'image_type': u'PDF',
u'key': u'YOUR_API_USER_TOKEN',
u'packages': [{u'height': 5,
u'length': 7,
u'weight': 4,
u'width': 5}],
u'password': u'YOUR_PASSWORD',
u'service': u'PurolatorGround',
u'ship_addr1': u'5048 264 St',
u'ship_city': u'Aldergrove',
u'ship_code': u'V4W 1N7',
u'ship_country': u'CA',
u'ship_phone': u'1231231234',
u'ship_state': u'BC',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'5048 264 St, Aldergrove',
u'to_city': u'Aldergrove',
u'to_code': u'V4W 1N7',
u'to_country': u'CA',
u'to_name': u'John Doe',
u'to_state': u'BC',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'Purolator',
u'params': {u'carrier': u'Purolator',
u'customs': [{u'commodity_code': u'55',
u'country_of_manufacture': u'US',
u'customs_description': u'My Description',
u'customs_line_amount': 50.0,
u'customs_quantity': 1,
u'customs_quantity_units': u'EA',
u'customs_weight': 2.5}],
u'from_addr1': u'1300 Kamato Road',
u'from_city': u'Mississauga',
u'from_code': u'L4W2N2',
u'from_country': u'CA',
u'from_name': u'Mississauga',
u'from_phone': u'19052121055',
u'from_state': u'ON',
u'image_type': u'PDF',
u'length_unit': u'CM',
u'packages': [{u'height': 11,
u'length': 11,
u'reference_code': u'IN',
u'reference_value': u'1234567890 | CUST_NO | 4567890',
u'weight': 0.5,
u'width': 9}],
u'residential': True,
u'service': u'PurolatorGroundU.S.',
u'ship_addr1': u'1300 Kamato Road',
u'ship_city': u'Mississauga',
u'ship_code': u'L4W2N2',
u'ship_country': u'CA',
u'ship_name': u'Mississauga',
u'ship_phone': u'19052121055',
u'ship_state': u'ON',
u'shipment_description': u'My Custom Text',
u'shipper': u'Mississauga',
u'test': True,
u'to_addr1': u'2043 Forest Street',
u'to_attention_name': u'QC',
u'to_city': u'Jacksonville',
u'to_code': u'32204',
u'to_company': u'Urban Inspirations',
u'to_country': u'US',
u'to_name': u'US Jacksonville',
u'to_phone': u'9042887732',
u'to_state': u'FL',
u'weight_unit': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'Purolator',
u'params': {u'image_type': u'PDF',
u'key': u'YOUR_API_USER_TOKEN',
u'packages': [{u'height': 5,
u'length': 7,
u'weight': 4,
u'width': 5}],
u'password': u'YOUR_PASSWORD',
u'saturday_delivery': True,
u'service': u'PurolatorGround',
u'ship_addr1': u'5048 264 St',
u'ship_city': u'Aldergrove',
u'ship_code': u'V4W 1N7',
u'ship_country': u'CA',
u'ship_phone': u'1231231234',
u'ship_state': u'BC',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'5048 264 St, Aldergrove',
u'to_city': u'Aldergrove',
u'to_code': u'V4W 1N7',
u'to_country': u'CA',
u'to_name': u'John Doe',
u'to_state': u'BC',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'Purolator',
u'params': {u'image_type': u'PDF',
u'key': u'YOUR_API_USER_TOKEN',
u'packages': [{u'height': 5,
u'length': 7,
u'signature_type': u'DIRECT',
u'weight': 4,
u'width': 5}],
u'password': u'YOUR_PASSWORD',
u'service': u'PurolatorGround',
u'ship_addr1': u'5048 264 St',
u'ship_city': u'Aldergrove',
u'ship_code': u'V4W 1N7',
u'ship_country': u'CA',
u'ship_phone': u'1231231234',
u'ship_state': u'BC',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'5048 264 St, Aldergrove',
u'to_city': u'Aldergrove',
u'to_code': u'V4W 1N7',
u'to_country': u'CA',
u'to_name': u'John Doe',
u'to_state': u'BC',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'Purolator',
u'params': {u'billing': [{u'account': u'abc123',
u'payment_type': u'third_party',
u'type': u'transportation'}],
u'image_type': u'PDF',
u'key': u'YOUR_API_USER_TOKEN',
u'packages': [{u'height': 5,
u'length': 7,
u'weight': 4,
u'width': 5}],
u'password': u'YOUR_PASSWORD',
u'service': u'PurolatorGround',
u'ship_addr1': u'5048 264 St',
u'ship_city': u'Aldergrove',
u'ship_code': u'V4W 1N7',
u'ship_country': u'CA',
u'ship_phone': u'1231231234',
u'ship_state': u'BC',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'5048 264 St, Aldergrove',
u'to_city': u'Aldergrove',
u'to_code': u'V4W 1N7',
u'to_country': u'CA',
u'to_name': u'John Doe',
u'to_state': u'BC',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'Purolator',
u'params': {u'image_type': u'PDF',
u'key': u'YOUR_API_USER_TOKEN',
u'packages': [{u'height': 5,
u'length': 7,
u'reference_value': u'test',
u'reference_value2': u'test2',
u'reference_value3': u'test3',
u'weight': 4,
u'width': 5}],
u'password': u'YOUR_PASSWORD',
u'service': u'PurolatorGround',
u'ship_addr1': u'5048 264 St',
u'ship_city': u'Aldergrove',
u'ship_code': u'V4W 1N7',
u'ship_country': u'CA',
u'ship_phone': u'1231231234',
u'ship_state': u'BC',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'5048 264 St, Aldergrove',
u'to_city': u'Aldergrove',
u'to_code': u'V4W 1N7',
u'to_country': u'CA',
u'to_name': u'John Doe',
u'to_state': u'BC',
u'username': u'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(
{u'action': u'GetAllRates',
u'carrier': u'purolator',
u'params': {u'key': u'YOUR_API_USER_TOKEN',
u'packages': [{u'height': 5,
u'length': 5,
u'packaging_type': u'CustomerPackaging',
u'weight': 5,
u'width': 5}],
u'password': u'YOUR_PASSWORD',
u'ship_city': u'BELLEVILLE',
u'ship_code': u'K8N5W6',
u'test': True,
u'to_code': u'V5K0A1',
u'to_country': u'CA',
u'username': u'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(
{u'action': u'Track',
u'carrier': u'purolator',
u'params': {u'key': u'YOUR_API_USER_TOKEN',
u'password': u'YOUR_PASSWORD',
u'test': True,
u'tracking_number': u'1Z12345E0205271688',
u'username': u'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(
{u'action': u'VoidShipment',
u'carrier': u'Purolator',
u'params': {u'key': u'YOUR_API_USER_TOKEN',
u'password': u'YOUR_PASSWORD',
u'shipment_id': u'abc123',
u'test': True,
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'RoyalMail',
u'params': {u'application_id': u'',
u'client_id': u'',
u'client_secret': u'',
u'image_type': u'GIF',
u'packages': [{u'length': 7, u'weight': 5},
{u'length': 7, u'weight': 5}],
u'password': u'',
u'reference_value': u'DN123456',
u'service': u'1',
u'service_format': u'P',
u'service_offering': u'CRL',
u'test': True,
u'to_addr1': u'6 Sovereign Road',
u'to_addr2': u'#103',
u'to_city': u'Birmingham',
u'to_code': u'B30 3HN',
u'to_company': u'Test Department',
u'to_country': u'GB',
u'to_email': u'john.doe@email.com',
u'to_name': u'John Doe',
u'to_phone': u'004407870701234',
u'username': u''}}
)
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(
{u'action': u'GetAllRates',
u'carrier': u'SpeeDee',
u'params': {u'account_number': u'1011',
u'packages': [{u'weight': 6}],
u'ship_code': u'56301',
u'to_code': u'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(
{u'action': u'AddressValidate',
u'carrier': u'stamps',
u'params': {u'password': u'YOUR_PASSWORD',
u'test': True,
u'to_addr1': u'123 Dont ship st',
u'to_city': u'Whitehall',
u'to_code': u'59759',
u'to_name': u'John Doe',
u'to_state': u'MT',
u'username': u'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(
{u'action': u'CreateManifest',
u'carrier': u'stamps',
u'params': {u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipment_ids': [u'72176f7e-2679-4dad-9e6b-c71c76b1eb9e'],
u'shipper': u'RocketShipIt',
u'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(
{u'action': u'CreateManifest',
u'carrier': u'stamps',
u'params': {u'print_instructions': True,
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_date': u'2016-06-28',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'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(
{u'action': u'AccountInfo',
u'carrier': u'stamps',
u'params': {u'password': u'YOUR_PASSWORD',
u'test': True,
u'username': u'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 33, in <module>
File "/usr/lib/python2.7/json/__init__.py", line 339, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 380, in raw_decode
obj, end = self.scan_once(s, idx)
ValueError: 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(
{u'action': u'SubmitShipment',
u'carrier': u'stamps',
u'params': {u'packages': [{u'height': 8,
u'length': 6,
u'packaging_type': u'Package',
u'weight': 5,
u'width': 7},
{u'height': 8,
u'length': 6,
u'packaging_type': u'Package',
u'weight': 5,
u'width': 7}],
u'password': u'YOUR_PASSWORD',
u'reference_value': u'asdf',
u'service': u'US-PM',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Dont ship',
u'to_city': u'Whitehall',
u'to_code': u'59759',
u'to_name': u'John Doe',
u'to_state': u'MT',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'stamps',
u'params': {u'customs': [{u'customs_description': u'my shipment',
u'customs_hs_tariff': u'',
u'customs_origin_country': u'US',
u'customs_quantity': 1,
u'customs_value': 5.0,
u'customs_weight': 2.5}],
u'customs_content_type': u'Commercial Sample',
u'customs_value': 200,
u'packages': [{u'height': 8,
u'length': 6,
u'packaging_type': u'Package',
u'weight': 5,
u'width': 7}],
u'password': u'',
u'reference_value': u'asdf',
u'service': u'US-PM',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'PSC 556 BOX 177',
u'to_city': u'APO',
u'to_code': u'96386',
u'to_country': u'US',
u'to_name': u'CPT JOHN DOE',
u'to_phone': u'1231231234',
u'to_state': u'AP',
u'username': u''}}
)
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(
{u'action': u'SubmitShipment',
u'carrier': u'stamps',
u'params': {u'packages': [{u'height': 8,
u'length': 6,
u'packaging_type': u'Package',
u'signature_type': u'ADULT',
u'weight': 5,
u'width': 7}],
u'password': u'YOUR_PASSWORD',
u'reference_value': u'asdf',
u'service': u'US-PM',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Dont ship st',
u'to_city': u'Whitehall',
u'to_code': u'59759',
u'to_name': u'John Doe',
u'to_state': u'MT',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'Stamps',
u'params': {u'label': {u'printed_origin': {u'addr1': u'940 Presidio Ave',
u'city': u'San Francisco',
u'code': u'94112',
u'country': u'US',
u'name': u'John Doe',
u'phone': u'123-123-1234',
u'state': u'CA'}},
u'packages': [{u'weight': 15}],
u'packaging_type': u'YOUR_PACKAGING',
u'password': u'YOUR_PASSWORD',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Main St',
u'to_city': u'Beverly Hills',
u'to_code': u'90210',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'CA',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'stamps',
u'params': {u'notify': [{u'email': u'bob@email.com'}],
u'packages': [{u'height': 8,
u'length': 6,
u'packaging_type': u'Package',
u'weight': 5,
u'width': 7}],
u'password': u'YOUR_PASSWORD',
u'reference_value': u'asdf',
u'service': u'US-PM',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Dont ship',
u'to_city': u'Whitehall',
u'to_code': u'59759',
u'to_name': u'John Doe',
u'to_state': u'MT',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'stamps',
u'params': {u'customs': [{u'customs_description': u'my shipment',
u'customs_hs_tariff': u'',
u'customs_origin_country': u'US',
u'customs_quantity': 1,
u'customs_value': 5.0,
u'customs_weight': 2.5}],
u'customs_content_type': u'Commercial Sample',
u'customs_value': 200,
u'packages': [{u'height': 8,
u'length': 6,
u'packaging_type': u'Package',
u'weight': 4,
u'width': 7}],
u'password': u'YOUR_PASSWORD',
u'reference_value': u'asdf',
u'service': u'SC-GPE',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'2000 Meadowvale Road',
u'to_city': u'Toronto',
u'to_code': u'M1B5K7',
u'to_country': u'CA',
u'to_name': u'Toronto Zoo',
u'to_phone': u'1231231234',
u'to_state': u'MB',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'stamps',
u'params': {u'addons': [u'SC-A-HP'],
u'packages': [{u'height': 8,
u'length': 6,
u'packaging_type': u'Package',
u'weight': 5,
u'width': 7}],
u'password': u'YOUR_PASSWORD',
u'reference_value': u'asdf',
u'service': u'US-PM',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Dont ship st',
u'to_city': u'Whitehall',
u'to_code': u'59759',
u'to_name': u'John Doe',
u'to_state': u'MT',
u'username': u'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 37, in <module>
File "/usr/lib/python2.7/json/__init__.py", line 339, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 380, in raw_decode
obj, end = self.scan_once(s, idx)
ValueError: 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(
{u'action': u'SubmitShipment',
u'carrier': u'stamps',
u'params': {u'customs': [{u'customs_description': u'my shipment',
u'customs_hs_tariff': u'',
u'customs_origin_country': u'US',
u'customs_quantity': 1,
u'customs_value': 5.0,
u'customs_weight': 2.5}],
u'customs_content_type': u'Commercial Sample',
u'customs_value': 200,
u'packages': [{u'height': 8,
u'length': 6,
u'packaging_type': u'Package',
u'weight': 5,
u'width': 7}],
u'password': u'YOUR_PASSWORD',
u'reference_value': u'asdf',
u'service': u'US-PMI',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'2000 Meadowvale Road',
u'to_city': u'Toronto',
u'to_code': u'M1B5K7',
u'to_country': u'CA',
u'to_name': u'Toronto Zoo',
u'to_phone': u'1231231234',
u'to_state': u'MB',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'stamps',
u'params': {u'customs': [{u'customs_description': u'my shipment',
u'customs_hs_tariff': u'',
u'customs_origin_country': u'US',
u'customs_quantity': 1,
u'customs_value': 5.0,
u'customs_weight': 2.5}],
u'customs_content_type': u'Commercial Sample',
u'customs_value': 200,
u'label_stock_type': u'Normal4X6CP72',
u'packages': [{u'height': 8,
u'length': 6,
u'packaging_type': u'Package',
u'weight': 5,
u'width': 7}],
u'password': u'YOUR_PASSWORD',
u'reference_value': u'asdf',
u'service': u'US-PMI',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'2000 Meadowvale Road',
u'to_city': u'Toronto',
u'to_code': u'M1B5K7',
u'to_country': u'CA',
u'to_name': u'Toronto Zoo',
u'to_phone': u'1231231234',
u'to_state': u'MB',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'stamps',
u'params': {u'packages': [{u'height': 8,
u'length': 6,
u'non_machinable': True,
u'packaging_type': u'Package',
u'weight': 5,
u'width': 7}],
u'password': u'YOUR_PASSWORD',
u'reference_value': u'asdf',
u'service': u'US-PM',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Dont ship st',
u'to_city': u'Whitehall',
u'to_code': u'59759',
u'to_name': u'John Doe',
u'to_state': u'MT',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'stamps',
u'params': {u'addons': [u'US-A-POUR'],
u'packages': [{u'height': 8,
u'length': 6,
u'packaging_type': u'Package',
u'weight': 0.4,
u'width': 7}],
u'service': u'US-FC',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Dont Ship st',
u'to_city': u'Whitehall',
u'to_code': u'59759',
u'to_name': u'John Doe',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'stamps',
u'params': {u'packages': [{u'height': 8,
u'length': 6,
u'packaging_type': u'Package',
u'signature_type': u'DIRECT',
u'weight': 5,
u'width': 7}],
u'password': u'YOUR_PASSWORD',
u'reference_value': u'asdf',
u'service': u'US-PM',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Dont ship st',
u'to_city': u'Whitehall',
u'to_code': u'59759',
u'to_name': u'John Doe',
u'to_state': u'MT',
u'username': u'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 41, in <module>
File "/usr/lib/python2.7/json/__init__.py", line 339, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 380, in raw_decode
obj, end = self.scan_once(s, idx)
ValueError: 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(
{u'action': u'CancelPickup',
u'carrier': u'Stamps',
u'params': {u'password': u'YOUR_PASSWORD',
u'pickup_id': u'WTC199744224',
u'test': True,
u'username': u'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(
{u'action': u'CreatePickup',
u'carrier': u'stamps',
u'params': {u'number_of_priority_mail_pieces': 1,
u'password': u'YOUR_PASSWORD',
u'pickup_addr1': u'940 Presidio Ave',
u'pickup_addr2': u'Apt 103',
u'pickup_city': u'San Francisco',
u'pickup_code': u'94115',
u'pickup_company_name': u'Acme Inc',
u'pickup_contact_name': u'Mark Sanborn',
u'pickup_location': u'FrontDoor',
u'pickup_phone': u'1231231234',
u'pickup_state': u'CA',
u'pickup_total_weight': 20,
u'special_instructions': u'Ring the door at the gate',
u'test': True,
u'username': u'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(
{u'action': u'PurchasePostage',
u'carrier': u'stamps',
u'params': {u'amount': 10.0,
u'password': u'YOUR_PASSWORD',
u'test': True,
u'username': u'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(
{u'action': u'GetAllRates',
u'carrier': u'stamps',
u'params': {u'packages': [{u'weight': 20}],
u'password': u'YOUR_PASSWORD',
u'ship_code': u'59759',
u'to_code': u'90210',
u'username': u'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(
{u'action': u'GetAllRates',
u'carrier': u'stamps',
u'params': {u'packages': [{u'weight': 4}],
u'password': u'YOUR_PASSWORD',
u'service': u'SC-GPE',
u'ship_code': u'59759',
u'to_country': u'CA',
u'username': u'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(
{u'action': u'GetAllRates',
u'carrier': u'Stamps',
u'params': {u'customs': [],
u'length_unit': u'IN',
u'packages': [{u'height': 5,
u'insured_value': 700,
u'length': 5,
u'weight': 5,
u'width': 5}],
u'password': u'YOUR_PASSWORD',
u'residential': True,
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_code': u'90210',
u'to_country': u'US',
u'username': u'YOUR_USERNAME',
u'weight_unit': u'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(
{u'action': u'GetAllRates',
u'carrier': u'stamps',
u'params': {u'packages': [{u'signature_type': u'DIRECT', u'weight': 20}],
u'password': u'YOUR_PASSWORD',
u'ship_code': u'59759',
u'signature_required': True,
u'to_code': u'90210',
u'username': u'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(
{u'action': u'track',
u'carrier': u'stamps',
u'params': {u'password': u'YOUR_PASSWORD',
u'tracking_number': u'9374889878102610545694',
u'username': u'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(
{u'action': u'VoidShipment',
u'carrier': u'stamps',
u'params': {u'password': u'YOUR_PASSWORD',
u'shipment_id': u'c605aec1-322e-48d5-bf81-b0bb820f9c22',
u'test': True,
u'username': u'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(
{u'action': u'AddressValidate',
u'carrier': u'UPS',
u'params': {u'key': u'YOUR_KEY',
u'password': u'YOUR_PASSWORD',
u'test': True,
u'to_addr1': u'2920 Zoo Drive',
u'to_city': u'San Diego',
u'to_code': u'92112',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'CA',
u'username': u'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(
{u'action': u'GetSubscription',
u'carrier': u'UPS',
u'params': {u'begin_date': u'20160426000000',
u'end_date': u'20160429154400',
u'key': u'YOUR_KEY',
u'password': u'YOUR_PASSWORD',
u'subscription_name': u'Test',
u'username': u'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(
{u'action': u'GetAllRates',
u'carrier': u'UPS',
u'params': {u'customs': [],
u'freight_account_number': u'YOUR_ACCOUNT_NUMBER',
u'packages': [{u'description': u'bailing wire',
u'freight_class': u'50',
u'weight': 200}],
u'ship_addr1': u'1202 Chalet Ln',
u'ship_addr2': u'Do Not Delete - Test Account',
u'ship_city': u'Harrison',
u'ship_code': u'72601',
u'ship_country': u'US',
u'ship_state': u'AR',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_city': u'Akron',
u'to_code': u'44333',
u'to_country': u'US',
u'to_state': u'OH',
u'weight_unit': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS',
u'params': {u'account_number': u'YOUR_ACCOUNT',
u'currency': u'CAD',
u'customs': [{u'customs_quantity_units': u'EA',
u'invoice_line_description': u'My Description',
u'invoice_line_number': u'1',
u'invoice_line_origin_country_code': u'CA',
u'invoice_line_part_number': u'123',
u'invoice_line_value': u'1'}],
u'customs_forms': u'01',
u'image_type': u'PNG',
u'invoice_date': u'20160910',
u'invoice_line_total': 100,
u'key': u'YOUR_KEY',
u'length_unit': u'IN',
u'packages': [{u'reference_code': u'TN',
u'reference_value': u'12345678',
u'weight': 1}],
u'packaging_type': u'02',
u'password': u'YOUR_PASSWORD',
u'pickup_type': u'02',
u'reason_for_export': u'SALE',
u'service': u'11',
u'ship_addr1': u'2300 Southern Blvd',
u'ship_city': u'Bronx',
u'ship_code': u'10460',
u'ship_contact': u'John Doe',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'NY',
u'shipment_description': u'xxx',
u'shipper': u'John Doe',
u'sold_addr1': u'2000 Meadowvale Rd',
u'sold_city': u'Toronto',
u'sold_code': u'M1B5K7',
u'sold_company': u'Acme Inc.',
u'sold_country': u'CA',
u'sold_name': u'John Doe',
u'sold_phone': u'1231231234',
u'sold_state': u'ON',
u'sold_tax_id': u'123abc',
u'special_instructions': u'this ends up in additional comments',
u'test': True,
u'to_addr1': u'2000 Meadowvale Rd',
u'to_attention_name': u'John Doe',
u'to_city': u'Toronto',
u'to_code': u'M1B5K7',
u'to_country': u'CA',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'ON',
u'username': u'YOUR_USERNAME',
u'weight_unit': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS',
u'params': {u'account_number': u'YOUR_ACCOUNT',
u'currency': u'CAD',
u'customs': [{u'commodity_code': u'240110',
u'customs_quantity_units': u'EA',
u'invoice_line_description': u'My Description',
u'invoice_line_number': u'1',
u'invoice_line_origin_country_code': u'CA',
u'invoice_line_part_number': u'123',
u'invoice_line_value': u'1'}],
u'customs_forms': u'01,11',
u'image_type': u'PNG',
u'invoice': u'12345',
u'invoice_date': u'20170610',
u'invoice_line_total': 100,
u'key': u'YOUR_KEY',
u'length_unit': u'IN',
u'packages': [{u'height': 1,
u'length': 1,
u'reference_code': u'TN',
u'reference_value': u'12345678',
u'weight': 1,
u'width': 1}],
u'packaging_type': u'02',
u'password': u'YOUR_PASSWORD',
u'pickup_type': u'02',
u'reason_for_export': u'SALE',
u'service': u'65',
u'ship_addr1': u'2300 Southern Blvd',
u'ship_city': u'Bronx',
u'ship_code': u'10460',
u'ship_contact': u'John Doe',
u'ship_country': u'US',
u'ship_name': u'John Doe',
u'ship_phone': u'1231231234',
u'ship_state': u'NY',
u'shipment_description': u'xxx',
u'shipper': u'John Doe',
u'sold_addr1': u'2000 Meadowvale Rd',
u'sold_city': u'Toronto',
u'sold_code': u'M1B5K7',
u'sold_company': u'Acme Inc.',
u'sold_country': u'CA',
u'sold_name': u'John Doe',
u'sold_phone': u'1231231234',
u'sold_state': u'ON',
u'sold_tax_id': u'123abc',
u'test': True,
u'to_addr1': u'2000 Meadowvale Rd',
u'to_attention_name': u'John Doe',
u'to_city': u'Toronto',
u'to_code': u'M1B5K7',
u'to_company': u'Acme Inc.',
u'to_country': u'CA',
u'to_phone': u'1231231234',
u'to_state': u'ON',
u'username': u'YOUR_USERNAME',
u'weight_unit': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS',
u'params': {u'account_number': u'YOUR_ACCOUNT',
u'currency': u'CAD',
u'customs': [{u'customs_quantity_units': u'EA',
u'invoice_line_description': u'My Description',
u'invoice_line_number': u'1',
u'invoice_line_origin_country_code': u'CA',
u'invoice_line_part_number': u'123',
u'invoice_line_value': u'1'}],
u'customs_discount': 5.12,
u'customs_forms': u'01',
u'freight_charges': 10,
u'image_type': u'PNG',
u'invoice': u'12345',
u'invoice_date': u'20160910',
u'invoice_line_total': 100,
u'key': u'YOUR_KEY',
u'length_unit': u'IN',
u'packages': [{u'height': 1,
u'length': 1,
u'reference_code': u'TN',
u'reference_value': u'12345678',
u'weight': 1,
u'width': 1}],
u'packaging_type': u'02',
u'password': u'YOUR_PASSWORD',
u'pickup_type': u'02',
u'reason_for_export': u'SALE',
u'service': u'14',
u'ship_addr1': u'2000 Meadowvale Rd',
u'ship_city': u'Toronto',
u'ship_code': u'M1B5K7',
u'ship_contact': u'John Doe',
u'ship_country': u'CA',
u'ship_phone': u'1231231234',
u'ship_state': u'ON',
u'shipment_description': u'xxx',
u'shipper': u'John Doe',
u'sold_addr1': u'2000 Meadowvale Rd',
u'sold_city': u'Toronto',
u'sold_code': u'M1B5K7',
u'sold_company': u'Acme Inc.',
u'sold_country': u'CA',
u'sold_name': u'John Doe',
u'sold_phone': u'1231231234',
u'sold_state': u'ON',
u'sold_tax_id': u'123abc',
u'test': True,
u'to_addr1': u'2300 Southern Blvd',
u'to_attention_name': u'John Doe',
u'to_city': u'Bronx',
u'to_code': u'10460',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'NY',
u'username': u'YOUR_USERNAME',
u'weight_unit': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'image_type': u'PNG',
u'key': u'YOUR_UPS_KEY',
u'packages': [{u'height': 5,
u'length': 7,
u'weight': 4,
u'width': 5}],
u'password': u'YOUR_PASSWORD',
u'service': u'03',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'940 Presidio Ave',
u'to_addr2': u'#103',
u'to_city': u'San Francisco',
u'to_code': u'94115',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'CA',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'image_type': u'PNG',
u'key': u'YOUR_UPS_KEY',
u'packages': [{u'additional_handling': True,
u'height': 5,
u'length': 7,
u'weight': 4,
u'width': 5}],
u'password': u'YOUR_PASSWORD',
u'service': u'03',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'940 Presidio Ave',
u'to_addr2': u'#103',
u'to_city': u'San Francisco',
u'to_code': u'94115',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'CA',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS',
u'params': {u'currency': u'USD',
u'image_type': u'PNG',
u'packages': [{u'cod_amount': 5.12,
u'cod_fund_type': u'0',
u'length': 7,
u'weight': 4}],
u'service': u'03',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'940 Presidio Ave',
u'to_addr2': u'#103',
u'to_city': u'San Francisco',
u'to_code': u'94115',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS',
u'params': {u'currency': u'CAD',
u'customs': [{u'commodity_code': u'240110',
u'customs_quantity_units': u'EA',
u'invoice_line_description': u'My Description',
u'invoice_line_number': u'1',
u'invoice_line_origin_country_code': u'CA',
u'invoice_line_part_number': u'123',
u'invoice_line_value': u'1'}],
u'customs_forms': u'01',
u'image_type': u'PNG',
u'invoice': u'12345',
u'invoice_date': u'20170610',
u'invoice_line_total': 100,
u'key': u'YOUR_KEY',
u'length_unit': u'IN',
u'master_carton': True,
u'packages': [{u'height': 1,
u'length': 1,
u'reference_code': u'TN',
u'reference_value': u'12345678',
u'weight': 1,
u'width': 1}],
u'packaging_type': u'02',
u'password': u'YOUR_PASSWORD',
u'pickup_type': u'02',
u'reason_for_export': u'SALE',
u'service': u'17',
u'ship_addr1': u'2300 Southern Blvd',
u'ship_city': u'Bronx',
u'ship_code': u'10460',
u'ship_contact': u'John Doe',
u'ship_country': u'US',
u'ship_name': u'John Doe',
u'ship_phone': u'1231231234',
u'ship_state': u'NY',
u'shipment_description': u'xxx',
u'shipper': u'John Doe',
u'sold_addr1': u'2000 Meadowvale Rd',
u'sold_city': u'Toronto',
u'sold_code': u'M1B5K7',
u'sold_company': u'Acme Inc.',
u'sold_country': u'CA',
u'sold_name': u'John Doe',
u'sold_phone': u'1231231234',
u'sold_state': u'ON',
u'sold_tax_id': u'123abc',
u'test': True,
u'to_addr1': u'2000 Meadowvale Rd',
u'to_attention_name': u'John Doe',
u'to_city': u'Toronto',
u'to_code': u'M1B5K7',
u'to_company': u'Acme Inc.',
u'to_country': u'CA',
u'to_phone': u'1231231234',
u'to_state': u'ON',
u'trade_terms': u'DDP',
u'username': u'YOUR_USERNAME',
u'weight_unit': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'image_type': u'GIF',
u'key': u'YOUR_KEY',
u'packages': [{u'length': 7,
u'signature_type': u'DIRECT',
u'weight': 4}],
u'password': u'YOUR_PASSWORD',
u'service': u'03',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'940 Presidio Ave',
u'to_addr2': u'#103',
u'to_city': u'San Francisco',
u'to_code': u'94115',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'CA',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS',
u'params': {u'account_number': u'YOUR_ACCOUNT',
u'currency': u'CAD',
u'customs': [{u'commodity_code': u'240110',
u'customs_quantity_units': u'EA',
u'invoice_line_description': u'My Description',
u'invoice_line_number': u'1',
u'invoice_line_origin_country_code': u'CA',
u'invoice_line_part_number': u'123',
u'invoice_line_value': u'1'}],
u'customs_forms': u'01',
u'image_type': u'PNG',
u'invoice': u'12345',
u'invoice_date': u'20170610',
u'invoice_line_total': 100,
u'key': u'YOUR_KEY',
u'length_unit': u'IN',
u'packages': [{u'height': 1,
u'length': 1,
u'reference_code': u'TN',
u'reference_value': u'12345678',
u'weight': 1,
u'width': 1}],
u'packaging_type': u'02',
u'password': u'YOUR_PASSWORD',
u'pickup_type': u'02',
u'reason_for_export': u'SALE',
u'service': u'65',
u'ship_addr1': u'2300 Southern Blvd',
u'ship_city': u'Bronx',
u'ship_code': u'10460',
u'ship_contact': u'John Doe',
u'ship_country': u'US',
u'ship_name': u'John Doe',
u'ship_phone': u'1231231234',
u'ship_state': u'NY',
u'ship_tax_id': u'IMDEU1234567',
u'ship_tax_id_type': u'0356',
u'shipment_description': u'xxx',
u'shipper': u'John Doe',
u'sold_addr1': u'2000 Meadowvale Rd',
u'sold_city': u'London',
u'sold_code': u'NW14RY',
u'sold_company': u'Acme Inc.',
u'sold_country': u'GB',
u'sold_name': u'John Doe',
u'sold_phone': u'1231231234',
u'sold_tax_id': u'123abc',
u'test': True,
u'to_addr1': u'Outer Cir',
u'to_attention_name': u'John Doe',
u'to_city': u'London',
u'to_code': u'NW14RY',
u'to_company': u'Acme Inc.',
u'to_country': u'GB',
u'to_phone': u'1231231234',
u'username': u'YOUR_USERNAME',
u'weight_unit': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'image_type': u'GIF',
u'key': u'YOUR_UPS_API_KEY',
u'notify': [{u'email': u'bob@email.com', u'type': u'6'}],
u'packages': [{u'length': 7, u'weight': 4}],
u'password': u'YOUR_PASSWORD',
u'service': u'03',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'940 Presidio Ave',
u'to_addr2': u'#103',
u'to_city': u'San Francisco',
u'to_code': u'94115',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'CA',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'frs_shipment': True,
u'image_type': u'GIF',
u'key': u'YOUR_KEY',
u'packages': [{u'freight_class': u'55',
u'length': 7,
u'weight': 4}],
u'password': u'YOUR_PASSWORD',
u'service': u'03',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'940 Presidio Ave',
u'to_addr2': u'#103',
u'to_city': u'San Francisco',
u'to_code': u'94115',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'CA',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS',
u'params': {u'billing': [{u'account': u'ABC123',
u'company': u'Acme Inc',
u'country_code': u'US',
u'payment_type': u'third_party',
u'postal_code': u'14609',
u'type': u'transportation'}],
u'country_code': u'US',
u'customer_classification': u'01',
u'customs': [],
u'frs_shipment': True,
u'ground_freight': True,
u'image_type': u'PNG',
u'key': u'YOUR_KEY',
u'length_unit': u'IN',
u'packages': [{u'freight_class': u'50',
u'height': 11.0,
u'length': 11.0,
u'reference_value': u'ID:11525',
u'reference_value2': u'',
u'reference_value3': u'',
u'weight': 11.0,
u'width': 11.0}],
u'packaging_type': u'02',
u'password': u'YOUR_PASSWORD',
u'pickup_type': u'01',
u'service': u'03',
u'ship_addr1': u'4969 sereno dr',
u'ship_city': u'Temple City',
u'ship_code': u'91780',
u'ship_phone': u'13800138000',
u'ship_state': u'CA',
u'shipper': u'kkk',
u'test': True,
u'to_addr1': u'4969 sereno dr',
u'to_addr2': u'',
u'to_city': u'Temple City',
u'to_code': u'91780',
u'to_country': u'US',
u'to_name': u'kkk',
u'to_phone': u'13800138000',
u'to_state': u'CA',
u'username': u'YOUR_USERNAME',
u'weight_unit': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'image_type': u'GIF',
u'key': u'YOUR_KEY',
u'packages': [{u'insured_currency': u'USD',
u'insured_value': 700,
u'length': 7,
u'weight': 4}],
u'password': u'YOUR_PASSWORD',
u'service': u'03',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'940 Presidio Ave',
u'to_addr2': u'#103',
u'to_city': u'San Francisco',
u'to_code': u'94115',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'CA',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS',
u'params': {u'billing': [{u'account': u'abc123',
u'payment_type': u'recipient',
u'type': u'duties'},
{u'payment_type': u'sender',
u'type': u'transportation'}],
u'currency': u'CAD',
u'customs': [{u'customs_quantity_units': u'EA',
u'invoice_line_description': u'My Description',
u'invoice_line_number': u'1',
u'invoice_line_origin_country_code': u'CA',
u'invoice_line_part_number': u'123',
u'invoice_line_value': u'1'}],
u'customs_account_number': u'abc123',
u'customs_forms': u'01',
u'customs_payment_type': u'RECIPIENT',
u'image_type': u'PNG',
u'invoice': u'12345',
u'invoice_date': u'20160910',
u'invoice_line_total': 100,
u'length_unit': u'IN',
u'packages': [{u'height': 1,
u'length': 1,
u'reference_code': u'TN',
u'reference_value': u'12345678',
u'weight': 1,
u'width': 1}],
u'packaging_type': u'02',
u'pickup_type': u'02',
u'reason_for_export': u'SALE',
u'service': u'14',
u'ship_addr1': u'2000 Meadowvale Rd',
u'ship_city': u'Toronto',
u'ship_code': u'M1B5K7',
u'ship_contact': u'John Doe',
u'ship_country': u'CA',
u'ship_phone': u'1231231234',
u'ship_state': u'ON',
u'shipment_description': u'xxx',
u'shipper': u'John Doe',
u'sold_addr1': u'2000 Meadowvale Rd',
u'sold_city': u'Toronto',
u'sold_code': u'M1B5K7',
u'sold_company': u'Acme Inc.',
u'sold_country': u'CA',
u'sold_name': u'John Doe',
u'sold_phone': u'1231231234',
u'sold_state': u'ON',
u'sold_tax_id': u'123abc',
u'test': True,
u'to_addr1': u'2300 Southern Blvd',
u'to_attention_name': u'John Doe',
u'to_city': u'Bronx',
u'to_code': u'10460',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'NY',
u'weight_unit': u'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 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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS',
u'params': {u'account_number': u'YOUR_ACCOUNT',
u'image_type': u'PNG',
u'key': u'YOUR_KEY',
u'length_unit': u'IN',
u'packages': [{u'reference_code': u'TN',
u'reference_value': u'12345678',
u'weight': 1}],
u'packaging_type': u'01',
u'password': u'YOUR_PASSWORD',
u'pickup_type': u'02',
u'service': u'14',
u'ship_addr1': u'2000 Meadowvale Rd',
u'ship_city': u'Toronto',
u'ship_code': u'M1B5K7',
u'ship_contact': u'John Doe',
u'ship_country': u'CA',
u'ship_phone': u'1231231234',
u'ship_state': u'ON',
u'shipment_description': u'xxx',
u'shipper': u'John Doe',
u'test': True,
u'to_addr1': u'6050 Blvd East',
u'to_attention_name': u'Etty Klein',
u'to_city': u'West New York',
u'to_code': u'07093',
u'to_country': u'US',
u'to_name': u'Etty Klein',
u'to_phone': u'1231231234',
u'to_state': u'NJ',
u'username': u'YOUR_USERNAME',
u'weight_unit': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'cost_center': u'00000',
u'image_type': u'GIF',
u'key': u'YOUR_UPS_API_KEY',
u'package_id': u'1',
u'packages': [{u'length': 7, u'weight': 4}],
u'packaging_type': u'62',
u'password': u'YOUR_PASSWORD',
u'service': u'M4',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'940 Presidio Ave',
u'to_addr2': u'#103',
u'to_city': u'San Francisco',
u'to_code': u'94115',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'CA',
u'username': u'YOUR_USERNAME',
u'usps_endorsement': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'cost_center': u'5',
u'currency': u'USD',
u'customs': [{u'commodity_code': u'240110',
u'customs_quantity_units': u'EA',
u'invoice_line_description': u'My Description',
u'invoice_line_number': u'1',
u'invoice_line_origin_country_code': u'CA',
u'invoice_line_part_number': u'123',
u'invoice_line_value': u'1'}],
u'customs_content_type': u'Merchandise',
u'customs_forms': u'09',
u'image_type': u'GIF',
u'invoice': u'12345',
u'invoice_date': u'20190423',
u'invoice_line_total': 100,
u'key': u'YOUR_UPS_API_KEY',
u'package_id': u'5',
u'packages': [{u'weight': 1}],
u'packaging_type': u'57',
u'password': u'YOUR_PASSWORD',
u'pickup_type': u'02',
u'reason_for_export': u'SALE',
u'service': u'M6',
u'ship_addr1': u'2300 Southern Blvd',
u'ship_city': u'Bronx',
u'ship_code': u'10460',
u'ship_contact': u'John Doe',
u'ship_country': u'US',
u'ship_name': u'John Doe',
u'ship_phone': u'1231231234',
u'ship_state': u'NY',
u'shipment_description': u'xxx',
u'shipper': u'John Doe',
u'sold_addr1': u'2000 Meadowvale Rd',
u'sold_city': u'Toronto',
u'sold_code': u'M1B5K7',
u'sold_company': u'Acme Inc.',
u'sold_country': u'CA',
u'sold_name': u'John Doe',
u'sold_phone': u'1231231234',
u'sold_state': u'ON',
u'sold_tax_id': u'123abc',
u'test': True,
u'to_addr1': u'2000 Meadowvale Rd',
u'to_attention_name': u'John Doe',
u'to_city': u'Toronto',
u'to_code': u'M1B5K7',
u'to_company': u'Acme Inc.',
u'to_country': u'CA',
u'to_phone': u'1231231234',
u'to_state': u'ON',
u'username': u'YOUR_USERNAME',
u'usps_endorsement': u'5',
u'weight_unit': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS',
u'params': {u'currency': u'USD',
u'dry_ice': {u'medical_use': True,
u'regulation_set': u'CFR',
u'weight': 2},
u'image_type': u'PNG',
u'key': u'YOUR_KEY',
u'packages': [{u'length': 7, u'weight': 6}],
u'password': u'YOUR_PASSWORD',
u'service': u'02',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'940 Presidio Ave',
u'to_addr2': u'#103',
u'to_city': u'San Francisco',
u'to_code': u'94115',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'CA',
u'username': u'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(
{u'action': u'LabelRecovery',
u'carrier': u'UPS',
u'params': {u'test': True, u'tracking_number': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'from_addr1': u'940 Presidio Ave',
u'from_addr2': u'#103',
u'from_city': u'San Francisco',
u'from_code': u'94115',
u'from_company': u'RocketShipIt',
u'from_name': u'Mark Sanborn',
u'from_state': u'CA',
u'image_type': u'Png',
u'key': u'YOUR_UPS_API_KEY',
u'packages': [{u'reference_barcode': True,
u'reference_code': u'PO',
u'reference_code2': u'IN',
u'reference_value': u'12382871',
u'reference_value2': u'10000',
u'weight': 4}],
u'password': u'YOUR_PASSWORD',
u'return_code': u'9',
u'service': u'03',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'940 Presidio Ave',
u'to_addr2': u'#103',
u'to_city': u'San Francisco',
u'to_code': u'94115',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'CA',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'from_addr1': u'940 Presidio Ave',
u'from_addr2': u'#103',
u'from_city': u'San Francisco',
u'from_code': u'94115',
u'from_company': u'RocketShipIt',
u'from_name': u'Mark Sanborn',
u'from_state': u'CA',
u'image_type': u'GIF',
u'key': u'YOUR_KEY',
u'packages': [{u'weight': 4}],
u'password': u'YOUR_PASSWORD',
u'return_code': u'9',
u'service': u'03',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'940 Presidio Ave',
u'to_addr2': u'#103',
u'to_city': u'San Francisco',
u'to_code': u'94115',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'CA',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'from_addr1': u'940 Presidio Ave',
u'from_addr2': u'#103',
u'from_city': u'San Francisco',
u'from_code': u'94115',
u'from_company': u'RocketShipIt',
u'from_name': u'Mark Sanborn',
u'from_state': u'CA',
u'image_type': u'GIF',
u'key': u'YOUR_UPS_KEY',
u'notify': [{u'email': u'bob@email.com',
u'from_email': u'blah@email.com',
u'from_name': u'John Doe',
u'type': u'RETURN',
u'undeliverable_email': u'foo@bar.com'}],
u'packages': [{u'weight': 4}],
u'password': u'YOUR_PASSWORD',
u'return_code': u'8',
u'service': u'03',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'940 Presidio Ave',
u'to_addr2': u'#103',
u'to_city': u'San Francisco',
u'to_code': u'94115',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'CA',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'image_type': u'GIF',
u'key': u'YOUR_UPS_KEY',
u'packages': [{u'length': 7, u'weight': 4}],
u'password': u'YOUR_PASSWORD',
u'service': u'93',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'940 Presidio Ave',
u'to_addr2': u'#103',
u'to_city': u'San Francisco',
u'to_code': u'94115',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'CA',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'billing': [{u'account': u'abc123',
u'country_code': u'US',
u'payment_type': u'third_party',
u'postal_code': u'94608',
u'type': u'transportation'}],
u'image_type': u'GIF',
u'key': u'YOUR_UPS_API_KEY',
u'packages': [{u'length': 7, u'weight': 4}],
u'password': u'YOUR_PASSWORD',
u'service': u'03',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'940 Presidio Ave',
u'to_addr2': u'#103',
u'to_city': u'San Francisco',
u'to_code': u'94115',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'CA',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'discount': {u'alias': u'1231', u'code': u'adsf'},
u'image_type': u'PNG',
u'key': u'YOUR_UPS_KEY',
u'packages': [{u'height': 5,
u'length': 7,
u'weight': 4,
u'width': 5}],
u'password': u'YOUR_PASSWORD',
u'service': u'03',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'940 Presidio Ave',
u'to_addr2': u'#103',
u'to_city': u'San Francisco',
u'to_code': u'94115',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'CA',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS',
u'params': {u'alt_addr1': u'2601 Sutter St',
u'alt_city': u'San Francisco',
u'alt_code': u'94115',
u'alt_country': u'US',
u'alt_name': u'G&R MARKET DELI',
u'alt_state': u'CA',
u'image_type': u'GIF',
u'packages': [{u'length': 7, u'weight': 4}],
u'service': u'03',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'Acme Inc',
u'test': True,
u'to_addr1': u'940 Presidio Ave',
u'to_addr2': u'#103',
u'to_city': u'San Francisco',
u'to_code': u'94115',
u'to_country': u'US',
u'to_email': u'customer@email.com',
u'to_name': u'John Doe',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS',
u'params': {u'account_number': u'YOUR_ACCOUNT',
u'currency': u'CAD',
u'customs': [{u'customs_quantity_units': u'EA',
u'invoice_line_description': u'My Description',
u'invoice_line_number': u'1',
u'invoice_line_origin_country_code': u'CA',
u'invoice_line_part_number': u'123',
u'invoice_line_value': u'1'}],
u'customs_forms': u'01',
u'documents_only': True,
u'image_type': u'PNG',
u'invoice_date': u'20160910',
u'invoice_line_total': 100,
u'key': u'YOUR_KEY',
u'length_unit': u'IN',
u'packages': [{u'reference_code': u'TN',
u'reference_value': u'12345678',
u'weight': 1}],
u'packaging_type': u'01',
u'password': u'YOUR_PASSWORD',
u'pickup_type': u'02',
u'reason_for_export': u'SALE',
u'service': u'14',
u'ship_addr1': u'2000 Meadowvale Rd',
u'ship_city': u'Toronto',
u'ship_code': u'M1B5K7',
u'ship_contact': u'John Doe',
u'ship_country': u'CA',
u'ship_phone': u'1231231234',
u'ship_state': u'ON',
u'shipment_description': u'xxx',
u'shipper': u'John Doe',
u'sold_addr1': u'2000 Meadowvale Rd',
u'sold_city': u'Toronto',
u'sold_code': u'M1B5K7',
u'sold_company': u'Acme Inc.',
u'sold_country': u'CA',
u'sold_name': u'John Doe',
u'sold_phone': u'1231231234',
u'sold_state': u'ON',
u'sold_tax_id': u'123abc',
u'test': True,
u'to_addr1': u'2300 Southern Blvd',
u'to_attention_name': u'John Doe',
u'to_city': u'Bronx',
u'to_code': u'10460',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'NY',
u'username': u'YOUR_USERNAME',
u'weight_unit': u'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(
{u'action': u'FindLocations',
u'carrier': u'UPS',
u'params': {u'request_option': u'64',
u'ship_city': u'Atlanta',
u'ship_code': u'85281',
u'ship_code_extended': u'4510',
u'ship_country': u'US',
u'ship_state': u'GA',
u'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(
{u'action': u'CancelPickup',
u'carrier': u'UPS',
u'params': {u'key': u'YOUR_KEY',
u'password': u'YOUR_PASSWORD',
u'pickup_id': u'2929AONCALL',
u'test': True,
u'username': u'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(
{u'action': u'CreatePickup',
u'carrier': u'UPS',
u'params': {u'close_time': u'1600',
u'ground_freight': True,
u'packages': [{u'weight': 100}],
u'packaging_type': u'PLT',
u'pickup_addr1': u'940 Presidio Ave',
u'pickup_city': u'San Francisco',
u'pickup_code': u'94115',
u'pickup_company_name': u'Acme Inc',
u'pickup_contact_name': u'Mark Sanborn',
u'pickup_country': u'US',
u'pickup_date': u'20190212',
u'pickup_email': u'john@company.com',
u'pickup_phone': u'123-123-1234',
u'pickup_state': u'CA',
u'ready_time': u'0800',
u'test': True,
u'to_addr1': u'2920 Zoo Drive',
u'to_city': u'San Diego',
u'to_code': u'92112',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'CA',
u'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(
{u'action': u'PickupRate',
u'carrier': u'UPS',
u'params': {u'key': u'YOUR_KEY',
u'password': u'YOUR_PASSWORD',
u'pickup_addr1': u'940 Presidio Ave',
u'pickup_city': u'San Francisco',
u'pickup_code': u'94115',
u'pickup_country': u'US',
u'pickup_state': u'CA',
u'test': True,
u'to_addr1': u'2920 Zoo Drive',
u'to_city': u'San Diego',
u'to_code': u'92112',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'CA',
u'username': u'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(
{u'action': u'CreatePickup',
u'carrier': u'UPS',
u'params': {u'close_time': u'0900',
u'key': u'YOUR_KEY',
u'password': u'YOUR_PASSWORD',
u'payment_method': u'00',
u'pickup_addr1': u'940 Presidio Ave',
u'pickup_city': u'San Francisco',
u'pickup_code': u'94115',
u'pickup_company_name': u'Acme Inc',
u'pickup_contact_name': u'Mark Sanborn',
u'pickup_container_code': u'01',
u'pickup_country': u'US',
u'pickup_date': u'20160112',
u'pickup_destination': u'US',
u'pickup_floor': u'2',
u'pickup_phone': u'123-123-1234',
u'pickup_quantity': 1,
u'pickup_room': u'A',
u'pickup_service_code': u'002',
u'pickup_state': u'CA',
u'ready_time': u'0800',
u'test': True,
u'to_addr1': u'2920 Zoo Drive',
u'to_city': u'San Diego',
u'to_code': u'92112',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'CA',
u'username': u'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(
{u'action': u'CreatePickup',
u'carrier': u'UPS',
u'params': {u'close_time': u'0900',
u'key': u'YOUR_KEY',
u'packages': [{u'packaging_type': u'01',
u'pieces': 1,
u'service': u'003'},
{u'packaging_type': u'01',
u'pieces': 1,
u'service': u'002'}],
u'password': u'YOUR_PASSWORD',
u'payment_method': u'00',
u'pickup_addr1': u'940 Presidio Ave',
u'pickup_city': u'San Francisco',
u'pickup_code': u'94115',
u'pickup_company_name': u'Acme Inc',
u'pickup_contact_name': u'Mark Sanborn',
u'pickup_country': u'US',
u'pickup_date': u'20160112',
u'pickup_destination': u'US',
u'pickup_phone': u'123-123-1234',
u'pickup_state': u'CA',
u'ready_time': u'0800',
u'test': True,
u'to_addr1': u'2920 Zoo Drive',
u'to_city': u'San Diego',
u'to_code': u'92112',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'CA',
u'username': u'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(
{u'action': u'PickupStatus',
u'carrier': u'UPS',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'key': u'YOUR_KEY',
u'password': u'YOUR_PASSWORD',
u'test': True,
u'username': u'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(
{u'action': u'GetAllRates',
u'carrier': u'UPS',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'customer_classification': u'01',
u'customs': [],
u'key': u'YOUR_KEY',
u'length_unit': u'IN',
u'packages': [{u'additional_handling': True,
u'height': 5,
u'length': 5,
u'weight': 5,
u'width': 5}],
u'packaging_type': u'02',
u'password': u'YOUR_PASSWORD',
u'pickup_type': u'01',
u'residential': True,
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_code': u'90210',
u'to_country': u'US',
u'username': u'YOUR_USERNAME',
u'weight_unit': u'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(
{u'action': u'GetAllRates',
u'carrier': u'UPS',
u'params': {u'customs': [],
u'from_addr1': u'123 Main Ave',
u'from_addr2': u'',
u'from_city': u'Portland',
u'from_code': u'97227',
u'from_country': u'US',
u'from_state': u'OR',
u'negotiated_rates': True,
u'packages': [{u'height': 6,
u'insured_currency': u'USD',
u'length': 8,
u'packaging_type': u'Package',
u'weight': 3,
u'width': 11}],
u'request_option': u'Shop',
u'service': u'17',
u'ship_addr1': u'123 Main Ave',
u'ship_addr2': u'',
u'ship_city': u'Portland',
u'ship_code': u'97227',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'OR',
u'shipper': u'Acme Inc',
u'to_addr1': u'1 Main Road',
u'to_addr2': u'',
u'to_city': u'Montreal',
u'to_code': u'H2T 3E2',
u'to_company': u'Test',
u'to_country': u'CA',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'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(
{u'action': u'GetAllRates',
u'carrier': u'UPS',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'customer_classification': u'01',
u'customs': [],
u'key': u'YOUR_UPS_API_KEY',
u'length_unit': u'IN',
u'packages': [{u'height': 5,
u'length': 5,
u'weight': 5,
u'width': 5}],
u'packaging_type': u'02',
u'password': u'YOUR_PASSWORD',
u'pickup_type': u'01',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'to_code': u'90210',
u'to_country': u'US',
u'username': u'YOUR_USERNAME',
u'weight_unit': u'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(
{u'action': u'GetAllRates',
u'carrier': u'UPS',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'customer_classification': u'01',
u'customs': [],
u'ground_freight': True,
u'key': u'YOUR_KEY',
u'length_unit': u'IN',
u'packages': [{u'freight_class': u'50',
u'height': 5,
u'length': 5,
u'weight': 10,
u'width': 5}],
u'packaging_type': u'02',
u'password': u'YOUR_PASSWORD',
u'pickup_type': u'01',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'to_code': u'90210',
u'to_country': u'US',
u'to_state': u'CA',
u'username': u'YOUR_USERNAME',
u'weight_unit': u'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(
{u'action': u'GetAllRates',
u'carrier': u'UPS-REST',
u'params': {u'account_number': u'YOUR_ACCOUNT',
u'customer_classification': u'01',
u'customs': [],
u'key': u'your-key-from-authenticate-request',
u'length_unit': u'IN',
u'packages': [{u'height': 5,
u'insured_currency': u'USD',
u'insured_value': 700,
u'length': 5,
u'weight': 5,
u'width': 5}],
u'packaging_type': u'02',
u'pickup_type': u'01',
u'residential': True,
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_code': u'90210',
u'to_country': u'US',
u'weight_unit': u'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(
{u'action': u'GetAllRates',
u'carrier': u'UPS',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'customer_classification': u'01',
u'customs': [],
u'key': u'YOUR_KEY',
u'length_unit': u'IN',
u'packages': [{u'height': 5,
u'length': 5,
u'weight': 5,
u'width': 5}],
u'packaging_type': u'02',
u'password': u'YOUR_PASSWORD',
u'pickup_type': u'01',
u'residential': True,
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_code': u'V0K1G0',
u'to_country': u'CA',
u'username': u'YOUR_USERNAME',
u'weight_unit': u'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(
{u'action': u'GetAllRates',
u'carrier': u'UPS',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'customer_classification': u'01',
u'customs': [],
u'key': u'YOUR_KEY',
u'length_unit': u'IN',
u'negotiated_rates': True,
u'packages': [{u'height': 5,
u'insured_currency': u'USD',
u'insured_value': 700,
u'length': 5,
u'weight': 5,
u'width': 5}],
u'packaging_type': u'02',
u'password': u'YOUR_PASSWORD',
u'pickup_type': u'01',
u'residential': True,
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_code': u'90210',
u'to_country': u'US',
u'to_state': u'CA',
u'username': u'YOUR_USERNAME',
u'weight_unit': u'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(
{u'action': u'GetAllRates',
u'carrier': u'UPS',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'customer_classification': u'00',
u'customs': [],
u'key': u'YOUR_KEY',
u'length_unit': u'IN',
u'packages': [{u'height': 5,
u'length': 5,
u'weight': 5,
u'width': 5}],
u'packaging_type': u'02',
u'password': u'YOUR_PASSWORD',
u'pickup_type': u'03',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'to_code': u'90210',
u'to_country': u'US',
u'username': u'YOUR_USERNAME',
u'weight_unit': u'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(
{u'action': u'GetAllRates',
u'carrier': u'UPS',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'customs': [],
u'key': u'YOUR_KEY',
u'length_unit': u'IN',
u'packages': [{u'height': 5,
u'length': 5,
u'sub_packaging_type': u'M',
u'weight': 5,
u'width': 5}],
u'packaging_type': u'02',
u'password': u'YOUR_PASSWORD',
u'request_option': u'Shop',
u'service': u'03',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_code': u'90210',
u'to_country': u'US',
u'to_state': u'CA',
u'username': u'YOUR_USERNAME',
u'weight_unit': u'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(
{u'action': u'GetAllRates',
u'carrier': u'UPS',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'key': u'YOUR_UPS_API_KEY',
u'negotiated_rates': True,
u'packages': [{u'height': 1,
u'length': 9,
u'weight': 0.6,
u'width': 6}],
u'packaging_type': u'02',
u'password': u'YOUR_PASSWORD',
u'request_option': u'Rate',
u'residential': True,
u'service': u'92',
u'ship_addr1': u'123 Main St.',
u'ship_city': u'King of Prussia',
u'ship_code': u'19406',
u'ship_country': u'US',
u'ship_state': u'PA',
u'shipper': u'Acme Inc',
u'to_code': u'06333',
u'to_country': u'US',
u'to_state': u'CT',
u'username': u'YOUR_USERNAME',
u'weight_unit': u'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(
{u'action': u'GetAllRates',
u'carrier': u'UPS',
u'params': {u'alt_addr1': u'2601 Sutter St',
u'alt_city': u'San Francisco',
u'alt_code': u'94115',
u'alt_country': u'US',
u'alt_name': u'G&R MARKET DELI',
u'alt_state': u'CA',
u'customer_classification': u'01',
u'customs': [],
u'length_unit': u'IN',
u'packages': [{u'height': 5,
u'length': 5,
u'weight': 5,
u'width': 5}],
u'packaging_type': u'02',
u'pickup_type': u'01',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'to_code': u'90210',
u'to_country': u'US',
u'weight_unit': u'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(
{u'action': u'TimeInTransit',
u'carrier': u'UPS',
u'params': {u'key': u'YOUR_KEY',
u'password': u'YOUR_PASSWORD',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_contact': u'Mark Sanborn',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_code': u'90210',
u'to_country': u'US',
u'username': u'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(
{u'action': u'TimeInTransit',
u'carrier': u'UPS',
u'params': {u'currency': u'USD',
u'documents_only': True,
u'monetary_value': 20,
u'num_of_packages': 4,
u'ship_city': u'Emeryville',
u'ship_code': u'94608',
u'ship_country': u'US',
u'test': True,
u'to_code': u'M1B5K7',
u'to_country': u'CA',
u'weight': 5,
u'weight_unit': u'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(
{u'action': u'Track',
u'carrier': u'UPS',
u'params': {u'key': u'YOUR_KEY',
u'password': u'YOUR_PASSWORD',
u'test': True,
u'tracking_number': u'1Z12345E0205271688',
u'username': u'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(
{u'action': u'Track',
u'carrier': u'UPS',
u'params': {u'key': u'YOUR_KEY',
u'password': u'YOUR_PASSWORD',
u'test': True,
u'tracking_number': u'9102084383041101186729',
u'tracking_option': u'03',
u'username': u'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(
{u'action': u'Track',
u'carrier': u'UPS',
u'params': {u'key': u'YOUR_KEY',
u'password': u'YOUR_PASSWORD',
u'reference_number': u'371296',
u'ship_date_begin': u'20160101',
u'ship_date_end': u'20180101',
u'to_code': u'07094',
u'to_country': u'US',
u'username': u'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(
{u'action': u'UploadDocument',
u'carrier': u'UPS',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'document_type': u'013',
u'file_contents': u'Tm90aWNlDQpJbiBhbGwgY29tbXVuaWNhdGlvbnMgd2l0aCBVUFMgY29uY2VybmluZyB0aGlzIGRvY3VtZW50LCBwbGVhc2UgcmVmZXIgdG8gdGhlIGRvY3VtZW50IGRhdGUgbG9jYXRlZCBvbiB0aGUgY292ZXIuDQpDb3B5cmlnaHQNClRoZSB1c2UsIGRpc2Nsb3N1cmUsIHJlcHJvZHVjdGlvbiwgbW9kaWZpY2F0aW9uLCB0cmFuc2Zlciwgb3IgdHJhbnNtaXR0YWwgb2YgdGhpcyB3b3JrIGZvciBhbnkgcHVycG9zZSBpbiBhbnkgZm9ybSBvciBieSBhbnkgbWVhbnMgd2l0aG91dCB0aGUgd3JpdHRlbiBw ZXJtaXNzaW9uIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBpcyBzdHJpY3RseSBwcm9oaWJpdGVk Lg0KwqkgQ29weXJpZ2h0IDIwMTYgVW5pdGVkIFBhcmNlbCBTZXJ2aWNlIG9mIEFtZXJpY2EsIElu Yy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC4NClRyYWRlbWFya3MNClVQUyBPbkxpbmXCriBpcyBhIHJl Z2lzdGVyZWQgdHJhZGVtYXJrIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJ bmMuIEFsbCBvdGhlciB0cmFkZW1hcmtzIGFyZSB0aGUgcHJvcGVydHkgb2YgdGhlaXIgcmVzcGVj dGl2ZSBvd25lcnMuDQpTb21lIG9mIHRoZSBVUFMgY29ycG9yYXRlIGFwcGxpY2F0aW9ucyB1c2Ug VS5TLiBjaXR5LCBzdGF0ZSwgYW5kIHBvc3RhbCBjb2RlIGluZm9ybWF0aW9uIG9idGFpbmVkIGJ5 IFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJbmMuIHVuZGVyIGEgbm9uLWV4Y2x1 c2l2ZSBsaWNlbnNlIGZyb20gdGhlIFVuaXRlZCBTdGF0ZXMgUG9zdGFsIFNlcnZpY2UuIA0K',
u'file_format': u'txt',
u'filename': u'test.txt',
u'key': u'YOUR_UPS_KEY',
u'password': u'YOUR_PASSWORD',
u'username': u'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(
{u'action': u'LinkDocument',
u'carrier': u'UPS',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'document_id': u'document123.pdf',
u'key': u'YOUR_UPS_KEY',
u'password': u'YOUR_PASSWORD',
u'shipment_id': u'abc123',
u'test': True,
u'username': u'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(
{u'action': u'VoidShipment',
u'carrier': u'UPS',
u'params': {u'key': u'YOUR_KEY',
u'password': u'YOUR_PASSWORD',
u'shipment_id': u'1Z2220060294314162',
u'test': True,
u'tracking_number': u'1Z2220060291994175',
u'username': u'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(
{u'action': u'VoidShipment',
u'carrier': u'UPS',
u'params': {u'key': u'YOUR_KEY',
u'password': u'YOUR_PASSWORD',
u'shipment_id': u'1ZISDE016691676846',
u'test': True,
u'username': u'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(
{u'action': u'AddressValidate',
u'carrier': u'UPS-REST',
u'params': {u'key': u'your-key-from-authenticate-request',
u'test': True,
u'to_addr1': u'2920 Zoo Drive',
u'to_city': u'San Diego',
u'to_code': u'92112',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'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 - 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(
{u'action': u'Authenticate',
u'carrier': u'UPS-REST',
u'params': {u'client_id': u'abc123',
u'client_secret': u'def987',
u'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(
{u'action': u'GetSubscription',
u'carrier': u'UPS-REST',
u'params': {u'begin_date': u'20160426000000',
u'end_date': u'20160429154400',
u'key': u'your-key-from-authenticate-request',
u'subscription_name': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS-REST',
u'params': {u'account_number': u'YOUR_ACCOUNT',
u'currency': u'USD',
u'customs': [{u'customs_quantity_units': u'EA',
u'invoice_line_description': u'My Description',
u'invoice_line_number': u'1',
u'invoice_line_origin_country_code': u'CA',
u'invoice_line_part_number': u'123',
u'invoice_line_value': u'100'}],
u'customs_forms': u'01',
u'image_type': u'PNG',
u'invoice_date': u'20230525',
u'invoice_line_total': 100,
u'key': u'your-key-from-authenticate-request',
u'length_unit': u'IN',
u'packages': [{u'reference_code': u'TN',
u'reference_value': u'12345678',
u'weight': 1}],
u'packaging_type': u'02',
u'pickup_type': u'02',
u'reason_for_export': u'SALE',
u'service': u'11',
u'ship_addr1': u'2300 Southern Blvd',
u'ship_city': u'Bronx',
u'ship_code': u'10460',
u'ship_contact': u'John Doe',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'NY',
u'shipment_description': u'xxx',
u'shipper': u'John Doe',
u'sold_addr1': u'2000 Meadowvale Rd',
u'sold_city': u'Toronto',
u'sold_code': u'M1B5K7',
u'sold_company': u'Acme Inc.',
u'sold_country': u'CA',
u'sold_name': u'John Doe',
u'sold_phone': u'1231231234',
u'sold_state': u'ON',
u'sold_tax_id': u'123abc',
u'special_instructions': u'this ends up in additional comments',
u'test': True,
u'to_addr1': u'2000 Meadowvale Rd',
u'to_attention_name': u'John Doe',
u'to_city': u'Toronto',
u'to_code': u'M1B5K7',
u'to_country': u'CA',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'ON',
u'weight_unit': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS-REST',
u'params': {u'account_number': u'YOUR_ACCOUNT',
u'currency': u'USD',
u'customs': [{u'customs_quantity_units': u'EA',
u'invoice_line_description': u'My Description',
u'invoice_line_number': u'1',
u'invoice_line_origin_country_code': u'CA',
u'invoice_line_part_number': u'123',
u'invoice_line_value': u'100'}],
u'customs_forms': u'01,11',
u'image_type': u'PNG',
u'invoice_date': u'20230525',
u'invoice_line_total': 100,
u'key': u'your-key-from-authenticate-request',
u'length_unit': u'IN',
u'packages': [{u'reference_code': u'TN',
u'reference_value': u'12345678',
u'weight': 1}],
u'packaging_type': u'02',
u'pickup_type': u'02',
u'reason_for_export': u'SALE',
u'service': u'11',
u'ship_addr1': u'2300 Southern Blvd',
u'ship_city': u'Bronx',
u'ship_code': u'10460',
u'ship_contact': u'John Doe',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'NY',
u'ship_tax_id': u'123',
u'shipment_description': u'xxx',
u'shipper': u'John Doe',
u'sold_addr1': u'2000 Meadowvale Rd',
u'sold_city': u'Toronto',
u'sold_code': u'M1B5K7',
u'sold_company': u'Acme Inc.',
u'sold_country': u'CA',
u'sold_name': u'John Doe',
u'sold_phone': u'1231231234',
u'sold_state': u'ON',
u'sold_tax_id': u'123abc',
u'special_instructions': u'this ends up in additional comments',
u'test': True,
u'to_addr1': u'2000 Meadowvale Rd',
u'to_attention_name': u'John Doe',
u'to_city': u'Toronto',
u'to_code': u'M1B5K7',
u'to_country': u'CA',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'ON',
u'weight_unit': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS-REST',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'image_type': u'PNG',
u'key': u'YOUR_UPS_KEY',
u'packages': [{u'height': 5,
u'length': 7,
u'weight': 4,
u'width': 5}],
u'service': u'03',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'940 Presidio Ave',
u'to_addr2': u'#103',
u'to_city': u'San Francisco',
u'to_code': u'94115',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS-REST',
u'params': {u'image_type': u'PNG',
u'key': u'your-key-from-authenticate-request',
u'packages': [{u'additional_handling': True,
u'height': 5,
u'length': 7,
u'weight': 4,
u'width': 5}],
u'service': u'03',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'940 Presidio Ave',
u'to_addr2': u'#103',
u'to_city': u'San Francisco',
u'to_code': u'94115',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS-REST',
u'params': {u'currency': u'USD',
u'image_type': u'PNG',
u'key': u'your-key-from-authenticate-request',
u'packages': [{u'cod_amount': 5.12,
u'cod_fund_type': u'0',
u'length': 7,
u'weight': 4}],
u'service': u'03',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'940 Presidio Ave',
u'to_addr2': u'#103',
u'to_city': u'San Francisco',
u'to_code': u'94115',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS-REST',
u'params': {u'currency': u'CAD',
u'customs': [{u'commodity_code': u'240110',
u'customs_quantity_units': u'EA',
u'invoice_line_description': u'My Description',
u'invoice_line_number': u'1',
u'invoice_line_origin_country_code': u'CA',
u'invoice_line_part_number': u'123',
u'invoice_line_value': u'1'}],
u'customs_forms': u'03',
u'image_type': u'PNG',
u'invoice': u'12345',
u'invoice_date': u'20170610',
u'invoice_line_total': 100,
u'key': u'your-key-from-authenticate-request',
u'length_unit': u'IN',
u'master_carton': True,
u'packages': [{u'height': 1,
u'length': 1,
u'reference_code': u'TN',
u'reference_value': u'12345678',
u'weight': 1,
u'width': 1}],
u'packaging_type': u'02',
u'pickup_type': u'02',
u'reason_for_export': u'SALE',
u'service': u'07',
u'ship_addr1': u'2300 Southern Blvd',
u'ship_city': u'Bronx',
u'ship_code': u'10460',
u'ship_contact': u'John Doe',
u'ship_country': u'US',
u'ship_name': u'John Doe',
u'ship_phone': u'1231231234',
u'ship_state': u'NY',
u'shipment_description': u'xxx',
u'shipper': u'John Doe',
u'sold_addr1': u'2000 Meadowvale Rd',
u'sold_city': u'Toronto',
u'sold_code': u'M1B5K7',
u'sold_company': u'Acme Inc.',
u'sold_country': u'CA',
u'sold_name': u'John Doe',
u'sold_phone': u'1231231234',
u'sold_state': u'ON',
u'sold_tax_id': u'123abc',
u'test': True,
u'to_addr1': u'2000 Meadowvale Rd',
u'to_attention_name': u'John Doe',
u'to_city': u'Toronto',
u'to_code': u'M1B5K7',
u'to_company': u'Acme Inc.',
u'to_country': u'CA',
u'to_phone': u'1231231234',
u'to_state': u'ON',
u'trade_terms': u'DDP',
u'weight_unit': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS-REST',
u'params': {u'image_type': u'GIF',
u'key': u'your-key-from-authenticate-request',
u'packages': [{u'length': 7,
u'signature_type': u'ADULT',
u'weight': 4}],
u'service': u'03',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'940 Presidio Ave',
u'to_addr2': u'#103',
u'to_city': u'San Francisco',
u'to_code': u'94115',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS-REST',
u'params': {u'addons': [u'DIRECT_DELIVERY_ONLY'],
u'image_type': u'GIF',
u'key': u'your-key-from-authenticate-request',
u'packages': [{u'length': 7,
u'signature_type': u'DIRECT',
u'weight': 4}],
u'service': u'03',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'940 Presidio Ave',
u'to_addr2': u'#103',
u'to_city': u'San Francisco',
u'to_code': u'94115',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS-REST',
u'params': {u'image_type': u'GIF',
u'key': u'your-key-from-authenticate-request',
u'packages': [{u'length': 7,
u'signature_type': u'DIRECT',
u'weight': 4}],
u'service': u'03',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'940 Presidio Ave',
u'to_addr2': u'#103',
u'to_city': u'San Francisco',
u'to_code': u'94115',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS-REST',
u'params': {u'image_type': u'GIF',
u'key': u'your-key-from-authenticate-request',
u'notify': [{u'email': u'bob@email.com', u'type': u'6'}],
u'packages': [{u'length': 7, u'weight': 4}],
u'service': u'03',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'940 Presidio Ave',
u'to_addr2': u'#103',
u'to_city': u'San Francisco',
u'to_code': u'94115',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS-REST',
u'params': {u'frs_shipment': True,
u'image_type': u'GIF',
u'key': u'your-key-from-authenticate-request',
u'packages': [{u'freight_class': u'55',
u'length': 7,
u'weight': 4}],
u'service': u'03',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'940 Presidio Ave',
u'to_addr2': u'#103',
u'to_city': u'San Francisco',
u'to_code': u'94115',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS-REST',
u'params': {u'image_type': u'GIF',
u'key': u'your-key-from-authenticate-request',
u'packages': [{u'insured_currency': u'USD',
u'insured_value': 700,
u'length': 7,
u'weight': 4}],
u'service': u'03',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'940 Presidio Ave',
u'to_addr2': u'#103',
u'to_city': u'San Francisco',
u'to_code': u'94115',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS-REST',
u'params': {u'account_number': u'your-account-number',
u'key': u'your-key-from-authenticate-request',
u'packages': [{u'battery': {u'packing_type': u'PACKED_WITH_EQUIPMENT',
u'type': u'LITHIUM_ION'},
u'weight': 15}],
u'packaging_type': u'YOUR_PACKAGING',
u'service': u'03',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'123 Main St',
u'to_city': u'Beverly Hills',
u'to_code': u'90210',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS-REST',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'cost_center': u'00000',
u'image_type': u'GIF',
u'key': u'your-key-from-authenticate-request',
u'package_id': u'1',
u'packages': [{u'length': 7, u'weight': 4}],
u'packaging_type': u'62',
u'service': u'M4',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'940 Presidio Ave',
u'to_addr2': u'#103',
u'to_city': u'San Francisco',
u'to_code': u'94115',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'CA',
u'usps_endorsement': u'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 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(
{u'action': u'LabelRecovery',
u'carrier': u'UPS-REST',
u'params': {u'key': u'your-key-from-authenticate-request',
u'test': True,
u'tracking_number': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS-REST',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'from_addr1': u'940 Presidio Ave',
u'from_addr2': u'#103',
u'from_city': u'San Francisco',
u'from_code': u'94115',
u'from_company': u'RocketShipIt',
u'from_name': u'Mark Sanborn',
u'from_state': u'CA',
u'image_type': u'Png',
u'key': u'your-key-from-authenticate-request',
u'packages': [{u'reference_barcode': True,
u'reference_code': u'PO',
u'reference_code2': u'IN',
u'reference_value': u'12382871',
u'reference_value2': u'10000',
u'weight': 4}],
u'return_code': u'9',
u'service': u'03',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'940 Presidio Ave',
u'to_addr2': u'#103',
u'to_city': u'San Francisco',
u'to_code': u'94115',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS-REST',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'from_addr1': u'940 Presidio Ave',
u'from_addr2': u'#103',
u'from_city': u'San Francisco',
u'from_code': u'94115',
u'from_company': u'RocketShipIt',
u'from_name': u'Mark Sanborn',
u'from_state': u'CA',
u'image_type': u'GIF',
u'key': u'your-key-from-authenticate-request',
u'packages': [{u'weight': 4}],
u'return_code': u'9',
u'service': u'03',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'940 Presidio Ave',
u'to_addr2': u'#103',
u'to_city': u'San Francisco',
u'to_code': u'94115',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS-REST',
u'params': {u'from_addr1': u'940 Presidio Ave',
u'from_addr2': u'#103',
u'from_city': u'San Francisco',
u'from_code': u'94115',
u'from_company': u'RocketShipIt',
u'from_name': u'Mark Sanborn',
u'from_state': u'CA',
u'image_type': u'GIF',
u'key': u'your-key-from-authenticate-request',
u'notify': [{u'email': u'bob@email.com',
u'from_email': u'blah@email.com',
u'from_name': u'John Doe',
u'type': u'RETURN',
u'undeliverable_email': u'foo@bar.com'}],
u'packages': [{u'weight': 4}],
u'return_code': u'8',
u'service': u'03',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'940 Presidio Ave',
u'to_addr2': u'#103',
u'to_city': u'San Francisco',
u'to_code': u'94115',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS-REST',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'image_type': u'GIF',
u'key': u'your-key-from-authenticate-request',
u'packages': [{u'length': 7, u'weight': 4}],
u'service': u'93',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'940 Presidio Ave',
u'to_addr2': u'#103',
u'to_city': u'San Francisco',
u'to_code': u'94115',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS-REST',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'billing': [{u'account': u'abc123',
u'country_code': u'US',
u'payment_type': u'third_party',
u'postal_code': u'94608',
u'type': u'transportation'}],
u'image_type': u'GIF',
u'key': u'your-key-from-authenticate-request',
u'packages': [{u'length': 7, u'weight': 4}],
u'service': u'03',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'940 Presidio Ave',
u'to_addr2': u'#103',
u'to_city': u'San Francisco',
u'to_code': u'94115',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS-REST',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'discount': {u'alias': u'1231', u'code': u'adsf'},
u'image_type': u'PNG',
u'key': u'your-key-from-authenticate-request',
u'packages': [{u'height': 5,
u'length': 7,
u'weight': 4,
u'width': 5}],
u'service': u'03',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'940 Presidio Ave',
u'to_addr2': u'#103',
u'to_city': u'San Francisco',
u'to_code': u'94115',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS-REST',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'alt_addr1': u'2601 Sutter St',
u'alt_city': u'San Francisco',
u'alt_code': u'94115',
u'alt_country': u'US',
u'alt_name': u'G&R MARKET DELI',
u'alt_state': u'CA',
u'image_type': u'GIF',
u'key': u'your-key-from-authenticate-request',
u'packages': [{u'length': 7, u'weight': 4}],
u'service': u'03',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'Acme Inc',
u'test': True,
u'to_addr1': u'940 Presidio Ave',
u'to_addr2': u'#103',
u'to_city': u'San Francisco',
u'to_code': u'94115',
u'to_country': u'US',
u'to_email': u'customer@email.com',
u'to_name': u'John Doe',
u'to_state': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'UPS-REST',
u'params': {u'account_number': u'YOUR_ACCOUNT',
u'currency': u'CAD',
u'customs': [{u'customs_quantity_units': u'EA',
u'invoice_line_description': u'My Description',
u'invoice_line_number': u'1',
u'invoice_line_origin_country_code': u'CA',
u'invoice_line_part_number': u'123',
u'invoice_line_value': u'1'}],
u'customs_forms': u'01',
u'documents_only': True,
u'image_type': u'PNG',
u'invoice_date': u'20160910',
u'invoice_line_total': 100,
u'key': u'your-key-from-authenticate-request',
u'length_unit': u'IN',
u'packages': [{u'reference_code': u'TN',
u'reference_value': u'12345678',
u'weight': 1}],
u'packaging_type': u'01',
u'pickup_type': u'02',
u'reason_for_export': u'SALE',
u'service': u'14',
u'ship_addr1': u'2000 Meadowvale Rd',
u'ship_city': u'Toronto',
u'ship_code': u'M1B5K7',
u'ship_contact': u'John Doe',
u'ship_country': u'CA',
u'ship_phone': u'1231231234',
u'ship_state': u'ON',
u'shipment_description': u'xxx',
u'shipper': u'John Doe',
u'sold_addr1': u'2000 Meadowvale Rd',
u'sold_city': u'Toronto',
u'sold_code': u'M1B5K7',
u'sold_company': u'Acme Inc.',
u'sold_country': u'CA',
u'sold_name': u'John Doe',
u'sold_phone': u'1231231234',
u'sold_state': u'ON',
u'sold_tax_id': u'123abc',
u'test': True,
u'to_addr1': u'2300 Southern Blvd',
u'to_attention_name': u'John Doe',
u'to_city': u'Bronx',
u'to_code': u'10460',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_phone': u'1231231234',
u'to_state': u'NY',
u'weight_unit': u'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 - 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(
{u'action': u'CancelPickup',
u'carrier': u'UPS-REST',
u'params': {u'key': u'your-key-from-authenticate-request',
u'pickup_id': u'2929AONCALL',
u'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(
{u'action': u'PickupRate',
u'carrier': u'UPS-REST',
u'params': {u'key': u'your-key-from-authenticate-request',
u'pickup_addr1': u'940 Presidio Ave',
u'pickup_city': u'San Francisco',
u'pickup_code': u'94115',
u'pickup_country': u'US',
u'pickup_state': u'CA',
u'test': True,
u'to_addr1': u'2920 Zoo Drive',
u'to_city': u'San Diego',
u'to_code': u'92112',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'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(
{u'action': u'CreatePickup',
u'carrier': u'UPS-REST',
u'params': {u'close_time': u'0900',
u'key': u'your-key-from-authenticate-request',
u'payment_method': u'00',
u'pickup_addr1': u'940 Presidio Ave',
u'pickup_city': u'San Francisco',
u'pickup_code': u'94115',
u'pickup_company_name': u'Acme Inc',
u'pickup_contact_name': u'Mark Sanborn',
u'pickup_container_code': u'01',
u'pickup_country': u'US',
u'pickup_date': u'20160112',
u'pickup_destination': u'US',
u'pickup_floor': u'2',
u'pickup_phone': u'123-123-1234',
u'pickup_quantity': 1,
u'pickup_room': u'A',
u'pickup_service_code': u'002',
u'pickup_state': u'CA',
u'ready_time': u'0800',
u'special_instructions': u'the gate code is 12345',
u'test': True,
u'to_addr1': u'2920 Zoo Drive',
u'to_city': u'San Diego',
u'to_code': u'92112',
u'to_country': u'US',
u'to_email': u'ups@test.com',
u'to_name': u'John Doe',
u'to_state': u'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(
{u'action': u'PickupStatus',
u'carrier': u'UPS-REST',
u'params': {u'key': u'your-key-from-authenticate-request', u'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 - 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(
{u'action': u'GetAllRates',
u'carrier': u'UPS-REST',
u'params': {u'account_number': u'your-account-number',
u'key': u'your-key-from-authenticate-request',
u'negotiated_rates': True,
u'packages': [{u'weight': 2}, {u'weight': 2}],
u'packaging_type': u'02',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_state': u'MT',
u'shipper': u'My Company',
u'test': True,
u'to_code': u'90210',
u'to_country': u'US',
u'to_state': u'CA',
u'weight_unit': u'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(
{u'action': u'GetAllRates',
u'carrier': u'UPS-REST',
u'params': {u'account_number': u'YOUR_ACCOUNT',
u'customer_classification': u'01',
u'customs': [],
u'key': u'your-key-from-authenticate-request',
u'length_unit': u'IN',
u'packages': [{u'additional_handling': True,
u'height': 5,
u'length': 5,
u'weight': 5,
u'width': 5}],
u'packaging_type': u'02',
u'pickup_type': u'01',
u'residential': True,
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_code': u'90210',
u'to_country': u'US',
u'weight_unit': u'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 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(
{u'action': u'GetAllRates',
u'carrier': u'UPS-REST',
u'params': {u'account_number': u'YOUR_ACCOUNT',
u'customer_classification': u'01',
u'customs': [],
u'key': u'your-key-from-authenticate-request',
u'length_unit': u'IN',
u'packages': [{u'height': 5,
u'length': 5,
u'weight': 5,
u'width': 5}],
u'packaging_type': u'02',
u'pickup_type': u'01',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_code': u'90210',
u'to_country': u'US',
u'weight_unit': u'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(
{u'action': u'GetAllRates',
u'carrier': u'UPS-REST',
u'params': {u'account_number': u'YOUR_ACCOUNT',
u'customer_classification': u'01',
u'customs': [],
u'ground_freight': True,
u'key': u'your-key-from-authenticate-request',
u'length_unit': u'IN',
u'packages': [{u'freight_class': u'50',
u'height': 5,
u'length': 5,
u'weight': 10,
u'width': 5}],
u'packaging_type': u'02',
u'pickup_type': u'01',
u'request_option': u'Rate',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_code': u'90210',
u'to_country': u'US',
u'to_state': u'CA',
u'weight_unit': u'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(
{u'action': u'GetAllRates',
u'carrier': u'UPS-REST',
u'params': {u'account_number': u'YOUR_ACCOUNT',
u'customer_classification': u'01',
u'customs': [],
u'key': u'your-key-from-authenticate-request',
u'length_unit': u'IN',
u'packages': [{u'height': 5,
u'length': 5,
u'weight': 5,
u'width': 5}],
u'packaging_type': u'02',
u'pickup_type': u'01',
u'residential': True,
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_code': u'V0K1G0',
u'to_country': u'CA',
u'weight_unit': u'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(
{u'action': u'GetAllRates',
u'carrier': u'UPS-REST',
u'params': {u'account_number': u'YOUR_ACCOUNT',
u'customer_classification': u'01',
u'customs': [],
u'key': u'your-key-from-authenticate-request',
u'length_unit': u'IN',
u'negotiated_rates': True,
u'packages': [{u'height': 5,
u'insured_currency': u'USD',
u'insured_value': 700,
u'length': 5,
u'weight': 5,
u'width': 5}],
u'packaging_type': u'02',
u'pickup_type': u'01',
u'residential': True,
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_code': u'90210',
u'to_country': u'US',
u'to_state': u'CA',
u'weight_unit': u'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(
{u'action': u'GetAllRates',
u'carrier': u'UPS-REST',
u'params': {u'account_number': u'YOUR_ACCOUNT',
u'customer_classification': u'00',
u'customs': [],
u'key': u'your-key-from-authenticate-request',
u'length_unit': u'IN',
u'packages': [{u'height': 5,
u'length': 5,
u'weight': 5,
u'width': 5}],
u'packaging_type': u'02',
u'pickup_type': u'03',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_code': u'90210',
u'to_country': u'US',
u'weight_unit': u'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(
{u'action': u'GetAllRates',
u'carrier': u'UPS-REST',
u'params': {u'account_number': u'YOUR_ACCOUNT',
u'customs': [],
u'key': u'your-key-from-authenticate-request',
u'length_unit': u'IN',
u'packages': [{u'height': 5,
u'length': 5,
u'sub_packaging_type': u'M',
u'weight': 5,
u'width': 5}],
u'packaging_type': u'02',
u'request_option': u'Shop',
u'service': u'03',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_code': u'90210',
u'to_country': u'US',
u'to_state': u'CA',
u'weight_unit': u'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 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(
{u'action': u'GetAllRates',
u'carrier': u'UPS-REST',
u'params': {u'account_number': u'YOUR_ACCOUNT',
u'key': u'your-key-from-authenticate-request',
u'negotiated_rates': True,
u'packages': [{u'height': 1,
u'length': 9,
u'weight': 0.6,
u'width': 6}],
u'packaging_type': u'02',
u'request_option': u'Rate',
u'residential': True,
u'service': u'92',
u'ship_addr1': u'123 Main St.',
u'ship_city': u'Vancouver',
u'ship_code': u'98685',
u'ship_country': u'US',
u'ship_state': u'WA',
u'shipper': u'Acme Inc',
u'test': True,
u'to_code': u'06333',
u'to_country': u'US',
u'to_state': u'CT',
u'weight_unit': u'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 - 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(
{u'action': u'GetAllRates',
u'carrier': u'UPS-REST',
u'params': {u'account_number': u'YOUR_ACCOUNT',
u'alt_addr1': u'2601 Sutter St',
u'alt_city': u'San Francisco',
u'alt_code': u'94115',
u'alt_country': u'US',
u'alt_name': u'G&R MARKET DELI',
u'alt_state': u'CA',
u'customer_classification': u'01',
u'customs': [],
u'key': u'your-key-from-authenticate-request',
u'length_unit': u'IN',
u'packages': [{u'height': 5,
u'length': 5,
u'weight': 5,
u'width': 5}],
u'packaging_type': u'02',
u'pickup_type': u'01',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_country': u'US',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_code': u'90210',
u'to_country': u'US',
u'weight_unit': u'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(
{u'action': u'TimeInTransit',
u'carrier': u'UPS-REST',
u'params': {u'key': u'your-key-from-authenticate-request',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_contact': u'Mark Sanborn',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_code': u'90210',
u'to_country': u'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(
{u'action': u'TimeInTransit',
u'carrier': u'UPS-REST',
u'params': {u'currency': u'USD',
u'documents_only': True,
u'key': u'your-key-from-authenticate-request',
u'monetary_value': 20,
u'num_of_packages': 4,
u'ship_city': u'Emeryville',
u'ship_code': u'94608',
u'ship_country': u'US',
u'test': True,
u'to_code': u'M1B5K7',
u'to_country': u'CA',
u'weight': 5,
u'weight_unit': u'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(
{u'action': u'TrackAlert',
u'carrier': u'UPS-REST',
u'params': {u'credential': u'something-secure',
u'credential_type': u'Bearer',
u'key': u'your-key-from-authenticate-request',
u'tracking_number': u'1ZCIETST0111111114',
u'url': u'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 - 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(
{u'action': u'Track',
u'carrier': u'UPS-REST',
u'params': {u'key': u'your-key-from-authenticate-request',
u'test': True,
u'tracking_number': u'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(
{u'action': u'Track',
u'carrier': u'UPS-REST',
u'params': {u'key': u'your-key-from-authenticate-request',
u'test': True,
u'tracking_number': u'9102084383041101186729',
u'tracking_option': u'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(
{u'action': u'UploadDocument',
u'carrier': u'UPS-REST',
u'params': {u'account_number': u'your-account-number',
u'document_type': u'013',
u'file_contents': u'Tm90aWNlDQpJbiBhbGwgY29tbXVuaWNhdGlvbnMgd2l0aCBVUFMgY29uY2VybmluZyB0aGlzIGRvY3VtZW50LCBwbGVhc2UgcmVmZXIgdG8gdGhlIGRvY3VtZW50IGRhdGUgbG9jYXRlZCBvbiB0aGUgY292ZXIuDQpDb3B5cmlnaHQNClRoZSB1c2UsIGRpc2Nsb3N1cmUsIHJlcHJvZHVjdGlvbiwgbW9kaWZpY2F0aW9uLCB0cmFuc2Zlciwgb3IgdHJhbnNtaXR0YWwgb2YgdGhpcyB3b3JrIGZvciBhbnkgcHVycG9zZSBpbiBhbnkgZm9ybSBvciBieSBhbnkgbWVhbnMgd2l0aG91dCB0aGUgd3JpdHRlbiBw ZXJtaXNzaW9uIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBpcyBzdHJpY3RseSBwcm9oaWJpdGVk Lg0KwqkgQ29weXJpZ2h0IDIwMTYgVW5pdGVkIFBhcmNlbCBTZXJ2aWNlIG9mIEFtZXJpY2EsIElu Yy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC4NClRyYWRlbWFya3MNClVQUyBPbkxpbmXCriBpcyBhIHJl Z2lzdGVyZWQgdHJhZGVtYXJrIG9mIFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJ bmMuIEFsbCBvdGhlciB0cmFkZW1hcmtzIGFyZSB0aGUgcHJvcGVydHkgb2YgdGhlaXIgcmVzcGVj dGl2ZSBvd25lcnMuDQpTb21lIG9mIHRoZSBVUFMgY29ycG9yYXRlIGFwcGxpY2F0aW9ucyB1c2Ug VS5TLiBjaXR5LCBzdGF0ZSwgYW5kIHBvc3RhbCBjb2RlIGluZm9ybWF0aW9uIG9idGFpbmVkIGJ5 IFVuaXRlZCBQYXJjZWwgU2VydmljZSBvZiBBbWVyaWNhLCBJbmMuIHVuZGVyIGEgbm9uLWV4Y2x1 c2l2ZSBsaWNlbnNlIGZyb20gdGhlIFVuaXRlZCBTdGF0ZXMgUG9zdGFsIFNlcnZpY2UuIA0K',
u'file_format': u'txt',
u'filename': u'test.txt',
u'key': u'your-key-from-authenticate-request',
u'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(
{u'action': u'LinkDocument',
u'carrier': u'UPS-REST',
u'params': {u'account_number': u'YOUR_ACCOUNT_NUMBER',
u'document_id': u'document123.pdf',
u'key': u'your-key-from-authenticate-request',
u'shipment_id': u'abc123',
u'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(
{u'action': u'VoidShipment',
u'carrier': u'UPS-REST',
u'params': {u'key': u'your-key-from-authenticate-request',
u'shipment_id': u'1Z2220060294314162',
u'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(
{u'action': u'AddressValidate',
u'carrier': u'USPS',
u'params': {u'test': True,
u'to_addr1': u'2920 Zoo Drive',
u'to_city': u'San Diego',
u'to_code': u'92101',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'CA',
u'username': u'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(
{u'action': u'AddressValidate',
u'carrier': u'USPS',
u'params': {u'test': True,
u'to_code': u'92101',
u'username': u'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(
{u'action': u'CreateManifest',
u'carrier': u'USPS',
u'params': {u'image_type': u'PDF',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipment_ids': [u'420941159205590202518101026815'],
u'shipper': u'RocketShipIt',
u'test': True,
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'USPS',
u'params': {u'from_addr1': u'940 Presidio Ave',
u'from_addr2': u'#103',
u'from_city': u'San Francisco',
u'from_code': u'94115',
u'from_country': u'US',
u'from_name': u'John Doe',
u'from_state': u'CA',
u'image_type': u'PDF',
u'packages': [{u'height': 8,
u'length': 7,
u'weight': 4,
u'width': 7}],
u'pdu_city': u'Wilkes Barre',
u'pdu_firm_name': u'Acme Inc',
u'pdu_po_box': u'PO Box 100',
u'pdu_state': u'PA',
u'pdu_zip4': u'1234',
u'pdu_zip5': u'18702',
u'permit_issuing_po_city': u'New York',
u'permit_issuing_po_state': u'NY',
u'permit_issuing_po_zip5': u'10001',
u'permit_number': u'293829',
u'service': u'PRIORITY',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_contact': u'John Doe',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'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(
{u'action': u'SubmitShipment',
u'carrier': u'USPS',
u'params': {u'image_type': u'PDF',
u'packages': [{u'height': 8,
u'length': 7,
u'weight': 4,
u'width': 7}],
u'service': u'PRIORITY',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_contact': u'John Doe',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'940 Presidio Ave',
u'to_addr2': u'#103',
u'to_city': u'San Francisco',
u'to_code': u'94115',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'CA',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'USPS',
u'params': {u'customs': [{u'customs_description': u'my shipment',
u'customs_hs_tariff': u'',
u'customs_origin_country': u'US',
u'customs_quantity': 1,
u'customs_value': 5.0,
u'customs_weight': 2}],
u'customs_content_type': u'SAMPLE',
u'packages': [{u'height': 8,
u'length': 6,
u'weight': 2,
u'width': 7}],
u'reference_value': u'asdf',
u'service': u'US-FCI',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'2000 Meadowvale Road',
u'to_city': u'Toronto',
u'to_code': u'M1B5K7',
u'to_country': u'CA',
u'to_name': u'Toronto Zoo',
u'to_phone': u'1231231234',
u'to_state': u'MB',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'USPS',
u'params': {u'customs': [{u'customs_description': u'my shipment',
u'customs_hs_tariff': u'',
u'customs_origin_country': u'US',
u'customs_quantity': 1,
u'customs_value': 5.0,
u'customs_weight': 2.5}],
u'customs_content_type': u'SAMPLE',
u'packages': [{u'height': 8,
u'length': 6,
u'weight': 5,
u'width': 7}],
u'reference_value': u'asdf',
u'service': u'US-EMI',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'2000 Meadowvale Road',
u'to_city': u'Toronto',
u'to_code': u'M1B5K7',
u'to_country': u'CA',
u'to_name': u'Toronto Zoo',
u'to_phone': u'1231231234',
u'to_state': u'MB',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'USPS',
u'params': {u'customs': [{u'customs_description': u'my shipment',
u'customs_hs_tariff': u'',
u'customs_origin_country': u'US',
u'customs_quantity': 1,
u'customs_value': 5.0,
u'customs_weight': 2.5}],
u'customs_content_type': u'SAMPLE',
u'packages': [{u'height': 8,
u'length': 6,
u'weight': 5,
u'width': 7}],
u'reference_value': u'asdf',
u'service': u'US-PMI',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'2000 Meadowvale Road',
u'to_city': u'Toronto',
u'to_code': u'M1B5K7',
u'to_country': u'CA',
u'to_name': u'Toronto Zoo',
u'to_phone': u'1231231234',
u'to_state': u'MB',
u'username': u'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(
{u'action': u'GetAllRates',
u'carrier': u'USPS',
u'params': {u'packages': [{u'height': 10,
u'length': 5,
u'weight': 6,
u'width': 3}],
u'ship_code': u'59759',
u'to_country': u'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(
{u'action': u'GetAllRates',
u'carrier': u'USPS',
u'params': {u'packages': [{u'weight': 6}],
u'packaging_type': u'Regional Rate Box A',
u'service': u'Priority Commercial',
u'ship_code': u'59759',
u'to_code': u'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(
{u'action': u'GetAllRates',
u'carrier': u'USPS',
u'params': {u'packages': [{u'weight': 6}],
u'ship_code': u'59759',
u'to_code': u'90210',
u'username': u'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(
{u'action': u'GetAllRates',
u'carrier': u'USPS',
u'params': {u'packages': [{u'first_class_mail_type': u'PARCEL',
u'weight': 0.3}],
u'service': u'First Class',
u'ship_code': u'59759',
u'to_code': u'90210',
u'username': u'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 - 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(
{u'action': u'track',
u'carrier': u'USPS',
u'params': {u'tracking_number': u'9361289878130102925130',
u'username': u'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(
{u'action': u'AddressValidate',
u'carrier': u'USPS-REST',
u'params': {u'key': u'your-key-from-authenticate-request',
u'test': True,
u'to_code': u'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(
{u'action': u'Authenticate',
u'carrier': u'USPS-REST',
u'params': {u'client_id': u'abc123',
u'client_secret': u'def987',
u'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-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(
{u'action': u'SubmitShipment',
u'carrier': u'USPS-eVS',
u'params': {u'image_type': u'PDF',
u'packages': [{u'height': 8,
u'length': 7,
u'weight': 4.3,
u'width': 7}],
u'password': u'YOUR_PASSWORD',
u'service': u'PRIORITY',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_contact': u'John Doe',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'940 Presidio Ave',
u'to_addr2': u'#103',
u'to_city': u'San Francisco',
u'to_code': u'94115',
u'to_country': u'US',
u'to_name': u'John Doe',
u'to_state': u'CA',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'USPS-eVS',
u'params': {u'customs': [{u'country_of_manufacture': u'US',
u'customs_description': u'My Description',
u'customs_line_amount': 50.0,
u'customs_quantity': 1,
u'customs_quantity_units': u'EA',
u'customs_weight': 2.5},
{u'country_of_manufacture': u'US',
u'customs_description': u'My Description',
u'customs_line_amount': 50.0,
u'customs_quantity': 1,
u'customs_quantity_units': u'EA',
u'customs_weight': 2.5,
u'number_of_packages_per_commodity': 2}],
u'image_type': u'PDF',
u'packages': [{u'height': 8,
u'length': 7,
u'weight': 4.3,
u'width': 7}],
u'password': u'YOUR_PASSWORD',
u'service': u'PRIORITY',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_contact': u'John Doe',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'PSC 556 BOX 177',
u'to_city': u'APO',
u'to_code': u'96386',
u'to_country': u'US',
u'to_name': u'CPT JOHN DOE',
u'to_phone': u'1231231234',
u'to_state': u'AP',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'USPS-eVS',
u'params': {u'customs': [{u'country_of_manufacture': u'US',
u'customs_description': u'My Description',
u'customs_quantity': 1,
u'customs_quantity_units': u'EA',
u'customs_value': 50.0,
u'customs_weight': 2},
{u'country_of_manufacture': u'US',
u'customs_description': u'My Description',
u'customs_quantity': 1,
u'customs_quantity_units': u'EA',
u'customs_value': 50.0,
u'customs_weight': 2,
u'number_of_packages_per_commodity': 2}],
u'customs_content_type': u'SAMPLE',
u'image_type': u'PDF',
u'packages': [{u'height': 8,
u'length': 7,
u'weight': 4.3,
u'width': 7}],
u'password': u'YOUR_PASSWORD',
u'service': u'US-EMI',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_contact': u'John Doe',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'2000 Meadowvale Rd',
u'to_city': u'Toronto',
u'to_code': u'M1B5K7',
u'to_country': u'CA',
u'to_name': u'JOHN DOE',
u'to_phone': u'1231231234',
u'to_state': u'ON',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'USPS-eVS',
u'params': {u'customs': [{u'country_of_manufacture': u'US',
u'customs_description': u'My Description',
u'customs_quantity': 1,
u'customs_quantity_units': u'EA',
u'customs_value': 50.0,
u'customs_weight': 2}],
u'customs_content_type': u'SAMPLE',
u'image_type': u'PDF',
u'packages': [{u'height': 8,
u'length': 7,
u'weight': 3,
u'width': 7}],
u'password': u'YOUR_PASSWORD',
u'service': u'US-FCI',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_contact': u'John Doe',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'2000 Meadowvale Rd',
u'to_city': u'Toronto',
u'to_code': u'M1B5K7',
u'to_country': u'CA',
u'to_name': u'JOHN DOE',
u'to_phone': u'1231231234',
u'to_state': u'ON',
u'username': u'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(
{u'action': u'SubmitShipment',
u'carrier': u'USPS-eVS',
u'params': {u'customs': [{u'country_of_manufacture': u'US',
u'customs_description': u'My Description',
u'customs_quantity': 1,
u'customs_quantity_units': u'EA',
u'customs_value': 50.0,
u'customs_weight': 2},
{u'country_of_manufacture': u'US',
u'customs_description': u'My Description',
u'customs_quantity': 1,
u'customs_quantity_units': u'EA',
u'customs_value': 50.0,
u'customs_weight': 2,
u'number_of_packages_per_commodity': 2}],
u'customs_content_type': u'SAMPLE',
u'image_type': u'PDF',
u'packages': [{u'height': 8,
u'length': 7,
u'weight': 4.3,
u'width': 7}],
u'password': u'YOUR_PASSWORD',
u'service': u'US-PMI',
u'ship_addr1': u'123 Main St',
u'ship_city': u'Whitehall',
u'ship_code': u'59759',
u'ship_contact': u'John Doe',
u'ship_country': u'US',
u'ship_phone': u'1231231234',
u'ship_state': u'MT',
u'shipper': u'RocketShipIt',
u'test': True,
u'to_addr1': u'2000 Meadowvale Rd',
u'to_city': u'Toronto',
u'to_code': u'M1B5K7',
u'to_country': u'CA',
u'to_name': u'JOHN DOE',
u'to_phone': u'1231231234',
u'to_state': u'ON',
u'username': u'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(
{u'action': u'VoidShipment',
u'carrier': u'USPS-eVS',
u'params': {u'password': u'YOUR_PASSWORD',
u'test': True,
u'username': u'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
}
}
)