Examples
Amazon MWS - Rates
{
"carrier": "amazon-mws",
"action": "GetAllRates",
"params": {
"key": "YOUR_SELLER_ID",
"username": "YOUR_ACCESS_KEY_ID",
"password": "YOUR_SECRET_KEY",
"order": {
"id": "111-7676169-9674624",
"items": [
{
"id": "28367575711066",
"quantity": 1
}
]
},
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"ship_email": "john@doe.com",
"ship_phone": "1231231234",
"weight_unit": "oz"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'amazon-mws',
'action' => 'GetAllRates',
'params' =>
array (
'key' => 'YOUR_SELLER_ID',
'username' => 'YOUR_ACCESS_KEY_ID',
'password' => 'YOUR_SECRET_KEY',
'order' =>
array (
'id' => '111-7676169-9674624',
'items' =>
array (
0 =>
array (
'id' => '28367575711066',
'quantity' => 1,
),
),
),
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 5,
'width' => 5,
'height' => 5,
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'ship_email' => 'john@doe.com',
'ship_phone' => '1231231234',
'weight_unit' => 'oz',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'amazon-mws',
'params': {'key': 'YOUR_SELLER_ID',
'order': {'id': '111-7676169-9674624',
'items': [{'id': '28367575711066', 'quantity': 1}]},
'packages': [{'height': 5, 'length': 5, 'weight': 5, 'width': 5}],
'password': 'YOUR_SECRET_KEY',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_email': 'john@doe.com',
'ship_phone': '1231231234',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'username': 'YOUR_ACCESS_KEY_ID',
'weight_unit': 'oz'}}
)
rs.request(
{"carrier"=>"amazon-mws",
"action"=>"GetAllRates",
"params"=>
{"key"=>"YOUR_SELLER_ID",
"username"=>"YOUR_ACCESS_KEY_ID",
"password"=>"YOUR_SECRET_KEY",
"order"=>
{"id"=>"111-7676169-9674624",
"items"=>[{"id"=>"28367575711066", "quantity"=>1}]},
"packages"=>[{"weight"=>5, "length"=>5, "width"=>5, "height"=>5}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"ship_email"=>"john@doe.com",
"ship_phone"=>"1231231234",
"weight_unit"=>"oz"}}
)
rocketshipit.request(
{
"carrier": "amazon-mws",
"action": "GetAllRates",
"params": {
"key": "YOUR_SELLER_ID",
"username": "YOUR_ACCESS_KEY_ID",
"password": "YOUR_SECRET_KEY",
"order": {
"id": "111-7676169-9674624",
"items": [
{
"id": "28367575711066",
"quantity": 1
}
]
},
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5
}
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"ship_email": "john@doe.com",
"ship_phone": "1231231234",
"weight_unit": "oz"
}
}
)
Asendia - Label
{
"carrier": "Asendia",
"action": "SubmitShipment",
"params": {
"key": "YOUR_ASENDIA_API_KEY",
"account_number": "YOUR_ASENDIA_ACCOUNT_NUMBER",
"username": "YOUR_ASENDIA_USERNAME",
"password": "YOUR_ASENDIA_PASSWORD",
"meter_number": "YOUR_ASENDIA_DATA_SOURCE",
"service": "A105",
"monetary_value": 20.00,
"packages": [
{
"weight": 2,
"length": 5,
"width": 5,
"height": 5
}
],
"customs": [
{
"invoice_line_part_number": "abc123",
"customs_description": "foo",
"invoice_line_value": "10.00",
"customs_quantity": 2
}
],
"shipper": "TEST LABEL",
"ship_addr1": "5333 Zoo Dr",
"ship_city": "Los Angeles",
"ship_state": "CA",
"ship_code": "90027",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "John Doe",
"to_addr1": "73 Harbord Street",
"to_state": "ON",
"to_city": "Toronto",
"to_code": "M5S1G4",
"to_phone": "1231231234",
"to_country": "CA",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'Asendia',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'YOUR_ASENDIA_API_KEY',
'account_number' => 'YOUR_ASENDIA_ACCOUNT_NUMBER',
'username' => 'YOUR_ASENDIA_USERNAME',
'password' => 'YOUR_ASENDIA_PASSWORD',
'meter_number' => 'YOUR_ASENDIA_DATA_SOURCE',
'service' => 'A105',
'monetary_value' => 20.0,
'packages' =>
array (
0 =>
array (
'weight' => 2,
'length' => 5,
'width' => 5,
'height' => 5,
),
),
'customs' =>
array (
0 =>
array (
'invoice_line_part_number' => 'abc123',
'customs_description' => 'foo',
'invoice_line_value' => '10.00',
'customs_quantity' => 2,
),
),
'shipper' => 'TEST LABEL',
'ship_addr1' => '5333 Zoo Dr',
'ship_city' => 'Los Angeles',
'ship_state' => 'CA',
'ship_code' => '90027',
'ship_phone' => '1231231234',
'ship_country' => 'US',
'to_name' => 'John Doe',
'to_addr1' => '73 Harbord Street',
'to_state' => 'ON',
'to_city' => 'Toronto',
'to_code' => 'M5S1G4',
'to_phone' => '1231231234',
'to_country' => 'CA',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'Asendia',
'params': {'account_number': 'YOUR_ASENDIA_ACCOUNT_NUMBER',
'customs': [{'customs_description': 'foo',
'customs_quantity': 2,
'invoice_line_part_number': 'abc123',
'invoice_line_value': '10.00'}],
'key': 'YOUR_ASENDIA_API_KEY',
'meter_number': 'YOUR_ASENDIA_DATA_SOURCE',
'monetary_value': 20.0,
'packages': [{'height': 5, 'length': 5, 'weight': 2, 'width': 5}],
'password': 'YOUR_ASENDIA_PASSWORD',
'service': 'A105',
'ship_addr1': '5333 Zoo Dr',
'ship_city': 'Los Angeles',
'ship_code': '90027',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'CA',
'shipper': 'TEST LABEL',
'test': True,
'to_addr1': '73 Harbord Street',
'to_city': 'Toronto',
'to_code': 'M5S1G4',
'to_country': 'CA',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'ON',
'username': 'YOUR_ASENDIA_USERNAME'}}
)
rs.request(
{"carrier"=>"Asendia",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"YOUR_ASENDIA_API_KEY",
"account_number"=>"YOUR_ASENDIA_ACCOUNT_NUMBER",
"username"=>"YOUR_ASENDIA_USERNAME",
"password"=>"YOUR_ASENDIA_PASSWORD",
"meter_number"=>"YOUR_ASENDIA_DATA_SOURCE",
"service"=>"A105",
"monetary_value"=>20.0,
"packages"=>[{"weight"=>2, "length"=>5, "width"=>5, "height"=>5}],
"customs"=>
[{"invoice_line_part_number"=>"abc123",
"customs_description"=>"foo",
"invoice_line_value"=>"10.00",
"customs_quantity"=>2}],
"shipper"=>"TEST LABEL",
"ship_addr1"=>"5333 Zoo Dr",
"ship_city"=>"Los Angeles",
"ship_state"=>"CA",
"ship_code"=>"90027",
"ship_phone"=>"1231231234",
"ship_country"=>"US",
"to_name"=>"John Doe",
"to_addr1"=>"73 Harbord Street",
"to_state"=>"ON",
"to_city"=>"Toronto",
"to_code"=>"M5S1G4",
"to_phone"=>"1231231234",
"to_country"=>"CA",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "Asendia",
"action": "SubmitShipment",
"params": {
"key": "YOUR_ASENDIA_API_KEY",
"account_number": "YOUR_ASENDIA_ACCOUNT_NUMBER",
"username": "YOUR_ASENDIA_USERNAME",
"password": "YOUR_ASENDIA_PASSWORD",
"meter_number": "YOUR_ASENDIA_DATA_SOURCE",
"service": "A105",
"monetary_value": 20.00,
"packages": [
{
"weight": 2,
"length": 5,
"width": 5,
"height": 5
}
],
"customs": [
{
"invoice_line_part_number": "abc123",
"customs_description": "foo",
"invoice_line_value": "10.00",
"customs_quantity": 2
}
],
"shipper": "TEST LABEL",
"ship_addr1": "5333 Zoo Dr",
"ship_city": "Los Angeles",
"ship_state": "CA",
"ship_code": "90027",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "John Doe",
"to_addr1": "73 Harbord Street",
"to_state": "ON",
"to_city": "Toronto",
"to_code": "M5S1G4",
"to_phone": "1231231234",
"to_country": "CA",
"test": true
}
}
)
Asendia - Rates
{
"carrier": "asendia",
"action": "GetAllRates",
"params": {
"key": "YOUR_ASENDIA_API_KEY",
"account_number": "YOUR_ASENDIA_ACCOUNT_NUMBER",
"username": "YOUR_ASENDIA_USERNAME",
"password": "YOUR_ASENDIA_PASSWORD",
"meter_number": "YOUR_ASENDIA_DATA_SOURCE",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5
}
],
"ship_country": "US",
"to_country": "CA",
"to_code": "V4W1N7",
"weight_unit": "LBS",
"pickup_type": "01",
"length_unit": "IN",
"packaging_type": "02"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'asendia',
'action' => 'GetAllRates',
'params' =>
array (
'key' => 'YOUR_ASENDIA_API_KEY',
'account_number' => 'YOUR_ASENDIA_ACCOUNT_NUMBER',
'username' => 'YOUR_ASENDIA_USERNAME',
'password' => 'YOUR_ASENDIA_PASSWORD',
'meter_number' => 'YOUR_ASENDIA_DATA_SOURCE',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 5,
'width' => 5,
'height' => 5,
),
),
'ship_country' => 'US',
'to_country' => 'CA',
'to_code' => 'V4W1N7',
'weight_unit' => 'LBS',
'pickup_type' => '01',
'length_unit' => 'IN',
'packaging_type' => '02',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'asendia',
'params': {'account_number': 'YOUR_ASENDIA_ACCOUNT_NUMBER',
'key': 'YOUR_ASENDIA_API_KEY',
'length_unit': 'IN',
'meter_number': 'YOUR_ASENDIA_DATA_SOURCE',
'packages': [{'height': 5, 'length': 5, 'weight': 5, 'width': 5}],
'packaging_type': '02',
'password': 'YOUR_ASENDIA_PASSWORD',
'pickup_type': '01',
'ship_country': 'US',
'to_code': 'V4W1N7',
'to_country': 'CA',
'username': 'YOUR_ASENDIA_USERNAME',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"asendia",
"action"=>"GetAllRates",
"params"=>
{"key"=>"YOUR_ASENDIA_API_KEY",
"account_number"=>"YOUR_ASENDIA_ACCOUNT_NUMBER",
"username"=>"YOUR_ASENDIA_USERNAME",
"password"=>"YOUR_ASENDIA_PASSWORD",
"meter_number"=>"YOUR_ASENDIA_DATA_SOURCE",
"packages"=>[{"weight"=>5, "length"=>5, "width"=>5, "height"=>5}],
"ship_country"=>"US",
"to_country"=>"CA",
"to_code"=>"V4W1N7",
"weight_unit"=>"LBS",
"pickup_type"=>"01",
"length_unit"=>"IN",
"packaging_type"=>"02"}}
)
rocketshipit.request(
{
"carrier": "asendia",
"action": "GetAllRates",
"params": {
"key": "YOUR_ASENDIA_API_KEY",
"account_number": "YOUR_ASENDIA_ACCOUNT_NUMBER",
"username": "YOUR_ASENDIA_USERNAME",
"password": "YOUR_ASENDIA_PASSWORD",
"meter_number": "YOUR_ASENDIA_DATA_SOURCE",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5
}
],
"ship_country": "US",
"to_country": "CA",
"to_code": "V4W1N7",
"weight_unit": "LBS",
"pickup_type": "01",
"length_unit": "IN",
"packaging_type": "02"
}
}
)
Asendia - VoidShipment
{
"carrier": "Asendia",
"action": "VoidShipment",
"params": {
"key": "YOUR_ASENDIA_API_KEY",
"account_number": "YOUR_ASENDIA_ACCOUNT_NUMBER",
"username": "YOUR_ASENDIA_USERNAME",
"password": "YOUR_ASENDIA_PASSWORD",
"meter_number": "YOUR_ASENDIA_DATA_SOURCE",
"shipment_id": "123123",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'Asendia',
'action' => 'VoidShipment',
'params' =>
array (
'key' => 'YOUR_ASENDIA_API_KEY',
'account_number' => 'YOUR_ASENDIA_ACCOUNT_NUMBER',
'username' => 'YOUR_ASENDIA_USERNAME',
'password' => 'YOUR_ASENDIA_PASSWORD',
'meter_number' => 'YOUR_ASENDIA_DATA_SOURCE',
'shipment_id' => '123123',
'test' => true,
),
)
);
rs.request(
{'action': 'VoidShipment',
'carrier': 'Asendia',
'params': {'account_number': 'YOUR_ASENDIA_ACCOUNT_NUMBER',
'key': 'YOUR_ASENDIA_API_KEY',
'meter_number': 'YOUR_ASENDIA_DATA_SOURCE',
'password': 'YOUR_ASENDIA_PASSWORD',
'shipment_id': '123123',
'test': True,
'username': 'YOUR_ASENDIA_USERNAME'}}
)
rs.request(
{"carrier"=>"Asendia",
"action"=>"VoidShipment",
"params"=>
{"key"=>"YOUR_ASENDIA_API_KEY",
"account_number"=>"YOUR_ASENDIA_ACCOUNT_NUMBER",
"username"=>"YOUR_ASENDIA_USERNAME",
"password"=>"YOUR_ASENDIA_PASSWORD",
"meter_number"=>"YOUR_ASENDIA_DATA_SOURCE",
"shipment_id"=>"123123",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "Asendia",
"action": "VoidShipment",
"params": {
"key": "YOUR_ASENDIA_API_KEY",
"account_number": "YOUR_ASENDIA_ACCOUNT_NUMBER",
"username": "YOUR_ASENDIA_USERNAME",
"password": "YOUR_ASENDIA_PASSWORD",
"meter_number": "YOUR_ASENDIA_DATA_SOURCE",
"shipment_id": "123123",
"test": true
}
}
)
Batch Request - UPS, FedEx, USPS Rates
{
"batch": [
{
"request_id": "UPS Rates",
"request": {
"carrier": "UPS",
"action": "GetAllRates",
"params": {
"key": "YOUR_UPS_API_KEY",
"account_number": "YOUR_ACCOUNT_NUMBER",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_code": "90210",
"weight_unit": "LBS",
"pickup_type": "01",
"customer_classification": "01",
"length_unit": "IN",
"packaging_type": "02"
}
}
},
{
"request_id": "USPS Rates",
"request": {
"carrier": "USPS",
"action": "GetAllRates",
"params": {
"username": "YOUR_USERNAME",
"packages": [
{
"weight": 6
}
],
"ship_code": "59759",
"to_code": "90210"
}
}
},
{
"request_id": "FedEx Rates",
"request": {
"carrier": "FedEx",
"action": "GetAllRates",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 2
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_code": "90210",
"weight_unit": "LB",
"packaging_type": "YOUR_PACKAGING",
"dropoff_type": "REGULAR_PICKUP",
"test": true,
"negotiated_rates": true
}
}
}
]
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'batch' =>
array (
0 =>
array (
'request_id' => 'UPS Rates',
'request' =>
array (
'carrier' => 'UPS',
'action' => 'GetAllRates',
'params' =>
array (
'key' => 'YOUR_UPS_API_KEY',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 5,
'width' => 5,
'height' => 5,
),
),
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_country' => 'US',
'to_code' => '90210',
'weight_unit' => 'LBS',
'pickup_type' => '01',
'customer_classification' => '01',
'length_unit' => 'IN',
'packaging_type' => '02',
),
),
),
1 =>
array (
'request_id' => 'USPS Rates',
'request' =>
array (
'carrier' => 'USPS',
'action' => 'GetAllRates',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'packages' =>
array (
0 =>
array (
'weight' => 6,
),
),
'ship_code' => '59759',
'to_code' => '90210',
),
),
),
2 =>
array (
'request_id' => 'FedEx Rates',
'request' =>
array (
'carrier' => 'FedEx',
'action' => 'GetAllRates',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 2,
),
),
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_country' => 'US',
'to_code' => '90210',
'weight_unit' => 'LB',
'packaging_type' => 'YOUR_PACKAGING',
'dropoff_type' => 'REGULAR_PICKUP',
'test' => true,
'negotiated_rates' => true,
),
),
),
),
)
);
rs.request(
{'batch': [{'request': {'action': 'GetAllRates',
'carrier': 'UPS',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'customer_classification': '01',
'customs': [],
'key': 'YOUR_UPS_API_KEY',
'length_unit': 'IN',
'packages': [{'height': 5,
'length': 5,
'weight': 5,
'width': 5}],
'packaging_type': '02',
'password': 'YOUR_PASSWORD',
'pickup_type': '01',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'to_code': '90210',
'to_country': 'US',
'username': 'YOUR_USERNAME',
'weight_unit': 'LBS'}},
'request_id': 'UPS Rates'},
{'request': {'action': 'GetAllRates',
'carrier': 'USPS',
'params': {'packages': [{'weight': 6}],
'ship_code': '59759',
'to_code': '90210',
'username': 'YOUR_USERNAME'}},
'request_id': 'USPS Rates'},
{'request': {'action': 'GetAllRates',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'customs': [],
'dropoff_type': 'REGULAR_PICKUP',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'negotiated_rates': True,
'packages': [{'weight': 2}],
'packaging_type': 'YOUR_PACKAGING',
'password': 'YOUR_PASSWORD',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_code': '90210',
'to_country': 'US',
'weight_unit': 'LB'}},
'request_id': 'FedEx Rates'}]}
)
rs.request(
{"batch"=>
[{"request_id"=>"UPS Rates",
"request"=>
{"carrier"=>"UPS",
"action"=>"GetAllRates",
"params"=>
{"key"=>"YOUR_UPS_API_KEY",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"packages"=>[{"weight"=>5, "length"=>5, "width"=>5, "height"=>5}],
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_country"=>"US",
"to_code"=>"90210",
"weight_unit"=>"LBS",
"pickup_type"=>"01",
"customer_classification"=>"01",
"length_unit"=>"IN",
"packaging_type"=>"02"}}},
{"request_id"=>"USPS Rates",
"request"=>
{"carrier"=>"USPS",
"action"=>"GetAllRates",
"params"=>
{"username"=>"YOUR_USERNAME",
"packages"=>[{"weight"=>6}],
"ship_code"=>"59759",
"to_code"=>"90210"}}},
{"request_id"=>"FedEx Rates",
"request"=>
{"carrier"=>"FedEx",
"action"=>"GetAllRates",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"packages"=>[{"weight"=>2}],
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_country"=>"US",
"to_code"=>"90210",
"weight_unit"=>"LB",
"packaging_type"=>"YOUR_PACKAGING",
"dropoff_type"=>"REGULAR_PICKUP",
"test"=>true,
"negotiated_rates"=>true}}}]}
)
rocketshipit.request(
{
"batch": [
{
"request_id": "UPS Rates",
"request": {
"carrier": "UPS",
"action": "GetAllRates",
"params": {
"key": "YOUR_UPS_API_KEY",
"account_number": "YOUR_ACCOUNT_NUMBER",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_code": "90210",
"weight_unit": "LBS",
"pickup_type": "01",
"customer_classification": "01",
"length_unit": "IN",
"packaging_type": "02"
}
}
},
{
"request_id": "USPS Rates",
"request": {
"carrier": "USPS",
"action": "GetAllRates",
"params": {
"username": "YOUR_USERNAME",
"packages": [
{
"weight": 6
}
],
"ship_code": "59759",
"to_code": "90210"
}
}
},
{
"request_id": "FedEx Rates",
"request": {
"carrier": "FedEx",
"action": "GetAllRates",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 2
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_code": "90210",
"weight_unit": "LB",
"packaging_type": "YOUR_PACKAGING",
"dropoff_type": "REGULAR_PICKUP",
"test": true,
"negotiated_rates": true
}
}
}
]
}
)
CH Robinson - Authenticate
{
"carrier": "CHRobinson",
"action": "Authenticate",
"params": {
"client_id": "your-client-id",
"client_secret": "your-client-secret",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'CHRobinson',
'action' => 'Authenticate',
'params' =>
array (
'client_id' => 'your-client-id',
'client_secret' => 'your-client-secret',
'test' => true,
),
)
);
rs.request(
{'action': 'Authenticate',
'carrier': 'CHRobinson',
'params': {'client_id': 'your-client-id',
'client_secret': 'your-client-secret',
'test': True}}
)
rs.request(
{"carrier"=>"CHRobinson",
"action"=>"Authenticate",
"params"=>
{"client_id"=>"your-client-id",
"client_secret"=>"your-client-secret",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "CHRobinson",
"action": "Authenticate",
"params": {
"client_id": "your-client-id",
"client_secret": "your-client-secret",
"test": true
}
}
)
CH Robinson - LTL Freight Rates
{
"carrier": "CHRobinson",
"action": "GetAllRates",
"params": {
"key": "your-key-from-authenticate-request",
"ship_date": "2024-01-22",
"account_number": "1231234",
"test": true,
"packages": [
{
"weight": 200,
"freight_class": "50"
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "14800 Charlson Rd",
"ship_addr2": "Building 1",
"ship_city": "Eden Prairie",
"ship_state": "MN",
"ship_code": "55347",
"ship_country": "US",
"to_addr1": "800 Washington Avenue North",
"to_country": "US",
"to_city": "Minneapolis",
"to_state": "MN",
"to_code": "55401",
"weight_unit": "LB"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'CHRobinson',
'action' => 'GetAllRates',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'ship_date' => '2024-01-22',
'account_number' => '1231234',
'test' => true,
'packages' =>
array (
0 =>
array (
'weight' => 200,
'freight_class' => '50',
),
),
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '14800 Charlson Rd',
'ship_addr2' => 'Building 1',
'ship_city' => 'Eden Prairie',
'ship_state' => 'MN',
'ship_code' => '55347',
'ship_country' => 'US',
'to_addr1' => '800 Washington Avenue North',
'to_country' => 'US',
'to_city' => 'Minneapolis',
'to_state' => 'MN',
'to_code' => '55401',
'weight_unit' => 'LB',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'CHRobinson',
'params': {'account_number': '1231234',
'customs': [],
'key': 'your-key-from-authenticate-request',
'packages': [{'freight_class': '50', 'weight': 200}],
'ship_addr1': '14800 Charlson Rd',
'ship_addr2': 'Building 1',
'ship_city': 'Eden Prairie',
'ship_code': '55347',
'ship_country': 'US',
'ship_date': '2024-01-22',
'ship_state': 'MN',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '800 Washington Avenue North',
'to_city': 'Minneapolis',
'to_code': '55401',
'to_country': 'US',
'to_state': 'MN',
'weight_unit': 'LB'}}
)
rs.request(
{"carrier"=>"CHRobinson",
"action"=>"GetAllRates",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"ship_date"=>"2024-01-22",
"account_number"=>"1231234",
"test"=>true,
"packages"=>[{"weight"=>200, "freight_class"=>"50"}],
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"14800 Charlson Rd",
"ship_addr2"=>"Building 1",
"ship_city"=>"Eden Prairie",
"ship_state"=>"MN",
"ship_code"=>"55347",
"ship_country"=>"US",
"to_addr1"=>"800 Washington Avenue North",
"to_country"=>"US",
"to_city"=>"Minneapolis",
"to_state"=>"MN",
"to_code"=>"55401",
"weight_unit"=>"LB"}}
)
rocketshipit.request(
{
"carrier": "CHRobinson",
"action": "GetAllRates",
"params": {
"key": "your-key-from-authenticate-request",
"ship_date": "2024-01-22",
"account_number": "1231234",
"test": true,
"packages": [
{
"weight": 200,
"freight_class": "50"
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "14800 Charlson Rd",
"ship_addr2": "Building 1",
"ship_city": "Eden Prairie",
"ship_state": "MN",
"ship_code": "55347",
"ship_country": "US",
"to_addr1": "800 Washington Avenue North",
"to_country": "US",
"to_city": "Minneapolis",
"to_state": "MN",
"to_code": "55401",
"weight_unit": "LB"
}
}
)
CH Robinson - Tracking
{
"carrier": "CHRobinson",
"action": "Track",
"params": {
"key": "your-key-from-authenticate-request",
"tracking_number": "20015434520",
"account_number": "your-account-number",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'CHRobinson',
'action' => 'Track',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'tracking_number' => '20015434520',
'account_number' => 'your-account-number',
'test' => true,
),
)
);
rs.request(
{'action': 'Track',
'carrier': 'CHRobinson',
'params': {'account_number': 'your-account-number',
'key': 'your-key-from-authenticate-request',
'test': True,
'tracking_number': '20015434520'}}
)
rs.request(
{"carrier"=>"CHRobinson",
"action"=>"Track",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"tracking_number"=>"20015434520",
"account_number"=>"your-account-number",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "CHRobinson",
"action": "Track",
"params": {
"key": "your-key-from-authenticate-request",
"tracking_number": "20015434520",
"account_number": "your-account-number",
"test": true
}
}
)
Canada Post - Create Manifest
{
"carrier": "Canada",
"action": "CreateManifest",
"params": {
"contract_id": "42708517",
"username": "6e93d53968881714",
"password": "0bfa9fcb9853d1f51ee57a",
"account_number": "2004381",
"group_ids": [
"5432",
"1234"
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"ship_phone": "1231231234",
"ship_country": "CA",
"image_type": "PDF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'Canada',
'action' => 'CreateManifest',
'params' =>
array (
'contract_id' => '42708517',
'username' => '6e93d53968881714',
'password' => '0bfa9fcb9853d1f51ee57a',
'account_number' => '2004381',
'group_ids' =>
array (
0 => '5432',
1 => '1234',
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Ottawa',
'ship_state' => 'ON',
'ship_code' => 'K1A0B1',
'ship_phone' => '1231231234',
'ship_country' => 'CA',
'image_type' => 'PDF',
'test' => true,
),
)
);
rs.request(
{'action': 'CreateManifest',
'carrier': 'Canada',
'params': {'account_number': '2004381',
'contract_id': '42708517',
'group_ids': ['5432', '1234'],
'image_type': 'PDF',
'password': '0bfa9fcb9853d1f51ee57a',
'ship_addr1': '123 Main St',
'ship_city': 'Ottawa',
'ship_code': 'K1A0B1',
'ship_country': 'CA',
'ship_phone': '1231231234',
'ship_state': 'ON',
'shipper': 'RocketShipIt',
'test': True,
'username': '6e93d53968881714'}}
)
rs.request(
{"carrier"=>"Canada",
"action"=>"CreateManifest",
"params"=>
{"contract_id"=>"42708517",
"username"=>"6e93d53968881714",
"password"=>"0bfa9fcb9853d1f51ee57a",
"account_number"=>"2004381",
"group_ids"=>["5432", "1234"],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Ottawa",
"ship_state"=>"ON",
"ship_code"=>"K1A0B1",
"ship_phone"=>"1231231234",
"ship_country"=>"CA",
"image_type"=>"PDF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "Canada",
"action": "CreateManifest",
"params": {
"contract_id": "42708517",
"username": "6e93d53968881714",
"password": "0bfa9fcb9853d1f51ee57a",
"account_number": "2004381",
"group_ids": [
"5432",
"1234"
],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"ship_phone": "1231231234",
"ship_country": "CA",
"image_type": "PDF",
"test": true
}
}
)
Canada Post - Label
{
"carrier": "canada",
"action": "SubmitShipment",
"params": {
"packages": [
{
"weight": 4,
"length": 7,
"width": 5,
"height": 5
}
],
"service": "DOM.EP",
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "John Doe",
"to_addr1": "361A Old Finch Avenue",
"to_addr2": "#103",
"to_state": "ON",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_country": "CA",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'canada',
'action' => 'SubmitShipment',
'params' =>
array (
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'width' => 5,
'height' => 5,
),
),
'service' => 'DOM.EP',
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Ottawa',
'ship_state' => 'ON',
'ship_code' => 'K1A0B1',
'ship_phone' => '1231231234',
'ship_country' => 'US',
'to_name' => 'John Doe',
'to_addr1' => '361A Old Finch Avenue',
'to_addr2' => '#103',
'to_state' => 'ON',
'to_city' => 'Toronto',
'to_code' => 'M1B5K7',
'to_country' => 'CA',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'canada',
'params': {'packages': [{'height': 5, 'length': 7, 'weight': 4, 'width': 5}],
'service': 'DOM.EP',
'ship_addr1': '123 Main St',
'ship_city': 'Ottawa',
'ship_code': 'K1A0B1',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'ON',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '361A Old Finch Avenue',
'to_addr2': '#103',
'to_city': 'Toronto',
'to_code': 'M1B5K7',
'to_country': 'CA',
'to_name': 'John Doe',
'to_state': 'ON'}}
)
rs.request(
{"carrier"=>"canada",
"action"=>"SubmitShipment",
"params"=>
{"packages"=>[{"weight"=>4, "length"=>7, "width"=>5, "height"=>5}],
"service"=>"DOM.EP",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Ottawa",
"ship_state"=>"ON",
"ship_code"=>"K1A0B1",
"ship_phone"=>"1231231234",
"ship_country"=>"US",
"to_name"=>"John Doe",
"to_addr1"=>"361A Old Finch Avenue",
"to_addr2"=>"#103",
"to_state"=>"ON",
"to_city"=>"Toronto",
"to_code"=>"M1B5K7",
"to_country"=>"CA",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "canada",
"action": "SubmitShipment",
"params": {
"packages": [
{
"weight": 4,
"length": 7,
"width": 5,
"height": 5
}
],
"service": "DOM.EP",
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "John Doe",
"to_addr1": "361A Old Finch Avenue",
"to_addr2": "#103",
"to_state": "ON",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_country": "CA",
"test": true
}
}
)
Canada Post - Label International
{
"carrier": "canada",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_NUMBER",
"test": true,
"reason_for_export": "SOG",
"customs": [
{
"customs_description": "books",
"customs_weight": 4,
"customs_quantity": 2,
"customs_line_amount": 10.00,
"customs_quantity_units": "EA"
}
],
"packages": [
{
"weight": 30,
"length": 7,
"width": 5,
"height": 5
}
],
"service": "USA.EP",
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"ship_phone": "1231231234",
"ship_country": "CA",
"to_phone": "123-123-1234",
"to_name": "John Doe",
"to_addr1": "940 Presidio Ave",
"to_addr2": "103",
"to_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'canada',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'test' => true,
'reason_for_export' => 'SOG',
'customs' =>
array (
0 =>
array (
'customs_description' => 'books',
'customs_weight' => 4,
'customs_quantity' => 2,
'customs_line_amount' => 10.0,
'customs_quantity_units' => 'EA',
),
),
'packages' =>
array (
0 =>
array (
'weight' => 30,
'length' => 7,
'width' => 5,
'height' => 5,
),
),
'service' => 'USA.EP',
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Ottawa',
'ship_state' => 'ON',
'ship_code' => 'K1A0B1',
'ship_phone' => '1231231234',
'ship_country' => 'CA',
'to_phone' => '123-123-1234',
'to_name' => 'John Doe',
'to_addr1' => '940 Presidio Ave',
'to_addr2' => '103',
'to_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'canada',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'customs': [{'customs_description': 'books',
'customs_line_amount': 10.0,
'customs_quantity': 2,
'customs_quantity_units': 'EA',
'customs_weight': 4}],
'packages': [{'height': 5, 'length': 7, 'weight': 30, 'width': 5}],
'password': 'YOUR_PASSWORD',
'reason_for_export': 'SOG',
'service': 'USA.EP',
'ship_addr1': '123 Main St',
'ship_city': 'Ottawa',
'ship_code': 'K1A0B1',
'ship_country': 'CA',
'ship_phone': '1231231234',
'ship_state': 'ON',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '940 Presidio Ave',
'to_addr2': '103',
'to_city': 'San Francisco',
'to_code': '94115',
'to_country': 'US',
'to_name': 'John Doe',
'to_phone': '123-123-1234',
'to_state': 'CA',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"canada",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"test"=>true,
"reason_for_export"=>"SOG",
"customs"=>
[{"customs_description"=>"books",
"customs_weight"=>4,
"customs_quantity"=>2,
"customs_line_amount"=>10.0,
"customs_quantity_units"=>"EA"}],
"packages"=>[{"weight"=>30, "length"=>7, "width"=>5, "height"=>5}],
"service"=>"USA.EP",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Ottawa",
"ship_state"=>"ON",
"ship_code"=>"K1A0B1",
"ship_phone"=>"1231231234",
"ship_country"=>"CA",
"to_phone"=>"123-123-1234",
"to_name"=>"John Doe",
"to_addr1"=>"940 Presidio Ave",
"to_addr2"=>"103",
"to_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US"}}
)
rocketshipit.request(
{
"carrier": "canada",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_NUMBER",
"test": true,
"reason_for_export": "SOG",
"customs": [
{
"customs_description": "books",
"customs_weight": 4,
"customs_quantity": 2,
"customs_line_amount": 10.00,
"customs_quantity_units": "EA"
}
],
"packages": [
{
"weight": 30,
"length": 7,
"width": 5,
"height": 5
}
],
"service": "USA.EP",
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"ship_phone": "1231231234",
"ship_country": "CA",
"to_phone": "123-123-1234",
"to_name": "John Doe",
"to_addr1": "940 Presidio Ave",
"to_addr2": "103",
"to_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US"
}
}
)
Canada Post - Label Return
{
"carrier": "Canada",
"action": "SubmitShipment",
"params": {
"username": "YOUR_URSERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_NUMBER",
"return_code": "PRINT_RETURN_LABEL",
"service": "DOM.EP",
"packages": [
{
"weight": 2
}
],
"ship_name": "Jane Doe Returner",
"shipper": "Capsule Corp.",
"ship_addr1": "2701 Return Avenue",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"ship_country": "CA",
"to_name": "John Doe",
"to_company": "Receiver of Return",
"to_addr1": "2701 Riverside Drive",
"to_state": "ON",
"to_city": "Ottawa",
"to_code": "K1A0B1",
"to_country": "CA",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'Canada',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_URSERNAME',
'password' => 'YOUR_PASSWORD',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'return_code' => 'PRINT_RETURN_LABEL',
'service' => 'DOM.EP',
'packages' =>
array (
0 =>
array (
'weight' => 2,
),
),
'ship_name' => 'Jane Doe Returner',
'shipper' => 'Capsule Corp.',
'ship_addr1' => '2701 Return Avenue',
'ship_city' => 'Ottawa',
'ship_state' => 'ON',
'ship_code' => 'K1A0B1',
'ship_country' => 'CA',
'to_name' => 'John Doe',
'to_company' => 'Receiver of Return',
'to_addr1' => '2701 Riverside Drive',
'to_state' => 'ON',
'to_city' => 'Ottawa',
'to_code' => 'K1A0B1',
'to_country' => 'CA',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'Canada',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'packages': [{'weight': 2}],
'password': 'YOUR_PASSWORD',
'return_code': 'PRINT_RETURN_LABEL',
'service': 'DOM.EP',
'ship_addr1': '2701 Return Avenue',
'ship_city': 'Ottawa',
'ship_code': 'K1A0B1',
'ship_country': 'CA',
'ship_name': 'Jane Doe Returner',
'ship_state': 'ON',
'shipper': 'Capsule Corp.',
'test': True,
'to_addr1': '2701 Riverside Drive',
'to_city': 'Ottawa',
'to_code': 'K1A0B1',
'to_company': 'Receiver of Return',
'to_country': 'CA',
'to_name': 'John Doe',
'to_state': 'ON',
'username': 'YOUR_URSERNAME'}}
)
rs.request(
{"carrier"=>"Canada",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_URSERNAME",
"password"=>"YOUR_PASSWORD",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"return_code"=>"PRINT_RETURN_LABEL",
"service"=>"DOM.EP",
"packages"=>[{"weight"=>2}],
"ship_name"=>"Jane Doe Returner",
"shipper"=>"Capsule Corp.",
"ship_addr1"=>"2701 Return Avenue",
"ship_city"=>"Ottawa",
"ship_state"=>"ON",
"ship_code"=>"K1A0B1",
"ship_country"=>"CA",
"to_name"=>"John Doe",
"to_company"=>"Receiver of Return",
"to_addr1"=>"2701 Riverside Drive",
"to_state"=>"ON",
"to_city"=>"Ottawa",
"to_code"=>"K1A0B1",
"to_country"=>"CA",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "Canada",
"action": "SubmitShipment",
"params": {
"username": "YOUR_URSERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_NUMBER",
"return_code": "PRINT_RETURN_LABEL",
"service": "DOM.EP",
"packages": [
{
"weight": 2
}
],
"ship_name": "Jane Doe Returner",
"shipper": "Capsule Corp.",
"ship_addr1": "2701 Return Avenue",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"ship_country": "CA",
"to_name": "John Doe",
"to_company": "Receiver of Return",
"to_addr1": "2701 Riverside Drive",
"to_state": "ON",
"to_city": "Ottawa",
"to_code": "K1A0B1",
"to_country": "CA",
"test": true
}
}
)
Canada Post - Label Return with Reference
{
"carrier": "Canada",
"action": "SubmitShipment",
"params": {
"username": "YOUR_URSERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_NUMBER",
"return_code": "PRINT_RETURN_LABEL",
"service": "DOM.EP",
"packages": [
{
"weight": 2,
"reference_value": "my reference value",
"reference_value2": "another reference"
}
],
"ship_name": "Jane Doe Returner",
"shipper": "Capsule Corp.",
"ship_addr1": "2701 Return Avenue",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"ship_country": "CA",
"to_name": "John Doe",
"to_company": "Receiver of Return",
"to_addr1": "2701 Riverside Drive",
"to_state": "ON",
"to_city": "Ottawa",
"to_code": "K1A0B1",
"to_country": "CA",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'Canada',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_URSERNAME',
'password' => 'YOUR_PASSWORD',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'return_code' => 'PRINT_RETURN_LABEL',
'service' => 'DOM.EP',
'packages' =>
array (
0 =>
array (
'weight' => 2,
'reference_value' => 'my reference value',
'reference_value2' => 'another reference',
),
),
'ship_name' => 'Jane Doe Returner',
'shipper' => 'Capsule Corp.',
'ship_addr1' => '2701 Return Avenue',
'ship_city' => 'Ottawa',
'ship_state' => 'ON',
'ship_code' => 'K1A0B1',
'ship_country' => 'CA',
'to_name' => 'John Doe',
'to_company' => 'Receiver of Return',
'to_addr1' => '2701 Riverside Drive',
'to_state' => 'ON',
'to_city' => 'Ottawa',
'to_code' => 'K1A0B1',
'to_country' => 'CA',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'Canada',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'packages': [{'reference_value': 'my reference value',
'reference_value2': 'another reference',
'weight': 2}],
'password': 'YOUR_PASSWORD',
'return_code': 'PRINT_RETURN_LABEL',
'service': 'DOM.EP',
'ship_addr1': '2701 Return Avenue',
'ship_city': 'Ottawa',
'ship_code': 'K1A0B1',
'ship_country': 'CA',
'ship_name': 'Jane Doe Returner',
'ship_state': 'ON',
'shipper': 'Capsule Corp.',
'test': True,
'to_addr1': '2701 Riverside Drive',
'to_city': 'Ottawa',
'to_code': 'K1A0B1',
'to_company': 'Receiver of Return',
'to_country': 'CA',
'to_name': 'John Doe',
'to_state': 'ON',
'username': 'YOUR_URSERNAME'}}
)
rs.request(
{"carrier"=>"Canada",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_URSERNAME",
"password"=>"YOUR_PASSWORD",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"return_code"=>"PRINT_RETURN_LABEL",
"service"=>"DOM.EP",
"packages"=>
[{"weight"=>2,
"reference_value"=>"my reference value",
"reference_value2"=>"another reference"}],
"ship_name"=>"Jane Doe Returner",
"shipper"=>"Capsule Corp.",
"ship_addr1"=>"2701 Return Avenue",
"ship_city"=>"Ottawa",
"ship_state"=>"ON",
"ship_code"=>"K1A0B1",
"ship_country"=>"CA",
"to_name"=>"John Doe",
"to_company"=>"Receiver of Return",
"to_addr1"=>"2701 Riverside Drive",
"to_state"=>"ON",
"to_city"=>"Ottawa",
"to_code"=>"K1A0B1",
"to_country"=>"CA",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "Canada",
"action": "SubmitShipment",
"params": {
"username": "YOUR_URSERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_NUMBER",
"return_code": "PRINT_RETURN_LABEL",
"service": "DOM.EP",
"packages": [
{
"weight": 2,
"reference_value": "my reference value",
"reference_value2": "another reference"
}
],
"ship_name": "Jane Doe Returner",
"shipper": "Capsule Corp.",
"ship_addr1": "2701 Return Avenue",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"ship_country": "CA",
"to_name": "John Doe",
"to_company": "Receiver of Return",
"to_addr1": "2701 Riverside Drive",
"to_state": "ON",
"to_city": "Ottawa",
"to_code": "K1A0B1",
"to_country": "CA",
"test": true
}
}
)
Canada Post - Label Third Party Billing
{
"carrier": "canada",
"action": "SubmitShipment",
"params": {
"contract_id": "42708517",
"username": "6e93d53968881714",
"password": "0bfa9fcb9853d1f51ee57a",
"account_number": "2004381",
"billing": [
{
"type": "transportation",
"payment_type": "third_party",
"account": "1234567"
}
],
"packages": [
{
"weight": 4,
"length": 7,
"width": 5,
"height": 5
}
],
"service": "DOM.EP",
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"ship_phone": "1231231234",
"ship_country": "CA",
"to_name": "John Doe",
"to_addr1": "361A Old Finch Avenue",
"to_addr2": "#103",
"to_state": "ON",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_country": "CA",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'canada',
'action' => 'SubmitShipment',
'params' =>
array (
'contract_id' => '42708517',
'username' => '6e93d53968881714',
'password' => '0bfa9fcb9853d1f51ee57a',
'account_number' => '2004381',
'billing' =>
array (
0 =>
array (
'type' => 'transportation',
'payment_type' => 'third_party',
'account' => '1234567',
),
),
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'width' => 5,
'height' => 5,
),
),
'service' => 'DOM.EP',
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Ottawa',
'ship_state' => 'ON',
'ship_code' => 'K1A0B1',
'ship_phone' => '1231231234',
'ship_country' => 'CA',
'to_name' => 'John Doe',
'to_addr1' => '361A Old Finch Avenue',
'to_addr2' => '#103',
'to_state' => 'ON',
'to_city' => 'Toronto',
'to_code' => 'M1B5K7',
'to_country' => 'CA',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'canada',
'params': {'account_number': '2004381',
'billing': [{'account': '1234567',
'payment_type': 'third_party',
'type': 'transportation'}],
'contract_id': '42708517',
'packages': [{'height': 5, 'length': 7, 'weight': 4, 'width': 5}],
'password': '0bfa9fcb9853d1f51ee57a',
'service': 'DOM.EP',
'ship_addr1': '123 Main St',
'ship_city': 'Ottawa',
'ship_code': 'K1A0B1',
'ship_country': 'CA',
'ship_phone': '1231231234',
'ship_state': 'ON',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '361A Old Finch Avenue',
'to_addr2': '#103',
'to_city': 'Toronto',
'to_code': 'M1B5K7',
'to_country': 'CA',
'to_name': 'John Doe',
'to_state': 'ON',
'username': '6e93d53968881714'}}
)
rs.request(
{"carrier"=>"canada",
"action"=>"SubmitShipment",
"params"=>
{"contract_id"=>"42708517",
"username"=>"6e93d53968881714",
"password"=>"0bfa9fcb9853d1f51ee57a",
"account_number"=>"2004381",
"billing"=>
[{"type"=>"transportation",
"payment_type"=>"third_party",
"account"=>"1234567"}],
"packages"=>[{"weight"=>4, "length"=>7, "width"=>5, "height"=>5}],
"service"=>"DOM.EP",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Ottawa",
"ship_state"=>"ON",
"ship_code"=>"K1A0B1",
"ship_phone"=>"1231231234",
"ship_country"=>"CA",
"to_name"=>"John Doe",
"to_addr1"=>"361A Old Finch Avenue",
"to_addr2"=>"#103",
"to_state"=>"ON",
"to_city"=>"Toronto",
"to_code"=>"M1B5K7",
"to_country"=>"CA",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "canada",
"action": "SubmitShipment",
"params": {
"contract_id": "42708517",
"username": "6e93d53968881714",
"password": "0bfa9fcb9853d1f51ee57a",
"account_number": "2004381",
"billing": [
{
"type": "transportation",
"payment_type": "third_party",
"account": "1234567"
}
],
"packages": [
{
"weight": 4,
"length": 7,
"width": 5,
"height": 5
}
],
"service": "DOM.EP",
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"ship_phone": "1231231234",
"ship_country": "CA",
"to_name": "John Doe",
"to_addr1": "361A Old Finch Avenue",
"to_addr2": "#103",
"to_state": "ON",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_country": "CA",
"test": true
}
}
)
Canada Post - Label with Contract 19+ Signature Required
{
"carrier": "canada",
"action": "SubmitShipment",
"params": {
"addons": [
"PA19"
],
"contract_id": "42708517",
"username": "6e93d53968881714",
"password": "0bfa9fcb9853d1f51ee57a",
"account_number": "2004381",
"packages": [
{
"weight": 4,
"length": 7,
"width": 5,
"height": 5,
"signature_type": "DIRECT"
}
],
"service": "DOM.EP",
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"ship_phone": "1231231234",
"ship_country": "CA",
"to_name": "John Doe",
"to_addr1": "361A Old Finch Avenue",
"to_addr2": "#103",
"to_state": "ON",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_country": "CA",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'canada',
'action' => 'SubmitShipment',
'params' =>
array (
'addons' =>
array (
0 => 'PA19',
),
'contract_id' => '42708517',
'username' => '6e93d53968881714',
'password' => '0bfa9fcb9853d1f51ee57a',
'account_number' => '2004381',
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'width' => 5,
'height' => 5,
'signature_type' => 'DIRECT',
),
),
'service' => 'DOM.EP',
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Ottawa',
'ship_state' => 'ON',
'ship_code' => 'K1A0B1',
'ship_phone' => '1231231234',
'ship_country' => 'CA',
'to_name' => 'John Doe',
'to_addr1' => '361A Old Finch Avenue',
'to_addr2' => '#103',
'to_state' => 'ON',
'to_city' => 'Toronto',
'to_code' => 'M1B5K7',
'to_country' => 'CA',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'canada',
'params': {'account_number': '2004381',
'addons': ['PA19'],
'contract_id': '42708517',
'packages': [{'height': 5,
'length': 7,
'signature_type': 'DIRECT',
'weight': 4,
'width': 5}],
'password': '0bfa9fcb9853d1f51ee57a',
'service': 'DOM.EP',
'ship_addr1': '123 Main St',
'ship_city': 'Ottawa',
'ship_code': 'K1A0B1',
'ship_country': 'CA',
'ship_phone': '1231231234',
'ship_state': 'ON',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '361A Old Finch Avenue',
'to_addr2': '#103',
'to_city': 'Toronto',
'to_code': 'M1B5K7',
'to_country': 'CA',
'to_name': 'John Doe',
'to_state': 'ON',
'username': '6e93d53968881714'}}
)
rs.request(
{"carrier"=>"canada",
"action"=>"SubmitShipment",
"params"=>
{"addons"=>["PA19"],
"contract_id"=>"42708517",
"username"=>"6e93d53968881714",
"password"=>"0bfa9fcb9853d1f51ee57a",
"account_number"=>"2004381",
"packages"=>
[{"weight"=>4,
"length"=>7,
"width"=>5,
"height"=>5,
"signature_type"=>"DIRECT"}],
"service"=>"DOM.EP",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Ottawa",
"ship_state"=>"ON",
"ship_code"=>"K1A0B1",
"ship_phone"=>"1231231234",
"ship_country"=>"CA",
"to_name"=>"John Doe",
"to_addr1"=>"361A Old Finch Avenue",
"to_addr2"=>"#103",
"to_state"=>"ON",
"to_city"=>"Toronto",
"to_code"=>"M1B5K7",
"to_country"=>"CA",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "canada",
"action": "SubmitShipment",
"params": {
"addons": [
"PA19"
],
"contract_id": "42708517",
"username": "6e93d53968881714",
"password": "0bfa9fcb9853d1f51ee57a",
"account_number": "2004381",
"packages": [
{
"weight": 4,
"length": 7,
"width": 5,
"height": 5,
"signature_type": "DIRECT"
}
],
"service": "DOM.EP",
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"ship_phone": "1231231234",
"ship_country": "CA",
"to_name": "John Doe",
"to_addr1": "361A Old Finch Avenue",
"to_addr2": "#103",
"to_state": "ON",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_country": "CA",
"test": true
}
}
)
Canada Post - Label with Contract Signature Required
{
"carrier": "canada",
"action": "SubmitShipment",
"params": {
"contract_id": "42708517",
"username": "6e93d53968881714",
"password": "0bfa9fcb9853d1f51ee57a",
"account_number": "2004381",
"packages": [
{
"weight": 4,
"length": 7,
"width": 5,
"height": 5,
"signature_type": "DIRECT"
}
],
"service": "DOM.EP",
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"ship_phone": "1231231234",
"ship_country": "CA",
"to_name": "John Doe",
"to_addr1": "361A Old Finch Avenue",
"to_addr2": "#103",
"to_state": "ON",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_country": "CA",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'canada',
'action' => 'SubmitShipment',
'params' =>
array (
'contract_id' => '42708517',
'username' => '6e93d53968881714',
'password' => '0bfa9fcb9853d1f51ee57a',
'account_number' => '2004381',
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'width' => 5,
'height' => 5,
'signature_type' => 'DIRECT',
),
),
'service' => 'DOM.EP',
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Ottawa',
'ship_state' => 'ON',
'ship_code' => 'K1A0B1',
'ship_phone' => '1231231234',
'ship_country' => 'CA',
'to_name' => 'John Doe',
'to_addr1' => '361A Old Finch Avenue',
'to_addr2' => '#103',
'to_state' => 'ON',
'to_city' => 'Toronto',
'to_code' => 'M1B5K7',
'to_country' => 'CA',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'canada',
'params': {'account_number': '2004381',
'contract_id': '42708517',
'packages': [{'height': 5,
'length': 7,
'signature_type': 'DIRECT',
'weight': 4,
'width': 5}],
'password': '0bfa9fcb9853d1f51ee57a',
'service': 'DOM.EP',
'ship_addr1': '123 Main St',
'ship_city': 'Ottawa',
'ship_code': 'K1A0B1',
'ship_country': 'CA',
'ship_phone': '1231231234',
'ship_state': 'ON',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '361A Old Finch Avenue',
'to_addr2': '#103',
'to_city': 'Toronto',
'to_code': 'M1B5K7',
'to_country': 'CA',
'to_name': 'John Doe',
'to_state': 'ON',
'username': '6e93d53968881714'}}
)
rs.request(
{"carrier"=>"canada",
"action"=>"SubmitShipment",
"params"=>
{"contract_id"=>"42708517",
"username"=>"6e93d53968881714",
"password"=>"0bfa9fcb9853d1f51ee57a",
"account_number"=>"2004381",
"packages"=>
[{"weight"=>4,
"length"=>7,
"width"=>5,
"height"=>5,
"signature_type"=>"DIRECT"}],
"service"=>"DOM.EP",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Ottawa",
"ship_state"=>"ON",
"ship_code"=>"K1A0B1",
"ship_phone"=>"1231231234",
"ship_country"=>"CA",
"to_name"=>"John Doe",
"to_addr1"=>"361A Old Finch Avenue",
"to_addr2"=>"#103",
"to_state"=>"ON",
"to_city"=>"Toronto",
"to_code"=>"M1B5K7",
"to_country"=>"CA",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "canada",
"action": "SubmitShipment",
"params": {
"contract_id": "42708517",
"username": "6e93d53968881714",
"password": "0bfa9fcb9853d1f51ee57a",
"account_number": "2004381",
"packages": [
{
"weight": 4,
"length": 7,
"width": 5,
"height": 5,
"signature_type": "DIRECT"
}
],
"service": "DOM.EP",
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"ship_phone": "1231231234",
"ship_country": "CA",
"to_name": "John Doe",
"to_addr1": "361A Old Finch Avenue",
"to_addr2": "#103",
"to_state": "ON",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_country": "CA",
"test": true
}
}
)
Canada Post - Label with contract
{
"carrier": "canada",
"action": "SubmitShipment",
"params": {
"contract_id": "42708517",
"username": "6e93d53968881714",
"password": "0bfa9fcb9853d1f51ee57a",
"account_number": "2004381",
"packages": [
{
"weight": 4,
"length": 7,
"width": 5,
"height": 5
}
],
"service": "DOM.EP",
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"ship_phone": "1231231234",
"ship_country": "CA",
"to_name": "John Doe",
"to_addr1": "361A Old Finch Avenue",
"to_addr2": "#103",
"to_state": "ON",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_country": "CA",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'canada',
'action' => 'SubmitShipment',
'params' =>
array (
'contract_id' => '42708517',
'username' => '6e93d53968881714',
'password' => '0bfa9fcb9853d1f51ee57a',
'account_number' => '2004381',
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'width' => 5,
'height' => 5,
),
),
'service' => 'DOM.EP',
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Ottawa',
'ship_state' => 'ON',
'ship_code' => 'K1A0B1',
'ship_phone' => '1231231234',
'ship_country' => 'CA',
'to_name' => 'John Doe',
'to_addr1' => '361A Old Finch Avenue',
'to_addr2' => '#103',
'to_state' => 'ON',
'to_city' => 'Toronto',
'to_code' => 'M1B5K7',
'to_country' => 'CA',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'canada',
'params': {'account_number': '2004381',
'contract_id': '42708517',
'packages': [{'height': 5, 'length': 7, 'weight': 4, 'width': 5}],
'password': '0bfa9fcb9853d1f51ee57a',
'service': 'DOM.EP',
'ship_addr1': '123 Main St',
'ship_city': 'Ottawa',
'ship_code': 'K1A0B1',
'ship_country': 'CA',
'ship_phone': '1231231234',
'ship_state': 'ON',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '361A Old Finch Avenue',
'to_addr2': '#103',
'to_city': 'Toronto',
'to_code': 'M1B5K7',
'to_country': 'CA',
'to_name': 'John Doe',
'to_state': 'ON',
'username': '6e93d53968881714'}}
)
rs.request(
{"carrier"=>"canada",
"action"=>"SubmitShipment",
"params"=>
{"contract_id"=>"42708517",
"username"=>"6e93d53968881714",
"password"=>"0bfa9fcb9853d1f51ee57a",
"account_number"=>"2004381",
"packages"=>[{"weight"=>4, "length"=>7, "width"=>5, "height"=>5}],
"service"=>"DOM.EP",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Ottawa",
"ship_state"=>"ON",
"ship_code"=>"K1A0B1",
"ship_phone"=>"1231231234",
"ship_country"=>"CA",
"to_name"=>"John Doe",
"to_addr1"=>"361A Old Finch Avenue",
"to_addr2"=>"#103",
"to_state"=>"ON",
"to_city"=>"Toronto",
"to_code"=>"M1B5K7",
"to_country"=>"CA",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "canada",
"action": "SubmitShipment",
"params": {
"contract_id": "42708517",
"username": "6e93d53968881714",
"password": "0bfa9fcb9853d1f51ee57a",
"account_number": "2004381",
"packages": [
{
"weight": 4,
"length": 7,
"width": 5,
"height": 5
}
],
"service": "DOM.EP",
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"ship_phone": "1231231234",
"ship_country": "CA",
"to_name": "John Doe",
"to_addr1": "361A Old Finch Avenue",
"to_addr2": "#103",
"to_state": "ON",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_country": "CA",
"test": true
}
}
)
Canada Post - Label with contract (ZPL)
{
"carrier": "canada",
"action": "SubmitShipment",
"params": {
"contract_id": "42708517",
"username": "6e93d53968881714",
"password": "0bfa9fcb9853d1f51ee57a",
"account_number": "2004381",
"image_type": "ZPL",
"packages": [
{
"weight": 4,
"length": 7,
"width": 5,
"height": 5
}
],
"service": "DOM.EP",
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"ship_phone": "1231231234",
"ship_country": "CA",
"to_name": "John Doe",
"to_addr1": "361A Old Finch Avenue",
"to_addr2": "#103",
"to_state": "ON",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_country": "CA",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'canada',
'action' => 'SubmitShipment',
'params' =>
array (
'contract_id' => '42708517',
'username' => '6e93d53968881714',
'password' => '0bfa9fcb9853d1f51ee57a',
'account_number' => '2004381',
'image_type' => 'ZPL',
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'width' => 5,
'height' => 5,
),
),
'service' => 'DOM.EP',
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Ottawa',
'ship_state' => 'ON',
'ship_code' => 'K1A0B1',
'ship_phone' => '1231231234',
'ship_country' => 'CA',
'to_name' => 'John Doe',
'to_addr1' => '361A Old Finch Avenue',
'to_addr2' => '#103',
'to_state' => 'ON',
'to_city' => 'Toronto',
'to_code' => 'M1B5K7',
'to_country' => 'CA',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'canada',
'params': {'account_number': '2004381',
'contract_id': '42708517',
'image_type': 'ZPL',
'packages': [{'height': 5, 'length': 7, 'weight': 4, 'width': 5}],
'password': '0bfa9fcb9853d1f51ee57a',
'service': 'DOM.EP',
'ship_addr1': '123 Main St',
'ship_city': 'Ottawa',
'ship_code': 'K1A0B1',
'ship_country': 'CA',
'ship_phone': '1231231234',
'ship_state': 'ON',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '361A Old Finch Avenue',
'to_addr2': '#103',
'to_city': 'Toronto',
'to_code': 'M1B5K7',
'to_country': 'CA',
'to_name': 'John Doe',
'to_state': 'ON',
'username': '6e93d53968881714'}}
)
rs.request(
{"carrier"=>"canada",
"action"=>"SubmitShipment",
"params"=>
{"contract_id"=>"42708517",
"username"=>"6e93d53968881714",
"password"=>"0bfa9fcb9853d1f51ee57a",
"account_number"=>"2004381",
"image_type"=>"ZPL",
"packages"=>[{"weight"=>4, "length"=>7, "width"=>5, "height"=>5}],
"service"=>"DOM.EP",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Ottawa",
"ship_state"=>"ON",
"ship_code"=>"K1A0B1",
"ship_phone"=>"1231231234",
"ship_country"=>"CA",
"to_name"=>"John Doe",
"to_addr1"=>"361A Old Finch Avenue",
"to_addr2"=>"#103",
"to_state"=>"ON",
"to_city"=>"Toronto",
"to_code"=>"M1B5K7",
"to_country"=>"CA",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "canada",
"action": "SubmitShipment",
"params": {
"contract_id": "42708517",
"username": "6e93d53968881714",
"password": "0bfa9fcb9853d1f51ee57a",
"account_number": "2004381",
"image_type": "ZPL",
"packages": [
{
"weight": 4,
"length": 7,
"width": 5,
"height": 5
}
],
"service": "DOM.EP",
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Ottawa",
"ship_state": "ON",
"ship_code": "K1A0B1",
"ship_phone": "1231231234",
"ship_country": "CA",
"to_name": "John Doe",
"to_addr1": "361A Old Finch Avenue",
"to_addr2": "#103",
"to_state": "ON",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_country": "CA",
"test": true
}
}
)
Canada Post - Pickup Cancel
{
"carrier": "Canada",
"action": "CancelPickup",
"params": {
"pickup_id": "00110215",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'Canada',
'action' => 'CancelPickup',
'params' =>
array (
'pickup_id' => '00110215',
'test' => true,
),
)
);
rs.request(
{'action': 'CancelPickup',
'carrier': 'Canada',
'params': {'pickup_id': '00110215', 'test': True}}
)
rs.request(
{"carrier"=>"Canada",
"action"=>"CancelPickup",
"params"=>{"pickup_id"=>"00110215", "test"=>true}}
)
rocketshipit.request(
{
"carrier": "Canada",
"action": "CancelPickup",
"params": {
"pickup_id": "00110215",
"test": true
}
}
)
Canada Post - Pickup Schedule
{
"carrier": "Canada",
"action": "CreatePickup",
"params": {
"contract_id": "YOUR CONTRACT ID",
"pickup_company_name": "Acme Inc",
"pickup_contact_name": "Mark Sanborn",
"pickup_addr1": "123 Main St",
"pickup_city": "Vancouver",
"pickup_state": "BC",
"pickup_code": "V4W1N7",
"pickup_country": "US",
"pickup_phone": "123-123-1234",
"pickup_email": "john.doe@example.com",
"pickup_quantity": 1,
"pickup_date": "2019-06-20",
"close_time": "17:00",
"ready_time": "15:00",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'Canada',
'action' => 'CreatePickup',
'params' =>
array (
'contract_id' => 'YOUR CONTRACT ID',
'pickup_company_name' => 'Acme Inc',
'pickup_contact_name' => 'Mark Sanborn',
'pickup_addr1' => '123 Main St',
'pickup_city' => 'Vancouver',
'pickup_state' => 'BC',
'pickup_code' => 'V4W1N7',
'pickup_country' => 'US',
'pickup_phone' => '123-123-1234',
'pickup_email' => 'john.doe@example.com',
'pickup_quantity' => 1,
'pickup_date' => '2019-06-20',
'close_time' => '17:00',
'ready_time' => '15:00',
'test' => true,
),
)
);
rs.request(
{'action': 'CreatePickup',
'carrier': 'Canada',
'params': {'close_time': '17:00',
'contract_id': 'YOUR CONTRACT ID',
'pickup_addr1': '123 Main St',
'pickup_city': 'Vancouver',
'pickup_code': 'V4W1N7',
'pickup_company_name': 'Acme Inc',
'pickup_contact_name': 'Mark Sanborn',
'pickup_country': 'US',
'pickup_date': '2019-06-20',
'pickup_email': 'john.doe@example.com',
'pickup_phone': '123-123-1234',
'pickup_quantity': 1,
'pickup_state': 'BC',
'ready_time': '15:00',
'test': True}}
)
rs.request(
{"carrier"=>"Canada",
"action"=>"CreatePickup",
"params"=>
{"contract_id"=>"YOUR CONTRACT ID",
"pickup_company_name"=>"Acme Inc",
"pickup_contact_name"=>"Mark Sanborn",
"pickup_addr1"=>"123 Main St",
"pickup_city"=>"Vancouver",
"pickup_state"=>"BC",
"pickup_code"=>"V4W1N7",
"pickup_country"=>"US",
"pickup_phone"=>"123-123-1234",
"pickup_email"=>"john.doe@example.com",
"pickup_quantity"=>1,
"pickup_date"=>"2019-06-20",
"close_time"=>"17:00",
"ready_time"=>"15:00",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "Canada",
"action": "CreatePickup",
"params": {
"contract_id": "YOUR CONTRACT ID",
"pickup_company_name": "Acme Inc",
"pickup_contact_name": "Mark Sanborn",
"pickup_addr1": "123 Main St",
"pickup_city": "Vancouver",
"pickup_state": "BC",
"pickup_code": "V4W1N7",
"pickup_country": "US",
"pickup_phone": "123-123-1234",
"pickup_email": "john.doe@example.com",
"pickup_quantity": 1,
"pickup_date": "2019-06-20",
"close_time": "17:00",
"ready_time": "15:00",
"test": true
}
}
)
Canada Post - Pickup Status
{
"carrier": "Canada",
"action": "PickupStatus",
"params": {
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'Canada',
'action' => 'PickupStatus',
'params' =>
array (
'test' => true,
),
)
);
rs.request(
{'action': 'PickupStatus', 'carrier': 'Canada', 'params': {'test': True}}
)
rs.request(
{"carrier"=>"Canada", "action"=>"PickupStatus", "params"=>{"test"=>true}}
)
rocketshipit.request(
{
"carrier": "Canada",
"action": "PickupStatus",
"params": {
"test": true
}
}
)
Canada Post - Rate Domestic
{
"carrier": "canada",
"action": "GetAllRates",
"params": {
"test": true,
"packages": [
{
"weight": 2,
"length": 6,
"width": 16,
"height": 26
}
],
"customs": [],
"shipper": "John Doe",
"ship_state": "BC",
"ship_code": "V7A4M1",
"ship_country": "CA",
"to_state": "ON",
"to_code": "L3R9W6",
"to_country": "CA",
"weight_unit": "KG",
"length_unit": "CM"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'canada',
'action' => 'GetAllRates',
'params' =>
array (
'test' => true,
'packages' =>
array (
0 =>
array (
'weight' => 2,
'length' => 6,
'width' => 16,
'height' => 26,
),
),
'customs' =>
array (
),
'shipper' => 'John Doe',
'ship_state' => 'BC',
'ship_code' => 'V7A4M1',
'ship_country' => 'CA',
'to_state' => 'ON',
'to_code' => 'L3R9W6',
'to_country' => 'CA',
'weight_unit' => 'KG',
'length_unit' => 'CM',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'canada',
'params': {'customs': [],
'length_unit': 'CM',
'packages': [{'height': 26, 'length': 6, 'weight': 2, 'width': 16}],
'ship_code': 'V7A4M1',
'ship_country': 'CA',
'ship_state': 'BC',
'shipper': 'John Doe',
'test': True,
'to_code': 'L3R9W6',
'to_country': 'CA',
'to_state': 'ON',
'weight_unit': 'KG'}}
)
rs.request(
{"carrier"=>"canada",
"action"=>"GetAllRates",
"params"=>
{"test"=>true,
"packages"=>[{"weight"=>2, "length"=>6, "width"=>16, "height"=>26}],
"customs"=>[],
"shipper"=>"John Doe",
"ship_state"=>"BC",
"ship_code"=>"V7A4M1",
"ship_country"=>"CA",
"to_state"=>"ON",
"to_code"=>"L3R9W6",
"to_country"=>"CA",
"weight_unit"=>"KG",
"length_unit"=>"CM"}}
)
rocketshipit.request(
{
"carrier": "canada",
"action": "GetAllRates",
"params": {
"test": true,
"packages": [
{
"weight": 2,
"length": 6,
"width": 16,
"height": 26
}
],
"customs": [],
"shipper": "John Doe",
"ship_state": "BC",
"ship_code": "V7A4M1",
"ship_country": "CA",
"to_state": "ON",
"to_code": "L3R9W6",
"to_country": "CA",
"weight_unit": "KG",
"length_unit": "CM"
}
}
)
Canada Post - Rates
{
"carrier": "canada",
"action": "GetAllRates",
"params": {
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5
}
],
"customs": [],
"ship_city": "BELLEVILLE",
"ship_code": "K8N5W6",
"to_country": "US",
"to_code": "90210"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'canada',
'action' => 'GetAllRates',
'params' =>
array (
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 5,
'width' => 5,
'height' => 5,
),
),
'customs' =>
array (
),
'ship_city' => 'BELLEVILLE',
'ship_code' => 'K8N5W6',
'to_country' => 'US',
'to_code' => '90210',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'canada',
'params': {'customs': [],
'packages': [{'height': 5, 'length': 5, 'weight': 5, 'width': 5}],
'ship_city': 'BELLEVILLE',
'ship_code': 'K8N5W6',
'to_code': '90210',
'to_country': 'US'}}
)
rs.request(
{"carrier"=>"canada",
"action"=>"GetAllRates",
"params"=>
{"packages"=>[{"weight"=>5, "length"=>5, "width"=>5, "height"=>5}],
"customs"=>[],
"ship_city"=>"BELLEVILLE",
"ship_code"=>"K8N5W6",
"to_country"=>"US",
"to_code"=>"90210"}}
)
rocketshipit.request(
{
"carrier": "canada",
"action": "GetAllRates",
"params": {
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5
}
],
"customs": [],
"ship_city": "BELLEVILLE",
"ship_code": "K8N5W6",
"to_country": "US",
"to_code": "90210"
}
}
)
Canada Post - Rates Insurance
{
"carrier": "canada",
"action": "GetAllRates",
"params": {
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5,
"insured_value": 700
}
],
"customs": [],
"ship_city": "BELLEVILLE",
"ship_code": "K8N5W6",
"to_country": "US",
"to_code": "90210"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'canada',
'action' => 'GetAllRates',
'params' =>
array (
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 5,
'width' => 5,
'height' => 5,
'insured_value' => 700,
),
),
'customs' =>
array (
),
'ship_city' => 'BELLEVILLE',
'ship_code' => 'K8N5W6',
'to_country' => 'US',
'to_code' => '90210',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'canada',
'params': {'customs': [],
'packages': [{'height': 5,
'insured_value': 700,
'length': 5,
'weight': 5,
'width': 5}],
'ship_city': 'BELLEVILLE',
'ship_code': 'K8N5W6',
'to_code': '90210',
'to_country': 'US'}}
)
rs.request(
{"carrier"=>"canada",
"action"=>"GetAllRates",
"params"=>
{"packages"=>
[{"weight"=>5,
"length"=>5,
"width"=>5,
"height"=>5,
"insured_value"=>700}],
"customs"=>[],
"ship_city"=>"BELLEVILLE",
"ship_code"=>"K8N5W6",
"to_country"=>"US",
"to_code"=>"90210"}}
)
rocketshipit.request(
{
"carrier": "canada",
"action": "GetAllRates",
"params": {
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5,
"insured_value": 700
}
],
"customs": [],
"ship_city": "BELLEVILLE",
"ship_code": "K8N5W6",
"to_country": "US",
"to_code": "90210"
}
}
)
Canada Post - Tracking
{
"carrier": "canada",
"action": "track",
"params": {
"username": "YOUR_URSERNAME",
"password": "YOUR_PASSWORD",
"tracking_number": "1371134583769923",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'canada',
'action' => 'track',
'params' =>
array (
'username' => 'YOUR_URSERNAME',
'password' => 'YOUR_PASSWORD',
'tracking_number' => '1371134583769923',
'test' => true,
),
)
);
rs.request(
{'action': 'track',
'carrier': 'canada',
'params': {'password': 'YOUR_PASSWORD',
'test': True,
'tracking_number': '1371134583769923',
'username': 'YOUR_URSERNAME'}}
)
rs.request(
{"carrier"=>"canada",
"action"=>"track",
"params"=>
{"username"=>"YOUR_URSERNAME",
"password"=>"YOUR_PASSWORD",
"tracking_number"=>"1371134583769923",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "canada",
"action": "track",
"params": {
"username": "YOUR_URSERNAME",
"password": "YOUR_PASSWORD",
"tracking_number": "1371134583769923",
"test": true
}
}
)
Canada Post - Void
{
"carrier": "canada",
"action": "VoidShipment",
"params": {
"username": "YOUR_URSERNAME",
"password": "YOUR_PASSWORD",
"shipment_id": "GT12345678RT",
"ship_email": "me@mycompany.com",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'canada',
'action' => 'VoidShipment',
'params' =>
array (
'username' => 'YOUR_URSERNAME',
'password' => 'YOUR_PASSWORD',
'shipment_id' => 'GT12345678RT',
'ship_email' => 'me@mycompany.com',
'test' => true,
),
)
);
rs.request(
{'action': 'VoidShipment',
'carrier': 'canada',
'params': {'password': 'YOUR_PASSWORD',
'ship_email': 'me@mycompany.com',
'shipment_id': 'GT12345678RT',
'test': True,
'username': 'YOUR_URSERNAME'}}
)
rs.request(
{"carrier"=>"canada",
"action"=>"VoidShipment",
"params"=>
{"username"=>"YOUR_URSERNAME",
"password"=>"YOUR_PASSWORD",
"shipment_id"=>"GT12345678RT",
"ship_email"=>"me@mycompany.com",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "canada",
"action": "VoidShipment",
"params": {
"username": "YOUR_URSERNAME",
"password": "YOUR_PASSWORD",
"shipment_id": "GT12345678RT",
"ship_email": "me@mycompany.com",
"test": true
}
}
)
DHL - CreateManifest GlobalMail
{
"carrier": "dhl-globalmail",
"action": "CreateManifest",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_CLIENT_ID",
"pickup_location": "5300000",
"shipment_ids": [
"99999999999999999999999999999"
]
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'dhl-globalmail',
'action' => 'CreateManifest',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'key' => 'YOUR_CLIENT_ID',
'pickup_location' => '5300000',
'shipment_ids' =>
array (
0 => '99999999999999999999999999999',
),
),
)
);
rs.request(
{'action': 'CreateManifest',
'carrier': 'dhl-globalmail',
'params': {'key': 'YOUR_CLIENT_ID',
'password': 'YOUR_PASSWORD',
'pickup_location': '5300000',
'shipment_ids': ['99999999999999999999999999999'],
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"dhl-globalmail",
"action"=>"CreateManifest",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"key"=>"YOUR_CLIENT_ID",
"pickup_location"=>"5300000",
"shipment_ids"=>["99999999999999999999999999999"]}}
)
rocketshipit.request(
{
"carrier": "dhl-globalmail",
"action": "CreateManifest",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_CLIENT_ID",
"pickup_location": "5300000",
"shipment_ids": [
"99999999999999999999999999999"
]
}
}
)
DHL - GlobalMail International
{
"carrier": "DHL-GlobalMail",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_CLIENT_ID",
"service": "22",
"account_number": "5337502",
"packages": [
{
"weight": 0.3
}
],
"shipper": "Mr. Returns",
"ship_addr1": "5048 264 St",
"ship_city": "Aldergrove",
"ship_state": "BC",
"ship_code": "V4W1N7",
"ship_phone": "123-123-1234",
"to_name": "Joe Bloggs",
"to_addr1": "1234 Main Street",
"to_state": "GA",
"to_city": "Anytown",
"to_code": "30297",
"to_phone": "123-123-1234",
"customs_value": 10
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL-GlobalMail',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'key' => 'YOUR_CLIENT_ID',
'service' => '22',
'account_number' => '5337502',
'packages' =>
array (
0 =>
array (
'weight' => 0.3,
),
),
'shipper' => 'Mr. Returns',
'ship_addr1' => '5048 264 St',
'ship_city' => 'Aldergrove',
'ship_state' => 'BC',
'ship_code' => 'V4W1N7',
'ship_phone' => '123-123-1234',
'to_name' => 'Joe Bloggs',
'to_addr1' => '1234 Main Street',
'to_state' => 'GA',
'to_city' => 'Anytown',
'to_code' => '30297',
'to_phone' => '123-123-1234',
'customs_value' => 10,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'DHL-GlobalMail',
'params': {'account_number': '5337502',
'customs_value': 10,
'key': 'YOUR_CLIENT_ID',
'packages': [{'weight': 0.3}],
'password': 'YOUR_PASSWORD',
'service': '22',
'ship_addr1': '5048 264 St',
'ship_city': 'Aldergrove',
'ship_code': 'V4W1N7',
'ship_phone': '123-123-1234',
'ship_state': 'BC',
'shipper': 'Mr. Returns',
'to_addr1': '1234 Main Street',
'to_city': 'Anytown',
'to_code': '30297',
'to_name': 'Joe Bloggs',
'to_phone': '123-123-1234',
'to_state': 'GA',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"DHL-GlobalMail",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"key"=>"YOUR_CLIENT_ID",
"service"=>"22",
"account_number"=>"5337502",
"packages"=>[{"weight"=>0.3}],
"shipper"=>"Mr. Returns",
"ship_addr1"=>"5048 264 St",
"ship_city"=>"Aldergrove",
"ship_state"=>"BC",
"ship_code"=>"V4W1N7",
"ship_phone"=>"123-123-1234",
"to_name"=>"Joe Bloggs",
"to_addr1"=>"1234 Main Street",
"to_state"=>"GA",
"to_city"=>"Anytown",
"to_code"=>"30297",
"to_phone"=>"123-123-1234",
"customs_value"=>10}}
)
rocketshipit.request(
{
"carrier": "DHL-GlobalMail",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"key": "YOUR_CLIENT_ID",
"service": "22",
"account_number": "5337502",
"packages": [
{
"weight": 0.3
}
],
"shipper": "Mr. Returns",
"ship_addr1": "5048 264 St",
"ship_city": "Aldergrove",
"ship_state": "BC",
"ship_code": "V4W1N7",
"ship_phone": "123-123-1234",
"to_name": "Joe Bloggs",
"to_addr1": "1234 Main Street",
"to_state": "GA",
"to_city": "Anytown",
"to_code": "30297",
"to_phone": "123-123-1234",
"customs_value": 10
}
}
)
DHL - Label
{
"carrier": "DHL",
"action": "SubmitShipment",
"params": {
"account_number": "803921577",
"packages": [
{
"weight": 4,
"length": 7,
"width": 4,
"height": 4
}
],
"service": "N",
"shipper": "RocketShipIt",
"ship_addr1": "1401 Park Ave",
"ship_city": "Emeryville",
"ship_state": "CA",
"ship_code": "94608",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "John Doe",
"to_addr1": "940 Presidio Ave",
"to_addr2": "#103",
"to_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PDF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL',
'action' => 'SubmitShipment',
'params' =>
array (
'account_number' => '803921577',
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'width' => 4,
'height' => 4,
),
),
'service' => 'N',
'shipper' => 'RocketShipIt',
'ship_addr1' => '1401 Park Ave',
'ship_city' => 'Emeryville',
'ship_state' => 'CA',
'ship_code' => '94608',
'ship_phone' => '1231231234',
'ship_country' => 'US',
'to_name' => 'John Doe',
'to_addr1' => '940 Presidio Ave',
'to_addr2' => '#103',
'to_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'PDF',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'DHL',
'params': {'account_number': '803921577',
'image_type': 'PDF',
'packages': [{'height': 4, 'length': 7, 'weight': 4, 'width': 4}],
'service': 'N',
'ship_addr1': '1401 Park Ave',
'ship_city': 'Emeryville',
'ship_code': '94608',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'CA',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '940 Presidio Ave',
'to_addr2': '#103',
'to_city': 'San Francisco',
'to_code': '94115',
'to_country': 'US',
'to_name': 'John Doe',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"DHL",
"action"=>"SubmitShipment",
"params"=>
{"account_number"=>"803921577",
"packages"=>[{"weight"=>4, "length"=>7, "width"=>4, "height"=>4}],
"service"=>"N",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"1401 Park Ave",
"ship_city"=>"Emeryville",
"ship_state"=>"CA",
"ship_code"=>"94608",
"ship_phone"=>"1231231234",
"ship_country"=>"US",
"to_name"=>"John Doe",
"to_addr1"=>"940 Presidio Ave",
"to_addr2"=>"#103",
"to_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"PDF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "DHL",
"action": "SubmitShipment",
"params": {
"account_number": "803921577",
"packages": [
{
"weight": 4,
"length": 7,
"width": 4,
"height": 4
}
],
"service": "N",
"shipper": "RocketShipIt",
"ship_addr1": "1401 Park Ave",
"ship_city": "Emeryville",
"ship_state": "CA",
"ship_code": "94608",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "John Doe",
"to_addr1": "940 Presidio Ave",
"to_addr2": "#103",
"to_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PDF",
"test": true
}
}
)
DHL - Label Email Notifications
{
"carrier": "DHL",
"action": "SubmitShipment",
"params": {
"account_number": "803921577",
"notify": [
{
"email": "customer@email.com"
}
],
"packages": [
{
"weight": 4,
"length": 7,
"width": 4,
"height": 4
}
],
"service": "D",
"shipper": "RocketShipIt",
"ship_addr1": "1401 Park Ave",
"ship_city": "Emeryville",
"ship_state": "CA",
"ship_code": "94608",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "John Doe",
"to_addr1": "940 Presidio Ave",
"to_addr2": "#103",
"to_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PDF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL',
'action' => 'SubmitShipment',
'params' =>
array (
'account_number' => '803921577',
'notify' =>
array (
0 =>
array (
'email' => 'customer@email.com',
),
),
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'width' => 4,
'height' => 4,
),
),
'service' => 'D',
'shipper' => 'RocketShipIt',
'ship_addr1' => '1401 Park Ave',
'ship_city' => 'Emeryville',
'ship_state' => 'CA',
'ship_code' => '94608',
'ship_phone' => '1231231234',
'ship_country' => 'US',
'to_name' => 'John Doe',
'to_addr1' => '940 Presidio Ave',
'to_addr2' => '#103',
'to_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'PDF',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'DHL',
'params': {'account_number': '803921577',
'image_type': 'PDF',
'notify': [{'email': 'customer@email.com'}],
'packages': [{'height': 4, 'length': 7, 'weight': 4, 'width': 4}],
'service': 'D',
'ship_addr1': '1401 Park Ave',
'ship_city': 'Emeryville',
'ship_code': '94608',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'CA',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '940 Presidio Ave',
'to_addr2': '#103',
'to_city': 'San Francisco',
'to_code': '94115',
'to_country': 'US',
'to_name': 'John Doe',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"DHL",
"action"=>"SubmitShipment",
"params"=>
{"account_number"=>"803921577",
"notify"=>[{"email"=>"customer@email.com"}],
"packages"=>[{"weight"=>4, "length"=>7, "width"=>4, "height"=>4}],
"service"=>"D",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"1401 Park Ave",
"ship_city"=>"Emeryville",
"ship_state"=>"CA",
"ship_code"=>"94608",
"ship_phone"=>"1231231234",
"ship_country"=>"US",
"to_name"=>"John Doe",
"to_addr1"=>"940 Presidio Ave",
"to_addr2"=>"#103",
"to_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"PDF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "DHL",
"action": "SubmitShipment",
"params": {
"account_number": "803921577",
"notify": [
{
"email": "customer@email.com"
}
],
"packages": [
{
"weight": 4,
"length": 7,
"width": 4,
"height": 4
}
],
"service": "D",
"shipper": "RocketShipIt",
"ship_addr1": "1401 Park Ave",
"ship_city": "Emeryville",
"ship_state": "CA",
"ship_code": "94608",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "John Doe",
"to_addr1": "940 Presidio Ave",
"to_addr2": "#103",
"to_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PDF",
"test": true
}
}
)
DHL - Label GlobalMail
{
"carrier": "DHL-GlobalMail",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_PICKUP_ID",
"key": "YOUR_CLIENT_ID",
"service": "81",
"packages": [
{
"weight": 0.3
}
],
"shipper": "Mr. Returns",
"ship_addr1": "1500 South Point Dr.",
"ship_city": "Forrest Park",
"ship_state": "GA",
"ship_code": "30297",
"ship_phone": "123-123-1234",
"to_name": "Joe Bloggs",
"to_addr1": "1234 Main Street",
"to_state": "GA",
"to_city": "Anytown",
"to_code": "30297",
"to_phone": "123-123-1234"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL-GlobalMail',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'account_number' => 'YOUR_ACCOUNT_PICKUP_ID',
'key' => 'YOUR_CLIENT_ID',
'service' => '81',
'packages' =>
array (
0 =>
array (
'weight' => 0.3,
),
),
'shipper' => 'Mr. Returns',
'ship_addr1' => '1500 South Point Dr.',
'ship_city' => 'Forrest Park',
'ship_state' => 'GA',
'ship_code' => '30297',
'ship_phone' => '123-123-1234',
'to_name' => 'Joe Bloggs',
'to_addr1' => '1234 Main Street',
'to_state' => 'GA',
'to_city' => 'Anytown',
'to_code' => '30297',
'to_phone' => '123-123-1234',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'DHL-GlobalMail',
'params': {'account_number': 'YOUR_ACCOUNT_PICKUP_ID',
'key': 'YOUR_CLIENT_ID',
'packages': [{'weight': 0.3}],
'password': 'YOUR_PASSWORD',
'service': '81',
'ship_addr1': '1500 South Point Dr.',
'ship_city': 'Forrest Park',
'ship_code': '30297',
'ship_phone': '123-123-1234',
'ship_state': 'GA',
'shipper': 'Mr. Returns',
'to_addr1': '1234 Main Street',
'to_city': 'Anytown',
'to_code': '30297',
'to_name': 'Joe Bloggs',
'to_phone': '123-123-1234',
'to_state': 'GA',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"DHL-GlobalMail",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"account_number"=>"YOUR_ACCOUNT_PICKUP_ID",
"key"=>"YOUR_CLIENT_ID",
"service"=>"81",
"packages"=>[{"weight"=>0.3}],
"shipper"=>"Mr. Returns",
"ship_addr1"=>"1500 South Point Dr.",
"ship_city"=>"Forrest Park",
"ship_state"=>"GA",
"ship_code"=>"30297",
"ship_phone"=>"123-123-1234",
"to_name"=>"Joe Bloggs",
"to_addr1"=>"1234 Main Street",
"to_state"=>"GA",
"to_city"=>"Anytown",
"to_code"=>"30297",
"to_phone"=>"123-123-1234"}}
)
rocketshipit.request(
{
"carrier": "DHL-GlobalMail",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_PICKUP_ID",
"key": "YOUR_CLIENT_ID",
"service": "81",
"packages": [
{
"weight": 0.3
}
],
"shipper": "Mr. Returns",
"ship_addr1": "1500 South Point Dr.",
"ship_city": "Forrest Park",
"ship_state": "GA",
"ship_code": "30297",
"ship_phone": "123-123-1234",
"to_name": "Joe Bloggs",
"to_addr1": "1234 Main Street",
"to_state": "GA",
"to_city": "Anytown",
"to_code": "30297",
"to_phone": "123-123-1234"
}
}
)
DHL - Label International
{
"carrier": "DHL",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_NUMBER",
"shipment_description": "Fashion goods",
"customs_value": 45.99,
"currency": "EUR",
"trade_terms": "DAP",
"packages": [
{
"weight": 5,
"length": 6,
"width": 7,
"height": 8,
"reference_value": "asdf"
}
],
"shipper": "RocketShipIt",
"ship_addr1": "5684 Bay St",
"ship_city": "Emeryville",
"ship_state": "CA",
"ship_code": "94608",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "Toronto Zoo",
"to_addr1": "2000 Meadowvale Road",
"to_state": "MB",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_phone": "1231231234",
"to_country": "CA",
"test": true,
"service": "P"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'shipment_description' => 'Fashion goods',
'customs_value' => 45.99,
'currency' => 'EUR',
'trade_terms' => 'DAP',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 6,
'width' => 7,
'height' => 8,
'reference_value' => 'asdf',
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '5684 Bay St',
'ship_city' => 'Emeryville',
'ship_state' => 'CA',
'ship_code' => '94608',
'ship_phone' => '1231231234',
'ship_country' => 'US',
'to_name' => 'Toronto Zoo',
'to_addr1' => '2000 Meadowvale Road',
'to_state' => 'MB',
'to_city' => 'Toronto',
'to_code' => 'M1B5K7',
'to_phone' => '1231231234',
'to_country' => 'CA',
'test' => true,
'service' => 'P',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'DHL',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'currency': 'EUR',
'customs_value': 45.99,
'packages': [{'height': 8,
'length': 6,
'reference_value': 'asdf',
'weight': 5,
'width': 7}],
'password': 'YOUR_PASSWORD',
'service': 'P',
'ship_addr1': '5684 Bay St',
'ship_city': 'Emeryville',
'ship_code': '94608',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'CA',
'shipment_description': 'Fashion goods',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '2000 Meadowvale Road',
'to_city': 'Toronto',
'to_code': 'M1B5K7',
'to_country': 'CA',
'to_name': 'Toronto Zoo',
'to_phone': '1231231234',
'to_state': 'MB',
'trade_terms': 'DAP',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"DHL",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"shipment_description"=>"Fashion goods",
"customs_value"=>45.99,
"currency"=>"EUR",
"trade_terms"=>"DAP",
"packages"=>
[{"weight"=>5,
"length"=>6,
"width"=>7,
"height"=>8,
"reference_value"=>"asdf"}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"5684 Bay St",
"ship_city"=>"Emeryville",
"ship_state"=>"CA",
"ship_code"=>"94608",
"ship_phone"=>"1231231234",
"ship_country"=>"US",
"to_name"=>"Toronto Zoo",
"to_addr1"=>"2000 Meadowvale Road",
"to_state"=>"MB",
"to_city"=>"Toronto",
"to_code"=>"M1B5K7",
"to_phone"=>"1231231234",
"to_country"=>"CA",
"test"=>true,
"service"=>"P"}}
)
rocketshipit.request(
{
"carrier": "DHL",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_NUMBER",
"shipment_description": "Fashion goods",
"customs_value": 45.99,
"currency": "EUR",
"trade_terms": "DAP",
"packages": [
{
"weight": 5,
"length": 6,
"width": 7,
"height": 8,
"reference_value": "asdf"
}
],
"shipper": "RocketShipIt",
"ship_addr1": "5684 Bay St",
"ship_city": "Emeryville",
"ship_state": "CA",
"ship_code": "94608",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "Toronto Zoo",
"to_addr1": "2000 Meadowvale Road",
"to_state": "MB",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_phone": "1231231234",
"to_country": "CA",
"test": true,
"service": "P"
}
}
)
DHL - Label International CI
{
"carrier": "DHL",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_NUMBER",
"customs_forms": "CMI",
"invoice": "123",
"invoice_date": "2019-03-19",
"shipment_description": "Fashion goods",
"customs_value": 45.99,
"currency": "EUR",
"trade_terms": "DAP",
"packages": [
{
"weight": 5,
"length": 6,
"width": 7,
"height": 8
}
],
"shipper": "RocketShipIt",
"ship_addr1": "5684 Bay St",
"ship_city": "Emeryville",
"ship_state": "CA",
"ship_code": "94608",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "Toronto Zoo",
"to_addr1": "2000 Meadowvale Road",
"to_state": "MB",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_phone": "1231231234",
"to_country": "CA",
"test": true,
"service": "P",
"reference_value": "asdf",
"customs": [
{
"commodity_code": "cc",
"commodity_name": "cn",
"invoice_line_number": "1",
"invoice_line_part_number": "123",
"invoice_line_description": "My Description",
"customs_line_amount": 45.99,
"customs_origin_country": "CA",
"customs_quantity_units": "EA",
"customs_quantity": 1,
"customs_weight": 10
}
]
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'customs_forms' => 'CMI',
'invoice' => '123',
'invoice_date' => '2019-03-19',
'shipment_description' => 'Fashion goods',
'customs_value' => 45.99,
'currency' => 'EUR',
'trade_terms' => 'DAP',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 6,
'width' => 7,
'height' => 8,
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '5684 Bay St',
'ship_city' => 'Emeryville',
'ship_state' => 'CA',
'ship_code' => '94608',
'ship_phone' => '1231231234',
'ship_country' => 'US',
'to_name' => 'Toronto Zoo',
'to_addr1' => '2000 Meadowvale Road',
'to_state' => 'MB',
'to_city' => 'Toronto',
'to_code' => 'M1B5K7',
'to_phone' => '1231231234',
'to_country' => 'CA',
'test' => true,
'service' => 'P',
'reference_value' => 'asdf',
'customs' =>
array (
0 =>
array (
'commodity_code' => 'cc',
'commodity_name' => 'cn',
'invoice_line_number' => '1',
'invoice_line_part_number' => '123',
'invoice_line_description' => 'My Description',
'customs_line_amount' => 45.99,
'customs_origin_country' => 'CA',
'customs_quantity_units' => 'EA',
'customs_quantity' => 1,
'customs_weight' => 10,
),
),
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'DHL',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'currency': 'EUR',
'customs': [{'commodity_code': 'cc',
'commodity_name': 'cn',
'customs_line_amount': 45.99,
'customs_origin_country': 'CA',
'customs_quantity': 1,
'customs_quantity_units': 'EA',
'customs_weight': 10,
'invoice_line_description': 'My Description',
'invoice_line_number': '1',
'invoice_line_part_number': '123'}],
'customs_forms': 'CMI',
'customs_value': 45.99,
'invoice': '123',
'invoice_date': '2019-03-19',
'packages': [{'height': 8, 'length': 6, 'weight': 5, 'width': 7}],
'password': 'YOUR_PASSWORD',
'reference_value': 'asdf',
'service': 'P',
'ship_addr1': '5684 Bay St',
'ship_city': 'Emeryville',
'ship_code': '94608',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'CA',
'shipment_description': 'Fashion goods',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '2000 Meadowvale Road',
'to_city': 'Toronto',
'to_code': 'M1B5K7',
'to_country': 'CA',
'to_name': 'Toronto Zoo',
'to_phone': '1231231234',
'to_state': 'MB',
'trade_terms': 'DAP',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"DHL",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"customs_forms"=>"CMI",
"invoice"=>"123",
"invoice_date"=>"2019-03-19",
"shipment_description"=>"Fashion goods",
"customs_value"=>45.99,
"currency"=>"EUR",
"trade_terms"=>"DAP",
"packages"=>[{"weight"=>5, "length"=>6, "width"=>7, "height"=>8}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"5684 Bay St",
"ship_city"=>"Emeryville",
"ship_state"=>"CA",
"ship_code"=>"94608",
"ship_phone"=>"1231231234",
"ship_country"=>"US",
"to_name"=>"Toronto Zoo",
"to_addr1"=>"2000 Meadowvale Road",
"to_state"=>"MB",
"to_city"=>"Toronto",
"to_code"=>"M1B5K7",
"to_phone"=>"1231231234",
"to_country"=>"CA",
"test"=>true,
"service"=>"P",
"reference_value"=>"asdf",
"customs"=>
[{"commodity_code"=>"cc",
"commodity_name"=>"cn",
"invoice_line_number"=>"1",
"invoice_line_part_number"=>"123",
"invoice_line_description"=>"My Description",
"customs_line_amount"=>45.99,
"customs_origin_country"=>"CA",
"customs_quantity_units"=>"EA",
"customs_quantity"=>1,
"customs_weight"=>10}]}}
)
rocketshipit.request(
{
"carrier": "DHL",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_NUMBER",
"customs_forms": "CMI",
"invoice": "123",
"invoice_date": "2019-03-19",
"shipment_description": "Fashion goods",
"customs_value": 45.99,
"currency": "EUR",
"trade_terms": "DAP",
"packages": [
{
"weight": 5,
"length": 6,
"width": 7,
"height": 8
}
],
"shipper": "RocketShipIt",
"ship_addr1": "5684 Bay St",
"ship_city": "Emeryville",
"ship_state": "CA",
"ship_code": "94608",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "Toronto Zoo",
"to_addr1": "2000 Meadowvale Road",
"to_state": "MB",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_phone": "1231231234",
"to_country": "CA",
"test": true,
"service": "P",
"reference_value": "asdf",
"customs": [
{
"commodity_code": "cc",
"commodity_name": "cn",
"invoice_line_number": "1",
"invoice_line_part_number": "123",
"invoice_line_description": "My Description",
"customs_line_amount": 45.99,
"customs_origin_country": "CA",
"customs_quantity_units": "EA",
"customs_quantity": 1,
"customs_weight": 10
}
]
}
}
)
DHL - Label International CI Duties and Taxes Paid
{
"carrier": "DHL",
"action": "SubmitShipment",
"params": {
"customs_payment_type": "SENDER",
"customs_account_number": "1234",
"addons": [
"DD"
],
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_NUMBER",
"customs_forms": "CMI",
"invoice": "123",
"invoice_date": "2019-03-19",
"shipment_description": "Fashion goods",
"customs_value": 45.99,
"currency": "EUR",
"trade_terms": "DAP",
"packages": [
{
"weight": 5,
"length": 6,
"width": 7,
"height": 8
}
],
"shipper": "RocketShipIt",
"ship_addr1": "5684 Bay St",
"ship_city": "Emeryville",
"ship_state": "CA",
"ship_code": "94608",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "Toronto Zoo",
"to_addr1": "2000 Meadowvale Road",
"to_state": "MB",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_phone": "1231231234",
"to_country": "CA",
"test": true,
"service": "P",
"reference_value": "asdf",
"customs": [
{
"commodity_code": "cc",
"commodity_name": "cn",
"invoice_line_number": "1",
"invoice_line_part_number": "123",
"invoice_line_description": "My Description",
"customs_line_amount": 45.99,
"customs_origin_country": "CA",
"customs_quantity_units": "EA",
"customs_quantity": 1,
"customs_weight": 10
}
]
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL',
'action' => 'SubmitShipment',
'params' =>
array (
'customs_payment_type' => 'SENDER',
'customs_account_number' => '1234',
'addons' =>
array (
0 => 'DD',
),
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'customs_forms' => 'CMI',
'invoice' => '123',
'invoice_date' => '2019-03-19',
'shipment_description' => 'Fashion goods',
'customs_value' => 45.99,
'currency' => 'EUR',
'trade_terms' => 'DAP',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 6,
'width' => 7,
'height' => 8,
),
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '5684 Bay St',
'ship_city' => 'Emeryville',
'ship_state' => 'CA',
'ship_code' => '94608',
'ship_phone' => '1231231234',
'ship_country' => 'US',
'to_name' => 'Toronto Zoo',
'to_addr1' => '2000 Meadowvale Road',
'to_state' => 'MB',
'to_city' => 'Toronto',
'to_code' => 'M1B5K7',
'to_phone' => '1231231234',
'to_country' => 'CA',
'test' => true,
'service' => 'P',
'reference_value' => 'asdf',
'customs' =>
array (
0 =>
array (
'commodity_code' => 'cc',
'commodity_name' => 'cn',
'invoice_line_number' => '1',
'invoice_line_part_number' => '123',
'invoice_line_description' => 'My Description',
'customs_line_amount' => 45.99,
'customs_origin_country' => 'CA',
'customs_quantity_units' => 'EA',
'customs_quantity' => 1,
'customs_weight' => 10,
),
),
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'DHL',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'addons': ['DD'],
'currency': 'EUR',
'customs': [{'commodity_code': 'cc',
'commodity_name': 'cn',
'customs_line_amount': 45.99,
'customs_origin_country': 'CA',
'customs_quantity': 1,
'customs_quantity_units': 'EA',
'customs_weight': 10,
'invoice_line_description': 'My Description',
'invoice_line_number': '1',
'invoice_line_part_number': '123'}],
'customs_account_number': '1234',
'customs_forms': 'CMI',
'customs_payment_type': 'SENDER',
'customs_value': 45.99,
'invoice': '123',
'invoice_date': '2019-03-19',
'packages': [{'height': 8, 'length': 6, 'weight': 5, 'width': 7}],
'password': 'YOUR_PASSWORD',
'reference_value': 'asdf',
'service': 'P',
'ship_addr1': '5684 Bay St',
'ship_city': 'Emeryville',
'ship_code': '94608',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'CA',
'shipment_description': 'Fashion goods',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '2000 Meadowvale Road',
'to_city': 'Toronto',
'to_code': 'M1B5K7',
'to_country': 'CA',
'to_name': 'Toronto Zoo',
'to_phone': '1231231234',
'to_state': 'MB',
'trade_terms': 'DAP',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"DHL",
"action"=>"SubmitShipment",
"params"=>
{"customs_payment_type"=>"SENDER",
"customs_account_number"=>"1234",
"addons"=>["DD"],
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"customs_forms"=>"CMI",
"invoice"=>"123",
"invoice_date"=>"2019-03-19",
"shipment_description"=>"Fashion goods",
"customs_value"=>45.99,
"currency"=>"EUR",
"trade_terms"=>"DAP",
"packages"=>[{"weight"=>5, "length"=>6, "width"=>7, "height"=>8}],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"5684 Bay St",
"ship_city"=>"Emeryville",
"ship_state"=>"CA",
"ship_code"=>"94608",
"ship_phone"=>"1231231234",
"ship_country"=>"US",
"to_name"=>"Toronto Zoo",
"to_addr1"=>"2000 Meadowvale Road",
"to_state"=>"MB",
"to_city"=>"Toronto",
"to_code"=>"M1B5K7",
"to_phone"=>"1231231234",
"to_country"=>"CA",
"test"=>true,
"service"=>"P",
"reference_value"=>"asdf",
"customs"=>
[{"commodity_code"=>"cc",
"commodity_name"=>"cn",
"invoice_line_number"=>"1",
"invoice_line_part_number"=>"123",
"invoice_line_description"=>"My Description",
"customs_line_amount"=>45.99,
"customs_origin_country"=>"CA",
"customs_quantity_units"=>"EA",
"customs_quantity"=>1,
"customs_weight"=>10}]}}
)
rocketshipit.request(
{
"carrier": "DHL",
"action": "SubmitShipment",
"params": {
"customs_payment_type": "SENDER",
"customs_account_number": "1234",
"addons": [
"DD"
],
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_NUMBER",
"customs_forms": "CMI",
"invoice": "123",
"invoice_date": "2019-03-19",
"shipment_description": "Fashion goods",
"customs_value": 45.99,
"currency": "EUR",
"trade_terms": "DAP",
"packages": [
{
"weight": 5,
"length": 6,
"width": 7,
"height": 8
}
],
"shipper": "RocketShipIt",
"ship_addr1": "5684 Bay St",
"ship_city": "Emeryville",
"ship_state": "CA",
"ship_code": "94608",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "Toronto Zoo",
"to_addr1": "2000 Meadowvale Road",
"to_state": "MB",
"to_city": "Toronto",
"to_code": "M1B5K7",
"to_phone": "1231231234",
"to_country": "CA",
"test": true,
"service": "P",
"reference_value": "asdf",
"customs": [
{
"commodity_code": "cc",
"commodity_name": "cn",
"invoice_line_number": "1",
"invoice_line_part_number": "123",
"invoice_line_description": "My Description",
"customs_line_amount": 45.99,
"customs_origin_country": "CA",
"customs_quantity_units": "EA",
"customs_quantity": 1,
"customs_weight": 10
}
]
}
}
)
DHL - Label International EOR VAT for EU ICS2 and VAT22
{
"carrier": "DHL",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_NUMBER",
"ship_tax_id": "15724854",
"ship_tax_id_type": "EOR",
"ship_tax_id_country": "US",
"ship_tax_id2": "5432523452342",
"ship_tax_id_type2": "VAT",
"ship_tax_id_country2": "US",
"to_tax_id": "15724854",
"to_tax_id_type": "EOR",
"to_tax_id_country": "US",
"to_tax_id2": "5432523452342",
"to_tax_id_type2": "VAT",
"to_tax_id_country2": "US",
"packages": [
{
"length": 17,
"width": 15,
"height": 13,
"weight": 18.0,
"reference_value": "C-8PDMV3"
}
],
"package_description": "C-8PDMV3",
"invoice": "C-8PDMV3",
"customs": [
{
"commodity_code": "000000",
"commodity_name": "cn",
"customs_description": "Acme product 1",
"invoice_line_description": "Acme product 1",
"customs_quantity": 1,
"customs_quantity_units": "PCS",
"customs_weight": 6.0,
"customs_value": 79.99,
"customs_line_amount": 79.99,
"customs_origin_country": "US",
"customs_hs_tariff": "000000",
"country_of_manufacture": "US"
},
{
"commodity_code": "000000",
"commodity_name": "cn",
"customs_description": "Acme Product 1",
"invoice_line_description": "Acme Product 1",
"customs_quantity": 1,
"customs_quantity_units": "PCS",
"customs_weight": 6.0,
"customs_value": 23.99,
"customs_line_amount": 23.99,
"customs_origin_country": "US",
"customs_hs_tariff": "000000",
"country_of_manufacture": "US"
},
{
"commodity_code": "000000",
"commodity_name": "cn",
"customs_description": "Acme Product 1",
"invoice_line_description": "Acme Product 1",
"customs_quantity": 1,
"customs_quantity_units": "PCS",
"customs_weight": 6.0,
"customs_value": 135.99,
"customs_line_amount": 135.99,
"customs_origin_country": "US",
"customs_hs_tariff": "000000",
"country_of_manufacture": "US"
}
],
"customs_forms": "CMI",
"customs_value": 239.97,
"currency": "USD",
"weight_unit": "LB",
"length_unit": "IN",
"request_archive_doc": true,
"shipper": "Acme",
"ship_contact": "John Doe",
"ship_name": "John Doe",
"ship_addr1": "123 Not a Real Address st",
"ship_addr2": "",
"ship_city": "Opa-Locka",
"ship_state": "FL",
"ship_code": "33054",
"ship_country": "US",
"ship_phone": "+12366288450",
"to_country": "KY",
"to_name": "Jane Doe",
"to_code": null,
"to_addr1": "123 West Bay Road",
"to_addr2": "Caribbean Plaza, North Building",
"to_city": "George Town",
"to_phone": "+12359286260",
"shipment_description": "Product description",
"pickup_type": "01",
"customer_classification": "01",
"packaging_type": "02",
"test": true,
"to_state": null,
"label_stock_type": "8X4_thermal",
"bill_country": "XC",
"billing": [
{
"account": "YOUR BILLING ACCOUNT NUMBER"
}
],
"trade_terms": "DDU",
"customs_payment_type": "RECEIVER",
"insured_value": 239.97,
"addons": [
"II"
],
"image_type": "pdf",
"service": "P"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'ship_tax_id' => '15724854',
'ship_tax_id_type' => 'EOR',
'ship_tax_id_country' => 'US',
'ship_tax_id2' => '5432523452342',
'ship_tax_id_type2' => 'VAT',
'ship_tax_id_country2' => 'US',
'to_tax_id' => '15724854',
'to_tax_id_type' => 'EOR',
'to_tax_id_country' => 'US',
'to_tax_id2' => '5432523452342',
'to_tax_id_type2' => 'VAT',
'to_tax_id_country2' => 'US',
'packages' =>
array (
0 =>
array (
'length' => 17,
'width' => 15,
'height' => 13,
'weight' => 18.0,
'reference_value' => 'C-8PDMV3',
),
),
'package_description' => 'C-8PDMV3',
'invoice' => 'C-8PDMV3',
'customs' =>
array (
0 =>
array (
'commodity_code' => '000000',
'commodity_name' => 'cn',
'customs_description' => 'Acme product 1',
'invoice_line_description' => 'Acme product 1',
'customs_quantity' => 1,
'customs_quantity_units' => 'PCS',
'customs_weight' => 6.0,
'customs_value' => 79.99,
'customs_line_amount' => 79.99,
'customs_origin_country' => 'US',
'customs_hs_tariff' => '000000',
'country_of_manufacture' => 'US',
),
1 =>
array (
'commodity_code' => '000000',
'commodity_name' => 'cn',
'customs_description' => 'Acme Product 1',
'invoice_line_description' => 'Acme Product 1',
'customs_quantity' => 1,
'customs_quantity_units' => 'PCS',
'customs_weight' => 6.0,
'customs_value' => 23.99,
'customs_line_amount' => 23.99,
'customs_origin_country' => 'US',
'customs_hs_tariff' => '000000',
'country_of_manufacture' => 'US',
),
2 =>
array (
'commodity_code' => '000000',
'commodity_name' => 'cn',
'customs_description' => 'Acme Product 1',
'invoice_line_description' => 'Acme Product 1',
'customs_quantity' => 1,
'customs_quantity_units' => 'PCS',
'customs_weight' => 6.0,
'customs_value' => 135.99,
'customs_line_amount' => 135.99,
'customs_origin_country' => 'US',
'customs_hs_tariff' => '000000',
'country_of_manufacture' => 'US',
),
),
'customs_forms' => 'CMI',
'customs_value' => 239.97,
'currency' => 'USD',
'weight_unit' => 'LB',
'length_unit' => 'IN',
'request_archive_doc' => true,
'shipper' => 'Acme',
'ship_contact' => 'John Doe',
'ship_name' => 'John Doe',
'ship_addr1' => '123 Not a Real Address st',
'ship_addr2' => '',
'ship_city' => 'Opa-Locka',
'ship_state' => 'FL',
'ship_code' => '33054',
'ship_country' => 'US',
'ship_phone' => '+12366288450',
'to_country' => 'KY',
'to_name' => 'Jane Doe',
'to_code' => NULL,
'to_addr1' => '123 West Bay Road',
'to_addr2' => 'Caribbean Plaza, North Building',
'to_city' => 'George Town',
'to_phone' => '+12359286260',
'shipment_description' => 'Product description',
'pickup_type' => '01',
'customer_classification' => '01',
'packaging_type' => '02',
'test' => true,
'to_state' => NULL,
'label_stock_type' => '8X4_thermal',
'bill_country' => 'XC',
'billing' =>
array (
0 =>
array (
'account' => 'YOUR BILLING ACCOUNT NUMBER',
),
),
'trade_terms' => 'DDU',
'customs_payment_type' => 'RECEIVER',
'insured_value' => 239.97,
'addons' =>
array (
0 => 'II',
),
'image_type' => 'pdf',
'service' => 'P',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'DHL',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'addons': ['II'],
'bill_country': 'XC',
'billing': [{'account': 'YOUR BILLING ACCOUNT NUMBER'}],
'currency': 'USD',
'customer_classification': '01',
'customs': [{'commodity_code': '000000',
'commodity_name': 'cn',
'country_of_manufacture': 'US',
'customs_description': 'Acme product 1',
'customs_hs_tariff': '000000',
'customs_line_amount': 79.99,
'customs_origin_country': 'US',
'customs_quantity': 1,
'customs_quantity_units': 'PCS',
'customs_value': 79.99,
'customs_weight': 6.0,
'invoice_line_description': 'Acme product 1'},
{'commodity_code': '000000',
'commodity_name': 'cn',
'country_of_manufacture': 'US',
'customs_description': 'Acme Product 1',
'customs_hs_tariff': '000000',
'customs_line_amount': 23.99,
'customs_origin_country': 'US',
'customs_quantity': 1,
'customs_quantity_units': 'PCS',
'customs_value': 23.99,
'customs_weight': 6.0,
'invoice_line_description': 'Acme Product 1'},
{'commodity_code': '000000',
'commodity_name': 'cn',
'country_of_manufacture': 'US',
'customs_description': 'Acme Product 1',
'customs_hs_tariff': '000000',
'customs_line_amount': 135.99,
'customs_origin_country': 'US',
'customs_quantity': 1,
'customs_quantity_units': 'PCS',
'customs_value': 135.99,
'customs_weight': 6.0,
'invoice_line_description': 'Acme Product 1'}],
'customs_forms': 'CMI',
'customs_payment_type': 'RECEIVER',
'customs_value': 239.97,
'image_type': 'pdf',
'insured_value': 239.97,
'invoice': 'C-8PDMV3',
'label_stock_type': '8X4_thermal',
'length_unit': 'IN',
'package_description': 'C-8PDMV3',
'packages': [{'height': 13,
'length': 17,
'reference_value': 'C-8PDMV3',
'weight': 18.0,
'width': 15}],
'packaging_type': '02',
'password': 'YOUR_PASSWORD',
'pickup_type': '01',
'request_archive_doc': True,
'service': 'P',
'ship_addr1': '123 Not a Real Address st',
'ship_addr2': '',
'ship_city': 'Opa-Locka',
'ship_code': '33054',
'ship_contact': 'John Doe',
'ship_country': 'US',
'ship_name': 'John Doe',
'ship_phone': '+12366288450',
'ship_state': 'FL',
'ship_tax_id': '15724854',
'ship_tax_id2': '5432523452342',
'ship_tax_id_country': 'US',
'ship_tax_id_country2': 'US',
'ship_tax_id_type': 'EOR',
'ship_tax_id_type2': 'VAT',
'shipment_description': 'Product description',
'shipper': 'Acme',
'test': True,
'to_addr1': '123 West Bay Road',
'to_addr2': 'Caribbean Plaza, North Building',
'to_city': 'George Town',
'to_code': None,
'to_country': 'KY',
'to_name': 'Jane Doe',
'to_phone': '+12359286260',
'to_state': None,
'to_tax_id': '15724854',
'to_tax_id2': '5432523452342',
'to_tax_id_country': 'US',
'to_tax_id_country2': 'US',
'to_tax_id_type': 'EOR',
'to_tax_id_type2': 'VAT',
'trade_terms': 'DDU',
'username': 'YOUR_USERNAME',
'weight_unit': 'LB'}}
)
rs.request(
{"carrier"=>"DHL",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"ship_tax_id"=>"15724854",
"ship_tax_id_type"=>"EOR",
"ship_tax_id_country"=>"US",
"ship_tax_id2"=>"5432523452342",
"ship_tax_id_type2"=>"VAT",
"ship_tax_id_country2"=>"US",
"to_tax_id"=>"15724854",
"to_tax_id_type"=>"EOR",
"to_tax_id_country"=>"US",
"to_tax_id2"=>"5432523452342",
"to_tax_id_type2"=>"VAT",
"to_tax_id_country2"=>"US",
"packages"=>
[{"length"=>17,
"width"=>15,
"height"=>13,
"weight"=>18.0,
"reference_value"=>"C-8PDMV3"}],
"package_description"=>"C-8PDMV3",
"invoice"=>"C-8PDMV3",
"customs"=>
[{"commodity_code"=>"000000",
"commodity_name"=>"cn",
"customs_description"=>"Acme product 1",
"invoice_line_description"=>"Acme product 1",
"customs_quantity"=>1,
"customs_quantity_units"=>"PCS",
"customs_weight"=>6.0,
"customs_value"=>79.99,
"customs_line_amount"=>79.99,
"customs_origin_country"=>"US",
"customs_hs_tariff"=>"000000",
"country_of_manufacture"=>"US"},
{"commodity_code"=>"000000",
"commodity_name"=>"cn",
"customs_description"=>"Acme Product 1",
"invoice_line_description"=>"Acme Product 1",
"customs_quantity"=>1,
"customs_quantity_units"=>"PCS",
"customs_weight"=>6.0,
"customs_value"=>23.99,
"customs_line_amount"=>23.99,
"customs_origin_country"=>"US",
"customs_hs_tariff"=>"000000",
"country_of_manufacture"=>"US"},
{"commodity_code"=>"000000",
"commodity_name"=>"cn",
"customs_description"=>"Acme Product 1",
"invoice_line_description"=>"Acme Product 1",
"customs_quantity"=>1,
"customs_quantity_units"=>"PCS",
"customs_weight"=>6.0,
"customs_value"=>135.99,
"customs_line_amount"=>135.99,
"customs_origin_country"=>"US",
"customs_hs_tariff"=>"000000",
"country_of_manufacture"=>"US"}],
"customs_forms"=>"CMI",
"customs_value"=>239.97,
"currency"=>"USD",
"weight_unit"=>"LB",
"length_unit"=>"IN",
"request_archive_doc"=>true,
"shipper"=>"Acme",
"ship_contact"=>"John Doe",
"ship_name"=>"John Doe",
"ship_addr1"=>"123 Not a Real Address st",
"ship_addr2"=>"",
"ship_city"=>"Opa-Locka",
"ship_state"=>"FL",
"ship_code"=>"33054",
"ship_country"=>"US",
"ship_phone"=>"+12366288450",
"to_country"=>"KY",
"to_name"=>"Jane Doe",
"to_code"=>nil,
"to_addr1"=>"123 West Bay Road",
"to_addr2"=>"Caribbean Plaza, North Building",
"to_city"=>"George Town",
"to_phone"=>"+12359286260",
"shipment_description"=>"Product description",
"pickup_type"=>"01",
"customer_classification"=>"01",
"packaging_type"=>"02",
"test"=>true,
"to_state"=>nil,
"label_stock_type"=>"8X4_thermal",
"bill_country"=>"XC",
"billing"=>[{"account"=>"YOUR BILLING ACCOUNT NUMBER"}],
"trade_terms"=>"DDU",
"customs_payment_type"=>"RECEIVER",
"insured_value"=>239.97,
"addons"=>["II"],
"image_type"=>"pdf",
"service"=>"P"}}
)
rocketshipit.request(
{
"carrier": "DHL",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_NUMBER",
"ship_tax_id": "15724854",
"ship_tax_id_type": "EOR",
"ship_tax_id_country": "US",
"ship_tax_id2": "5432523452342",
"ship_tax_id_type2": "VAT",
"ship_tax_id_country2": "US",
"to_tax_id": "15724854",
"to_tax_id_type": "EOR",
"to_tax_id_country": "US",
"to_tax_id2": "5432523452342",
"to_tax_id_type2": "VAT",
"to_tax_id_country2": "US",
"packages": [
{
"length": 17,
"width": 15,
"height": 13,
"weight": 18.0,
"reference_value": "C-8PDMV3"
}
],
"package_description": "C-8PDMV3",
"invoice": "C-8PDMV3",
"customs": [
{
"commodity_code": "000000",
"commodity_name": "cn",
"customs_description": "Acme product 1",
"invoice_line_description": "Acme product 1",
"customs_quantity": 1,
"customs_quantity_units": "PCS",
"customs_weight": 6.0,
"customs_value": 79.99,
"customs_line_amount": 79.99,
"customs_origin_country": "US",
"customs_hs_tariff": "000000",
"country_of_manufacture": "US"
},
{
"commodity_code": "000000",
"commodity_name": "cn",
"customs_description": "Acme Product 1",
"invoice_line_description": "Acme Product 1",
"customs_quantity": 1,
"customs_quantity_units": "PCS",
"customs_weight": 6.0,
"customs_value": 23.99,
"customs_line_amount": 23.99,
"customs_origin_country": "US",
"customs_hs_tariff": "000000",
"country_of_manufacture": "US"
},
{
"commodity_code": "000000",
"commodity_name": "cn",
"customs_description": "Acme Product 1",
"invoice_line_description": "Acme Product 1",
"customs_quantity": 1,
"customs_quantity_units": "PCS",
"customs_weight": 6.0,
"customs_value": 135.99,
"customs_line_amount": 135.99,
"customs_origin_country": "US",
"customs_hs_tariff": "000000",
"country_of_manufacture": "US"
}
],
"customs_forms": "CMI",
"customs_value": 239.97,
"currency": "USD",
"weight_unit": "LB",
"length_unit": "IN",
"request_archive_doc": true,
"shipper": "Acme",
"ship_contact": "John Doe",
"ship_name": "John Doe",
"ship_addr1": "123 Not a Real Address st",
"ship_addr2": "",
"ship_city": "Opa-Locka",
"ship_state": "FL",
"ship_code": "33054",
"ship_country": "US",
"ship_phone": "+12366288450",
"to_country": "KY",
"to_name": "Jane Doe",
"to_code": null,
"to_addr1": "123 West Bay Road",
"to_addr2": "Caribbean Plaza, North Building",
"to_city": "George Town",
"to_phone": "+12359286260",
"shipment_description": "Product description",
"pickup_type": "01",
"customer_classification": "01",
"packaging_type": "02",
"test": true,
"to_state": null,
"label_stock_type": "8X4_thermal",
"bill_country": "XC",
"billing": [
{
"account": "YOUR BILLING ACCOUNT NUMBER"
}
],
"trade_terms": "DDU",
"customs_payment_type": "RECEIVER",
"insured_value": 239.97,
"addons": [
"II"
],
"image_type": "pdf",
"service": "P"
}
}
)
DHL - Label International Local Product Code
{
"carrier": "DHL",
"action": "SubmitShipment",
"params": {
"username": "",
"password": "",
"account_number": "",
"shipper": "Your Company",
"ship_contact": "Your Name",
"ship_addr1": "Sanhedria Murchevet 102\/8",
"ship_city": "Jerusalem",
"ship_code": "9770602",
"ship_phone": "+9723128183524",
"ship_country": "IL",
"to_name": "John Doe",
"to_addr1": "1415 E 12TH ST",
"to_state": "NY",
"to_city": "BROOKLYN",
"to_code": "11230-6605",
"to_country": "US",
"packages": [
{
"weight": 0.5,
"length": 1,
"width": 1,
"height": 1,
"reference_value": "SYK"
}
],
"local_service": "E",
"service": "X",
"image_type": "PDF",
"currency": "USD",
"documents_only": true,
"request_archive_doc": true,
"packaging_type": "EE",
"shipment_description": "Documents",
"customs_value": 0,
"trade_terms": "DAP"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => '',
'password' => '',
'account_number' => '',
'shipper' => 'Your Company',
'ship_contact' => 'Your Name',
'ship_addr1' => 'Sanhedria Murchevet 102/8',
'ship_city' => 'Jerusalem',
'ship_code' => '9770602',
'ship_phone' => '+9723128183524',
'ship_country' => 'IL',
'to_name' => 'John Doe',
'to_addr1' => '1415 E 12TH ST',
'to_state' => 'NY',
'to_city' => 'BROOKLYN',
'to_code' => '11230-6605',
'to_country' => 'US',
'packages' =>
array (
0 =>
array (
'weight' => 0.5,
'length' => 1,
'width' => 1,
'height' => 1,
'reference_value' => 'SYK',
),
),
'local_service' => 'E',
'service' => 'X',
'image_type' => 'PDF',
'currency' => 'USD',
'documents_only' => true,
'request_archive_doc' => true,
'packaging_type' => 'EE',
'shipment_description' => 'Documents',
'customs_value' => 0,
'trade_terms' => 'DAP',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'DHL',
'params': {'account_number': '',
'currency': 'USD',
'customs_value': 0,
'documents_only': True,
'image_type': 'PDF',
'local_service': 'E',
'packages': [{'height': 1,
'length': 1,
'reference_value': 'SYK',
'weight': 0.5,
'width': 1}],
'packaging_type': 'EE',
'password': '',
'request_archive_doc': True,
'service': 'X',
'ship_addr1': 'Sanhedria Murchevet 102/8',
'ship_city': 'Jerusalem',
'ship_code': '9770602',
'ship_contact': 'Your Name',
'ship_country': 'IL',
'ship_phone': '+9723128183524',
'shipment_description': 'Documents',
'shipper': 'Your Company',
'to_addr1': '1415 E 12TH ST',
'to_city': 'BROOKLYN',
'to_code': '11230-6605',
'to_country': 'US',
'to_name': 'John Doe',
'to_state': 'NY',
'trade_terms': 'DAP',
'username': ''}}
)
rs.request(
{"carrier"=>"DHL",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"",
"password"=>"",
"account_number"=>"",
"shipper"=>"Your Company",
"ship_contact"=>"Your Name",
"ship_addr1"=>"Sanhedria Murchevet 102/8",
"ship_city"=>"Jerusalem",
"ship_code"=>"9770602",
"ship_phone"=>"+9723128183524",
"ship_country"=>"IL",
"to_name"=>"John Doe",
"to_addr1"=>"1415 E 12TH ST",
"to_state"=>"NY",
"to_city"=>"BROOKLYN",
"to_code"=>"11230-6605",
"to_country"=>"US",
"packages"=>
[{"weight"=>0.5,
"length"=>1,
"width"=>1,
"height"=>1,
"reference_value"=>"SYK"}],
"local_service"=>"E",
"service"=>"X",
"image_type"=>"PDF",
"currency"=>"USD",
"documents_only"=>true,
"request_archive_doc"=>true,
"packaging_type"=>"EE",
"shipment_description"=>"Documents",
"customs_value"=>0,
"trade_terms"=>"DAP"}}
)
rocketshipit.request(
{
"carrier": "DHL",
"action": "SubmitShipment",
"params": {
"username": "",
"password": "",
"account_number": "",
"shipper": "Your Company",
"ship_contact": "Your Name",
"ship_addr1": "Sanhedria Murchevet 102\/8",
"ship_city": "Jerusalem",
"ship_code": "9770602",
"ship_phone": "+9723128183524",
"ship_country": "IL",
"to_name": "John Doe",
"to_addr1": "1415 E 12TH ST",
"to_state": "NY",
"to_city": "BROOKLYN",
"to_code": "11230-6605",
"to_country": "US",
"packages": [
{
"weight": 0.5,
"length": 1,
"width": 1,
"height": 1,
"reference_value": "SYK"
}
],
"local_service": "E",
"service": "X",
"image_type": "PDF",
"currency": "USD",
"documents_only": true,
"request_archive_doc": true,
"packaging_type": "EE",
"shipment_description": "Documents",
"customs_value": 0,
"trade_terms": "DAP"
}
}
)
DHL - Label Third Party Billing
{
"carrier": "DHL",
"action": "SubmitShipment",
"params": {
"account_number": "803921577",
"billing": [
{
"type": "transportation",
"payment_type": "third_party",
"account": "abc123"
}
],
"packages": [
{
"weight": 4,
"length": 7,
"width": 4,
"height": 4
}
],
"service": "N",
"shipper": "RocketShipIt",
"ship_addr1": "1401 Park Ave",
"ship_city": "Emeryville",
"ship_state": "CA",
"ship_code": "94608",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "John Doe",
"to_addr1": "940 Presidio Ave",
"to_addr2": "#103",
"to_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PDF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL',
'action' => 'SubmitShipment',
'params' =>
array (
'account_number' => '803921577',
'billing' =>
array (
0 =>
array (
'type' => 'transportation',
'payment_type' => 'third_party',
'account' => 'abc123',
),
),
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'width' => 4,
'height' => 4,
),
),
'service' => 'N',
'shipper' => 'RocketShipIt',
'ship_addr1' => '1401 Park Ave',
'ship_city' => 'Emeryville',
'ship_state' => 'CA',
'ship_code' => '94608',
'ship_phone' => '1231231234',
'ship_country' => 'US',
'to_name' => 'John Doe',
'to_addr1' => '940 Presidio Ave',
'to_addr2' => '#103',
'to_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'PDF',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'DHL',
'params': {'account_number': '803921577',
'billing': [{'account': 'abc123',
'payment_type': 'third_party',
'type': 'transportation'}],
'image_type': 'PDF',
'packages': [{'height': 4, 'length': 7, 'weight': 4, 'width': 4}],
'service': 'N',
'ship_addr1': '1401 Park Ave',
'ship_city': 'Emeryville',
'ship_code': '94608',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'CA',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '940 Presidio Ave',
'to_addr2': '#103',
'to_city': 'San Francisco',
'to_code': '94115',
'to_country': 'US',
'to_name': 'John Doe',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"DHL",
"action"=>"SubmitShipment",
"params"=>
{"account_number"=>"803921577",
"billing"=>
[{"type"=>"transportation",
"payment_type"=>"third_party",
"account"=>"abc123"}],
"packages"=>[{"weight"=>4, "length"=>7, "width"=>4, "height"=>4}],
"service"=>"N",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"1401 Park Ave",
"ship_city"=>"Emeryville",
"ship_state"=>"CA",
"ship_code"=>"94608",
"ship_phone"=>"1231231234",
"ship_country"=>"US",
"to_name"=>"John Doe",
"to_addr1"=>"940 Presidio Ave",
"to_addr2"=>"#103",
"to_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"PDF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "DHL",
"action": "SubmitShipment",
"params": {
"account_number": "803921577",
"billing": [
{
"type": "transportation",
"payment_type": "third_party",
"account": "abc123"
}
],
"packages": [
{
"weight": 4,
"length": 7,
"width": 4,
"height": 4
}
],
"service": "N",
"shipper": "RocketShipIt",
"ship_addr1": "1401 Park Ave",
"ship_city": "Emeryville",
"ship_state": "CA",
"ship_code": "94608",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "John Doe",
"to_addr1": "940 Presidio Ave",
"to_addr2": "#103",
"to_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PDF",
"test": true
}
}
)
DHL - Label with Insurance
{
"carrier": "DHL",
"action": "SubmitShipment",
"params": {
"account_number": "803921577",
"addons": [
"II"
],
"insured_value": 1000.00,
"insured_currenty": "USD",
"packages": [
{
"weight": 4,
"length": 7,
"width": 4,
"height": 4
}
],
"service": "N",
"shipper": "RocketShipIt",
"ship_addr1": "1401 Park Ave",
"ship_city": "Emeryville",
"ship_state": "CA",
"ship_code": "94608",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "John Doe",
"to_addr1": "940 Presidio Ave",
"to_addr2": "#103",
"to_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PDF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL',
'action' => 'SubmitShipment',
'params' =>
array (
'account_number' => '803921577',
'addons' =>
array (
0 => 'II',
),
'insured_value' => 1000.0,
'insured_currenty' => 'USD',
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'width' => 4,
'height' => 4,
),
),
'service' => 'N',
'shipper' => 'RocketShipIt',
'ship_addr1' => '1401 Park Ave',
'ship_city' => 'Emeryville',
'ship_state' => 'CA',
'ship_code' => '94608',
'ship_phone' => '1231231234',
'ship_country' => 'US',
'to_name' => 'John Doe',
'to_addr1' => '940 Presidio Ave',
'to_addr2' => '#103',
'to_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'PDF',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'DHL',
'params': {'account_number': '803921577',
'addons': ['II'],
'image_type': 'PDF',
'insured_currenty': 'USD',
'insured_value': 1000.0,
'packages': [{'height': 4, 'length': 7, 'weight': 4, 'width': 4}],
'service': 'N',
'ship_addr1': '1401 Park Ave',
'ship_city': 'Emeryville',
'ship_code': '94608',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'CA',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '940 Presidio Ave',
'to_addr2': '#103',
'to_city': 'San Francisco',
'to_code': '94115',
'to_country': 'US',
'to_name': 'John Doe',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"DHL",
"action"=>"SubmitShipment",
"params"=>
{"account_number"=>"803921577",
"addons"=>["II"],
"insured_value"=>1000.0,
"insured_currenty"=>"USD",
"packages"=>[{"weight"=>4, "length"=>7, "width"=>4, "height"=>4}],
"service"=>"N",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"1401 Park Ave",
"ship_city"=>"Emeryville",
"ship_state"=>"CA",
"ship_code"=>"94608",
"ship_phone"=>"1231231234",
"ship_country"=>"US",
"to_name"=>"John Doe",
"to_addr1"=>"940 Presidio Ave",
"to_addr2"=>"#103",
"to_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"PDF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "DHL",
"action": "SubmitShipment",
"params": {
"account_number": "803921577",
"addons": [
"II"
],
"insured_value": 1000.00,
"insured_currenty": "USD",
"packages": [
{
"weight": 4,
"length": 7,
"width": 4,
"height": 4
}
],
"service": "N",
"shipper": "RocketShipIt",
"ship_addr1": "1401 Park Ave",
"ship_city": "Emeryville",
"ship_state": "CA",
"ship_code": "94608",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "John Doe",
"to_addr1": "940 Presidio Ave",
"to_addr2": "#103",
"to_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PDF",
"test": true
}
}
)
DHL - Label with Waybill Doc
{
"carrier": "DHL",
"action": "SubmitShipment",
"params": {
"request_archive_doc": true,
"account_number": "803921577",
"packages": [
{
"weight": 4,
"length": 7,
"width": 4,
"height": 4
}
],
"service": "N",
"shipper": "RocketShipIt",
"ship_addr1": "1401 Park Ave",
"ship_city": "Emeryville",
"ship_state": "CA",
"ship_code": "94608",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "John Doe",
"to_addr1": "940 Presidio Ave",
"to_addr2": "#103",
"to_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PDF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL',
'action' => 'SubmitShipment',
'params' =>
array (
'request_archive_doc' => true,
'account_number' => '803921577',
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'width' => 4,
'height' => 4,
),
),
'service' => 'N',
'shipper' => 'RocketShipIt',
'ship_addr1' => '1401 Park Ave',
'ship_city' => 'Emeryville',
'ship_state' => 'CA',
'ship_code' => '94608',
'ship_phone' => '1231231234',
'ship_country' => 'US',
'to_name' => 'John Doe',
'to_addr1' => '940 Presidio Ave',
'to_addr2' => '#103',
'to_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'PDF',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'DHL',
'params': {'account_number': '803921577',
'image_type': 'PDF',
'packages': [{'height': 4, 'length': 7, 'weight': 4, 'width': 4}],
'request_archive_doc': True,
'service': 'N',
'ship_addr1': '1401 Park Ave',
'ship_city': 'Emeryville',
'ship_code': '94608',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'CA',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '940 Presidio Ave',
'to_addr2': '#103',
'to_city': 'San Francisco',
'to_code': '94115',
'to_country': 'US',
'to_name': 'John Doe',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"DHL",
"action"=>"SubmitShipment",
"params"=>
{"request_archive_doc"=>true,
"account_number"=>"803921577",
"packages"=>[{"weight"=>4, "length"=>7, "width"=>4, "height"=>4}],
"service"=>"N",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"1401 Park Ave",
"ship_city"=>"Emeryville",
"ship_state"=>"CA",
"ship_code"=>"94608",
"ship_phone"=>"1231231234",
"ship_country"=>"US",
"to_name"=>"John Doe",
"to_addr1"=>"940 Presidio Ave",
"to_addr2"=>"#103",
"to_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"PDF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "DHL",
"action": "SubmitShipment",
"params": {
"request_archive_doc": true,
"account_number": "803921577",
"packages": [
{
"weight": 4,
"length": 7,
"width": 4,
"height": 4
}
],
"service": "N",
"shipper": "RocketShipIt",
"ship_addr1": "1401 Park Ave",
"ship_city": "Emeryville",
"ship_state": "CA",
"ship_code": "94608",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "John Doe",
"to_addr1": "940 Presidio Ave",
"to_addr2": "#103",
"to_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PDF",
"test": true
}
}
)
DHL - Label with reference
{
"carrier": "DHL",
"action": "SubmitShipment",
"params": {
"packages": [
{
"weight": 4,
"length": 7,
"width": 1,
"height": 1,
"reference_value": "asdf"
}
],
"service": "N",
"shipper": "RocketShipIt",
"ship_addr1": "1401 Park Ave",
"ship_city": "Emeryville",
"ship_state": "CA",
"ship_code": "94608",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "John Doe",
"to_addr1": "940 Presidio Ave",
"to_addr2": "#103",
"to_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PDF",
"account_number": "803921577",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL',
'action' => 'SubmitShipment',
'params' =>
array (
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'width' => 1,
'height' => 1,
'reference_value' => 'asdf',
),
),
'service' => 'N',
'shipper' => 'RocketShipIt',
'ship_addr1' => '1401 Park Ave',
'ship_city' => 'Emeryville',
'ship_state' => 'CA',
'ship_code' => '94608',
'ship_phone' => '1231231234',
'ship_country' => 'US',
'to_name' => 'John Doe',
'to_addr1' => '940 Presidio Ave',
'to_addr2' => '#103',
'to_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'PDF',
'account_number' => '803921577',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'DHL',
'params': {'account_number': '803921577',
'image_type': 'PDF',
'packages': [{'height': 1,
'length': 7,
'reference_value': 'asdf',
'weight': 4,
'width': 1}],
'service': 'N',
'ship_addr1': '1401 Park Ave',
'ship_city': 'Emeryville',
'ship_code': '94608',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'CA',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '940 Presidio Ave',
'to_addr2': '#103',
'to_city': 'San Francisco',
'to_code': '94115',
'to_country': 'US',
'to_name': 'John Doe',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"DHL",
"action"=>"SubmitShipment",
"params"=>
{"packages"=>
[{"weight"=>4,
"length"=>7,
"width"=>1,
"height"=>1,
"reference_value"=>"asdf"}],
"service"=>"N",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"1401 Park Ave",
"ship_city"=>"Emeryville",
"ship_state"=>"CA",
"ship_code"=>"94608",
"ship_phone"=>"1231231234",
"ship_country"=>"US",
"to_name"=>"John Doe",
"to_addr1"=>"940 Presidio Ave",
"to_addr2"=>"#103",
"to_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"PDF",
"account_number"=>"803921577",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "DHL",
"action": "SubmitShipment",
"params": {
"packages": [
{
"weight": 4,
"length": 7,
"width": 1,
"height": 1,
"reference_value": "asdf"
}
],
"service": "N",
"shipper": "RocketShipIt",
"ship_addr1": "1401 Park Ave",
"ship_city": "Emeryville",
"ship_state": "CA",
"ship_code": "94608",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "John Doe",
"to_addr1": "940 Presidio Ave",
"to_addr2": "#103",
"to_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PDF",
"account_number": "803921577",
"test": true
}
}
)
DHL - Pickup Cancel
{
"carrier": "DHL",
"action": "CancelPickup",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"pickup_id": "2929AONCALL",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL',
'action' => 'CancelPickup',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'pickup_id' => '2929AONCALL',
'test' => true,
),
)
);
rs.request(
{'action': 'CancelPickup',
'carrier': 'DHL',
'params': {'password': 'YOUR_PASSWORD',
'pickup_id': '2929AONCALL',
'test': True,
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"DHL",
"action"=>"CancelPickup",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"pickup_id"=>"2929AONCALL",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "DHL",
"action": "CancelPickup",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"pickup_id": "2929AONCALL",
"test": true
}
}
)
DHL - Pickup Schedule
{
"carrier": "DHL",
"action": "CreatePickup",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"account_number": "803921577",
"packages": [
{
"weight": 5,
"width": 10,
"length": 10,
"height": 10
}
],
"shipper": "Acme Inc.",
"ship_contact": "John Doe",
"ship_country": "US",
"ship_phone": "123-123-1234",
"ship_city": "San Francisco",
"ship_code": "94115",
"ship_addr1": "101 Main st",
"to_code": "90210",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL',
'action' => 'CreatePickup',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'account_number' => '803921577',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'width' => 10,
'length' => 10,
'height' => 10,
),
),
'shipper' => 'Acme Inc.',
'ship_contact' => 'John Doe',
'ship_country' => 'US',
'ship_phone' => '123-123-1234',
'ship_city' => 'San Francisco',
'ship_code' => '94115',
'ship_addr1' => '101 Main st',
'to_code' => '90210',
'test' => true,
),
)
);
rs.request(
{'action': 'CreatePickup',
'carrier': 'DHL',
'params': {'account_number': '803921577',
'packages': [{'height': 10,
'length': 10,
'weight': 5,
'width': 10}],
'password': 'YOUR_PASSWORD',
'ship_addr1': '101 Main st',
'ship_city': 'San Francisco',
'ship_code': '94115',
'ship_contact': 'John Doe',
'ship_country': 'US',
'ship_phone': '123-123-1234',
'shipper': 'Acme Inc.',
'test': True,
'to_code': '90210',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"DHL",
"action"=>"CreatePickup",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"account_number"=>"803921577",
"packages"=>[{"weight"=>5, "width"=>10, "length"=>10, "height"=>10}],
"shipper"=>"Acme Inc.",
"ship_contact"=>"John Doe",
"ship_country"=>"US",
"ship_phone"=>"123-123-1234",
"ship_city"=>"San Francisco",
"ship_code"=>"94115",
"ship_addr1"=>"101 Main st",
"to_code"=>"90210",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "DHL",
"action": "CreatePickup",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"account_number": "803921577",
"packages": [
{
"weight": 5,
"width": 10,
"length": 10,
"height": 10
}
],
"shipper": "Acme Inc.",
"ship_contact": "John Doe",
"ship_country": "US",
"ship_phone": "123-123-1234",
"ship_city": "San Francisco",
"ship_code": "94115",
"ship_addr1": "101 Main st",
"to_code": "90210",
"test": true
}
}
)
DHL - Rates
{
"carrier": "DHL",
"action": "GetAllRates",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 5
}
],
"ship_city": "San Francisco",
"ship_code": "94115",
"to_code": "90210",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL',
'action' => 'GetAllRates',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 5,
),
),
'ship_city' => 'San Francisco',
'ship_code' => '94115',
'to_code' => '90210',
'test' => true,
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'DHL',
'params': {'packages': [{'weight': 5}],
'password': 'YOUR_PASSWORD',
'ship_city': 'San Francisco',
'ship_code': '94115',
'test': True,
'to_code': '90210',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"DHL",
"action"=>"GetAllRates",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"packages"=>[{"weight"=>5}],
"ship_city"=>"San Francisco",
"ship_code"=>"94115",
"to_code"=>"90210",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "DHL",
"action": "GetAllRates",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 5
}
],
"ship_city": "San Francisco",
"ship_code": "94115",
"to_code": "90210",
"test": true
}
}
)
DHL - Rates International
{
"carrier": "DHL",
"action": "GetAllRates",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"customs_value": 100.20,
"currency": "EUR",
"packages": [
{
"weight": 0.5,
"length": 15.0,
"width": 10.0,
"height": 4.0
}
],
"weight_unit": "KG",
"length_unit": "CM",
"shipper": "Tom1again SRL",
"ship_addr1": "Dieselstrasse 5B",
"ship_code": "61476",
"ship_city": "Kronberg",
"ship_country": "DE",
"to_country": "RO",
"to_code": "920004",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL',
'action' => 'GetAllRates',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'customs_value' => 100.2,
'currency' => 'EUR',
'packages' =>
array (
0 =>
array (
'weight' => 0.5,
'length' => 15.0,
'width' => 10.0,
'height' => 4.0,
),
),
'weight_unit' => 'KG',
'length_unit' => 'CM',
'shipper' => 'Tom1again SRL',
'ship_addr1' => 'Dieselstrasse 5B',
'ship_code' => '61476',
'ship_city' => 'Kronberg',
'ship_country' => 'DE',
'to_country' => 'RO',
'to_code' => '920004',
'test' => true,
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'DHL',
'params': {'currency': 'EUR',
'customs_value': 100.2,
'length_unit': 'CM',
'packages': [{'height': 4.0,
'length': 15.0,
'weight': 0.5,
'width': 10.0}],
'password': 'YOUR_PASSWORD',
'ship_addr1': 'Dieselstrasse 5B',
'ship_city': 'Kronberg',
'ship_code': '61476',
'ship_country': 'DE',
'shipper': 'Tom1again SRL',
'test': True,
'to_code': '920004',
'to_country': 'RO',
'username': 'YOUR_USERNAME',
'weight_unit': 'KG'}}
)
rs.request(
{"carrier"=>"DHL",
"action"=>"GetAllRates",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"customs_value"=>100.2,
"currency"=>"EUR",
"packages"=>[{"weight"=>0.5, "length"=>15.0, "width"=>10.0, "height"=>4.0}],
"weight_unit"=>"KG",
"length_unit"=>"CM",
"shipper"=>"Tom1again SRL",
"ship_addr1"=>"Dieselstrasse 5B",
"ship_code"=>"61476",
"ship_city"=>"Kronberg",
"ship_country"=>"DE",
"to_country"=>"RO",
"to_code"=>"920004",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "DHL",
"action": "GetAllRates",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"customs_value": 100.20,
"currency": "EUR",
"packages": [
{
"weight": 0.5,
"length": 15.0,
"width": 10.0,
"height": 4.0
}
],
"weight_unit": "KG",
"length_unit": "CM",
"shipper": "Tom1again SRL",
"ship_addr1": "Dieselstrasse 5B",
"ship_code": "61476",
"ship_city": "Kronberg",
"ship_country": "DE",
"to_country": "RO",
"to_code": "920004",
"test": true
}
}
)
DHL - Rates Multi-package
{
"carrier": "DHL",
"action": "GetAllRates",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 5
},
{
"weight": 5
}
],
"ship_city": "San Francisco",
"ship_code": "94115",
"to_code": "90210",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL',
'action' => 'GetAllRates',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 5,
),
1 =>
array (
'weight' => 5,
),
),
'ship_city' => 'San Francisco',
'ship_code' => '94115',
'to_code' => '90210',
'test' => true,
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'DHL',
'params': {'packages': [{'weight': 5}, {'weight': 5}],
'password': 'YOUR_PASSWORD',
'ship_city': 'San Francisco',
'ship_code': '94115',
'test': True,
'to_code': '90210',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"DHL",
"action"=>"GetAllRates",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"packages"=>[{"weight"=>5}, {"weight"=>5}],
"ship_city"=>"San Francisco",
"ship_code"=>"94115",
"to_code"=>"90210",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "DHL",
"action": "GetAllRates",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 5
},
{
"weight": 5
}
],
"ship_city": "San Francisco",
"ship_code": "94115",
"to_code": "90210",
"test": true
}
}
)
DHL - Rates with Insurance
{
"carrier": "DHL",
"action": "GetAllRates",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 5,
"insured_value": 200
}
],
"ship_city": "San Francisco",
"ship_code": "94115",
"to_code": "90210",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL',
'action' => 'GetAllRates',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'insured_value' => 200,
),
),
'ship_city' => 'San Francisco',
'ship_code' => '94115',
'to_code' => '90210',
'test' => true,
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'DHL',
'params': {'packages': [{'insured_value': 200, 'weight': 5}],
'password': 'YOUR_PASSWORD',
'ship_city': 'San Francisco',
'ship_code': '94115',
'test': True,
'to_code': '90210',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"DHL",
"action"=>"GetAllRates",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"packages"=>[{"weight"=>5, "insured_value"=>200}],
"ship_city"=>"San Francisco",
"ship_code"=>"94115",
"to_code"=>"90210",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "DHL",
"action": "GetAllRates",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 5,
"insured_value": 200
}
],
"ship_city": "San Francisco",
"ship_code": "94115",
"to_code": "90210",
"test": true
}
}
)
DHL - Time in Transit
{
"carrier": "DHL",
"action": "timeintransit",
"params": {
"test": true,
"shipper": "RocketShipIt",
"ship_contact": "Mark Sanborn",
"ship_phone": "1231231234",
"ship_state": "CA",
"ship_code": "90210",
"ship_country": "US",
"to_country": "US",
"to_code": "90210",
"pickup_date": "2018-06-25",
"ready_time": "0900",
"currency": "USD",
"customs_value": 5000
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL',
'action' => 'timeintransit',
'params' =>
array (
'test' => true,
'shipper' => 'RocketShipIt',
'ship_contact' => 'Mark Sanborn',
'ship_phone' => '1231231234',
'ship_state' => 'CA',
'ship_code' => '90210',
'ship_country' => 'US',
'to_country' => 'US',
'to_code' => '90210',
'pickup_date' => '2018-06-25',
'ready_time' => '0900',
'currency' => 'USD',
'customs_value' => 5000,
),
)
);
rs.request(
{'action': 'timeintransit',
'carrier': 'DHL',
'params': {'currency': 'USD',
'customs_value': 5000,
'pickup_date': '2018-06-25',
'ready_time': '0900',
'ship_code': '90210',
'ship_contact': 'Mark Sanborn',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'CA',
'shipper': 'RocketShipIt',
'test': True,
'to_code': '90210',
'to_country': 'US'}}
)
rs.request(
{"carrier"=>"DHL",
"action"=>"timeintransit",
"params"=>
{"test"=>true,
"shipper"=>"RocketShipIt",
"ship_contact"=>"Mark Sanborn",
"ship_phone"=>"1231231234",
"ship_state"=>"CA",
"ship_code"=>"90210",
"ship_country"=>"US",
"to_country"=>"US",
"to_code"=>"90210",
"pickup_date"=>"2018-06-25",
"ready_time"=>"0900",
"currency"=>"USD",
"customs_value"=>5000}}
)
rocketshipit.request(
{
"carrier": "DHL",
"action": "timeintransit",
"params": {
"test": true,
"shipper": "RocketShipIt",
"ship_contact": "Mark Sanborn",
"ship_phone": "1231231234",
"ship_state": "CA",
"ship_code": "90210",
"ship_country": "US",
"to_country": "US",
"to_code": "90210",
"pickup_date": "2018-06-25",
"ready_time": "0900",
"currency": "USD",
"customs_value": 5000
}
}
)
DHL - Tracking
{
"carrier": "DHL",
"action": "Track",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"tracking_number": "123456789",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL',
'action' => 'Track',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'tracking_number' => '123456789',
'test' => true,
),
)
);
rs.request(
{'action': 'Track',
'carrier': 'DHL',
'params': {'password': 'YOUR_PASSWORD',
'test': True,
'tracking_number': '123456789',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"DHL",
"action"=>"Track",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"tracking_number"=>"123456789",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "DHL",
"action": "Track",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"tracking_number": "123456789",
"test": true
}
}
)
DHL eCommerce - Create Manifest
{
"carrier": "DHL-ecommerce",
"action": "CreateManifest",
"params": {
"username": "YOUR_DHL_CLIENT_ID",
"password": "YOUR_DHL_CLIENT_SECRET",
"account_number": "YOUR_DHL_PICKUP_ID",
"shipment_ids": [
"PRCDZNRTDDIYKACEBKUMJQ"
],
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL-ecommerce',
'action' => 'CreateManifest',
'params' =>
array (
'username' => 'YOUR_DHL_CLIENT_ID',
'password' => 'YOUR_DHL_CLIENT_SECRET',
'account_number' => 'YOUR_DHL_PICKUP_ID',
'shipment_ids' =>
array (
0 => 'PRCDZNRTDDIYKACEBKUMJQ',
),
'test' => true,
),
)
);
rs.request(
{'action': 'CreateManifest',
'carrier': 'DHL-ecommerce',
'params': {'account_number': 'YOUR_DHL_PICKUP_ID',
'password': 'YOUR_DHL_CLIENT_SECRET',
'shipment_ids': ['PRCDZNRTDDIYKACEBKUMJQ'],
'test': True,
'username': 'YOUR_DHL_CLIENT_ID'}}
)
rs.request(
{"carrier"=>"DHL-ecommerce",
"action"=>"CreateManifest",
"params"=>
{"username"=>"YOUR_DHL_CLIENT_ID",
"password"=>"YOUR_DHL_CLIENT_SECRET",
"account_number"=>"YOUR_DHL_PICKUP_ID",
"shipment_ids"=>["PRCDZNRTDDIYKACEBKUMJQ"],
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "DHL-ecommerce",
"action": "CreateManifest",
"params": {
"username": "YOUR_DHL_CLIENT_ID",
"password": "YOUR_DHL_CLIENT_SECRET",
"account_number": "YOUR_DHL_PICKUP_ID",
"shipment_ids": [
"PRCDZNRTDDIYKACEBKUMJQ"
],
"test": true
}
}
)
DHL eCommerce - International Label
{
"carrier": "DHL-ecommerce",
"action": "SubmitShipment",
"params": {
"username": "YOUR_DHL_CLIENT_ID",
"password": "YOUR_DHL_CLIENT_SECRET",
"account_number": "YOUR_DHL_PICKUP_ID",
"service": "PLT",
"monetary_value": 10.00,
"packages": [
{
"weight": 0.3
}
],
"customs": [
{
"commodity_code": "000000",
"invoice_line_description": "Acme product 1",
"invoice_line_origin_country_code": "US",
"invoice_line_value": "2.00",
"invoice_line_part_number": "abc123"
}
],
"shipper": "Mr. Returns",
"ship_contact": "John Smith",
"ship_addr1": "1500 South Point Dr.",
"ship_city": "Forrest Park",
"ship_state": "GA",
"ship_code": "30297",
"ship_phone": "123-123-1234",
"to_name": "Joe Bloggs",
"to_addr1": "5048 - 264th Street",
"to_state": "BC",
"to_city": "Aldergrove",
"to_code": "V4W1N7",
"to_country": "CA",
"to_phone": "123-123-1234"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL-ecommerce',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_DHL_CLIENT_ID',
'password' => 'YOUR_DHL_CLIENT_SECRET',
'account_number' => 'YOUR_DHL_PICKUP_ID',
'service' => 'PLT',
'monetary_value' => 10.0,
'packages' =>
array (
0 =>
array (
'weight' => 0.3,
),
),
'customs' =>
array (
0 =>
array (
'commodity_code' => '000000',
'invoice_line_description' => 'Acme product 1',
'invoice_line_origin_country_code' => 'US',
'invoice_line_value' => '2.00',
'invoice_line_part_number' => 'abc123',
),
),
'shipper' => 'Mr. Returns',
'ship_contact' => 'John Smith',
'ship_addr1' => '1500 South Point Dr.',
'ship_city' => 'Forrest Park',
'ship_state' => 'GA',
'ship_code' => '30297',
'ship_phone' => '123-123-1234',
'to_name' => 'Joe Bloggs',
'to_addr1' => '5048 - 264th Street',
'to_state' => 'BC',
'to_city' => 'Aldergrove',
'to_code' => 'V4W1N7',
'to_country' => 'CA',
'to_phone' => '123-123-1234',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'DHL-ecommerce',
'params': {'account_number': 'YOUR_DHL_PICKUP_ID',
'customs': [{'commodity_code': '000000',
'invoice_line_description': 'Acme product 1',
'invoice_line_origin_country_code': 'US',
'invoice_line_part_number': 'abc123',
'invoice_line_value': '2.00'}],
'monetary_value': 10.0,
'packages': [{'weight': 0.3}],
'password': 'YOUR_DHL_CLIENT_SECRET',
'service': 'PLT',
'ship_addr1': '1500 South Point Dr.',
'ship_city': 'Forrest Park',
'ship_code': '30297',
'ship_contact': 'John Smith',
'ship_phone': '123-123-1234',
'ship_state': 'GA',
'shipper': 'Mr. Returns',
'to_addr1': '5048 - 264th Street',
'to_city': 'Aldergrove',
'to_code': 'V4W1N7',
'to_country': 'CA',
'to_name': 'Joe Bloggs',
'to_phone': '123-123-1234',
'to_state': 'BC',
'username': 'YOUR_DHL_CLIENT_ID'}}
)
rs.request(
{"carrier"=>"DHL-ecommerce",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_DHL_CLIENT_ID",
"password"=>"YOUR_DHL_CLIENT_SECRET",
"account_number"=>"YOUR_DHL_PICKUP_ID",
"service"=>"PLT",
"monetary_value"=>10.0,
"packages"=>[{"weight"=>0.3}],
"customs"=>
[{"commodity_code"=>"000000",
"invoice_line_description"=>"Acme product 1",
"invoice_line_origin_country_code"=>"US",
"invoice_line_value"=>"2.00",
"invoice_line_part_number"=>"abc123"}],
"shipper"=>"Mr. Returns",
"ship_contact"=>"John Smith",
"ship_addr1"=>"1500 South Point Dr.",
"ship_city"=>"Forrest Park",
"ship_state"=>"GA",
"ship_code"=>"30297",
"ship_phone"=>"123-123-1234",
"to_name"=>"Joe Bloggs",
"to_addr1"=>"5048 - 264th Street",
"to_state"=>"BC",
"to_city"=>"Aldergrove",
"to_code"=>"V4W1N7",
"to_country"=>"CA",
"to_phone"=>"123-123-1234"}}
)
rocketshipit.request(
{
"carrier": "DHL-ecommerce",
"action": "SubmitShipment",
"params": {
"username": "YOUR_DHL_CLIENT_ID",
"password": "YOUR_DHL_CLIENT_SECRET",
"account_number": "YOUR_DHL_PICKUP_ID",
"service": "PLT",
"monetary_value": 10.00,
"packages": [
{
"weight": 0.3
}
],
"customs": [
{
"commodity_code": "000000",
"invoice_line_description": "Acme product 1",
"invoice_line_origin_country_code": "US",
"invoice_line_value": "2.00",
"invoice_line_part_number": "abc123"
}
],
"shipper": "Mr. Returns",
"ship_contact": "John Smith",
"ship_addr1": "1500 South Point Dr.",
"ship_city": "Forrest Park",
"ship_state": "GA",
"ship_code": "30297",
"ship_phone": "123-123-1234",
"to_name": "Joe Bloggs",
"to_addr1": "5048 - 264th Street",
"to_state": "BC",
"to_city": "Aldergrove",
"to_code": "V4W1N7",
"to_country": "CA",
"to_phone": "123-123-1234"
}
}
)
DHL eCommerce - Rates
{
"carrier": "DHL-ecommerce",
"action": "GetAllRates",
"params": {
"username": "YOUR_DHL_CLIENT_ID",
"password": "YOUR_DHL_CLIENT_SECRET",
"account_number": "YOUR_DHL_PICKUP_ID",
"test": true,
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_code": "90210",
"weight_unit": "LBS",
"pickup_type": "01",
"customer_classification": "01",
"length_unit": "IN",
"packaging_type": "02"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL-ecommerce',
'action' => 'GetAllRates',
'params' =>
array (
'username' => 'YOUR_DHL_CLIENT_ID',
'password' => 'YOUR_DHL_CLIENT_SECRET',
'account_number' => 'YOUR_DHL_PICKUP_ID',
'test' => true,
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 5,
'width' => 5,
'height' => 5,
),
),
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_country' => 'US',
'to_code' => '90210',
'weight_unit' => 'LBS',
'pickup_type' => '01',
'customer_classification' => '01',
'length_unit' => 'IN',
'packaging_type' => '02',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'DHL-ecommerce',
'params': {'account_number': 'YOUR_DHL_PICKUP_ID',
'customer_classification': '01',
'customs': [],
'length_unit': 'IN',
'packages': [{'height': 5, 'length': 5, 'weight': 5, 'width': 5}],
'packaging_type': '02',
'password': 'YOUR_DHL_CLIENT_SECRET',
'pickup_type': '01',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_code': '90210',
'to_country': 'US',
'username': 'YOUR_DHL_CLIENT_ID',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"DHL-ecommerce",
"action"=>"GetAllRates",
"params"=>
{"username"=>"YOUR_DHL_CLIENT_ID",
"password"=>"YOUR_DHL_CLIENT_SECRET",
"account_number"=>"YOUR_DHL_PICKUP_ID",
"test"=>true,
"packages"=>[{"weight"=>5, "length"=>5, "width"=>5, "height"=>5}],
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_country"=>"US",
"to_code"=>"90210",
"weight_unit"=>"LBS",
"pickup_type"=>"01",
"customer_classification"=>"01",
"length_unit"=>"IN",
"packaging_type"=>"02"}}
)
rocketshipit.request(
{
"carrier": "DHL-ecommerce",
"action": "GetAllRates",
"params": {
"username": "YOUR_DHL_CLIENT_ID",
"password": "YOUR_DHL_CLIENT_SECRET",
"account_number": "YOUR_DHL_PICKUP_ID",
"test": true,
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "US",
"to_code": "90210",
"weight_unit": "LBS",
"pickup_type": "01",
"customer_classification": "01",
"length_unit": "IN",
"packaging_type": "02"
}
}
)
DHL eCommerce - Tracking
{
"carrier": "DHL-ecommerce",
"action": "Track",
"params": {
"username": "YOUR_DHL_CLIENT_ID",
"password": "YOUR_DHL_CLIENT_SECRET",
"account_number": "YOUR_DHL_PICKUP_ID",
"tracking_number": "RXGNDLFDMJXYGRYOUKQAOW"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL-ecommerce',
'action' => 'Track',
'params' =>
array (
'username' => 'YOUR_DHL_CLIENT_ID',
'password' => 'YOUR_DHL_CLIENT_SECRET',
'account_number' => 'YOUR_DHL_PICKUP_ID',
'tracking_number' => 'RXGNDLFDMJXYGRYOUKQAOW',
),
)
);
rs.request(
{'action': 'Track',
'carrier': 'DHL-ecommerce',
'params': {'account_number': 'YOUR_DHL_PICKUP_ID',
'password': 'YOUR_DHL_CLIENT_SECRET',
'tracking_number': 'RXGNDLFDMJXYGRYOUKQAOW',
'username': 'YOUR_DHL_CLIENT_ID'}}
)
rs.request(
{"carrier"=>"DHL-ecommerce",
"action"=>"Track",
"params"=>
{"username"=>"YOUR_DHL_CLIENT_ID",
"password"=>"YOUR_DHL_CLIENT_SECRET",
"account_number"=>"YOUR_DHL_PICKUP_ID",
"tracking_number"=>"RXGNDLFDMJXYGRYOUKQAOW"}}
)
rocketshipit.request(
{
"carrier": "DHL-ecommerce",
"action": "Track",
"params": {
"username": "YOUR_DHL_CLIENT_ID",
"password": "YOUR_DHL_CLIENT_SECRET",
"account_number": "YOUR_DHL_PICKUP_ID",
"tracking_number": "RXGNDLFDMJXYGRYOUKQAOW"
}
}
)
DHL-PL - Label
{
"carrier": "dhl-pl",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_NUMBER",
"service": "AH",
"shipment_description": "Toys",
"image_type": "LBLP",
"packages": [
{
"weight": 15,
"length": 10,
"width": 10,
"height": 10
}
],
"shipper": "Thomas Test",
"ship_addr1": "Osmanska",
"ship_addr2": "2",
"ship_city": "Warszawa",
"ship_code": "02823",
"ship_phone": "123456789",
"to_name": "John Doe",
"to_addr1": "7 Wroblewskiego",
"to_addr2": "7",
"to_city": "Pulawy",
"to_code": "24100",
"to_phone": "123456789",
"to_country": "PL",
"to_email": "receiver@dhl.com",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'dhl-pl',
'action' => 'SubmitShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'service' => 'AH',
'shipment_description' => 'Toys',
'image_type' => 'LBLP',
'packages' =>
array (
0 =>
array (
'weight' => 15,
'length' => 10,
'width' => 10,
'height' => 10,
),
),
'shipper' => 'Thomas Test',
'ship_addr1' => 'Osmanska',
'ship_addr2' => '2',
'ship_city' => 'Warszawa',
'ship_code' => '02823',
'ship_phone' => '123456789',
'to_name' => 'John Doe',
'to_addr1' => '7 Wroblewskiego',
'to_addr2' => '7',
'to_city' => 'Pulawy',
'to_code' => '24100',
'to_phone' => '123456789',
'to_country' => 'PL',
'to_email' => 'receiver@dhl.com',
'packaging_type' => 'YOUR_PACKAGING',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'dhl-pl',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'image_type': 'LBLP',
'packages': [{'height': 10,
'length': 10,
'weight': 15,
'width': 10}],
'packaging_type': 'YOUR_PACKAGING',
'password': 'YOUR_PASSWORD',
'service': 'AH',
'ship_addr1': 'Osmanska',
'ship_addr2': '2',
'ship_city': 'Warszawa',
'ship_code': '02823',
'ship_phone': '123456789',
'shipment_description': 'Toys',
'shipper': 'Thomas Test',
'test': True,
'to_addr1': '7 Wroblewskiego',
'to_addr2': '7',
'to_city': 'Pulawy',
'to_code': '24100',
'to_country': 'PL',
'to_email': 'receiver@dhl.com',
'to_name': 'John Doe',
'to_phone': '123456789',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"dhl-pl",
"action"=>"SubmitShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"service"=>"AH",
"shipment_description"=>"Toys",
"image_type"=>"LBLP",
"packages"=>[{"weight"=>15, "length"=>10, "width"=>10, "height"=>10}],
"shipper"=>"Thomas Test",
"ship_addr1"=>"Osmanska",
"ship_addr2"=>"2",
"ship_city"=>"Warszawa",
"ship_code"=>"02823",
"ship_phone"=>"123456789",
"to_name"=>"John Doe",
"to_addr1"=>"7 Wroblewskiego",
"to_addr2"=>"7",
"to_city"=>"Pulawy",
"to_code"=>"24100",
"to_phone"=>"123456789",
"to_country"=>"PL",
"to_email"=>"receiver@dhl.com",
"packaging_type"=>"YOUR_PACKAGING",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "dhl-pl",
"action": "SubmitShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_NUMBER",
"service": "AH",
"shipment_description": "Toys",
"image_type": "LBLP",
"packages": [
{
"weight": 15,
"length": 10,
"width": 10,
"height": 10
}
],
"shipper": "Thomas Test",
"ship_addr1": "Osmanska",
"ship_addr2": "2",
"ship_city": "Warszawa",
"ship_code": "02823",
"ship_phone": "123456789",
"to_name": "John Doe",
"to_addr1": "7 Wroblewskiego",
"to_addr2": "7",
"to_city": "Pulawy",
"to_code": "24100",
"to_phone": "123456789",
"to_country": "PL",
"to_email": "receiver@dhl.com",
"packaging_type": "YOUR_PACKAGING",
"test": true
}
}
)
DHL-PL - Pickup
{
"carrier": "DHL-PL",
"action": "CreatePickup",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"special_instructions": "Uwaga, paczki zawieraja szklo",
"shipment_ids": [
"90000019278"
],
"pickup_date": "2017-04-17",
"close_time": "16:00",
"ready_time": "08:00",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL-PL',
'action' => 'CreatePickup',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'special_instructions' => 'Uwaga, paczki zawieraja szklo',
'shipment_ids' =>
array (
0 => '90000019278',
),
'pickup_date' => '2017-04-17',
'close_time' => '16:00',
'ready_time' => '08:00',
'test' => true,
),
)
);
rs.request(
{'action': 'CreatePickup',
'carrier': 'DHL-PL',
'params': {'close_time': '16:00',
'password': 'YOUR_PASSWORD',
'pickup_date': '2017-04-17',
'ready_time': '08:00',
'shipment_ids': ['90000019278'],
'special_instructions': 'Uwaga, paczki zawieraja szklo',
'test': True,
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"DHL-PL",
"action"=>"CreatePickup",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"special_instructions"=>"Uwaga, paczki zawieraja szklo",
"shipment_ids"=>["90000019278"],
"pickup_date"=>"2017-04-17",
"close_time"=>"16:00",
"ready_time"=>"08:00",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "DHL-PL",
"action": "CreatePickup",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"special_instructions": "Uwaga, paczki zawieraja szklo",
"shipment_ids": [
"90000019278"
],
"pickup_date": "2017-04-17",
"close_time": "16:00",
"ready_time": "08:00",
"test": true
}
}
)
DHL-PL - Track
{
"carrier": "DHL-PL",
"action": "Track",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"shipment_id": "11898773100",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL-PL',
'action' => 'Track',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'shipment_id' => '11898773100',
'test' => true,
),
)
);
rs.request(
{'action': 'Track',
'carrier': 'DHL-PL',
'params': {'password': 'YOUR_PASSWORD',
'shipment_id': '11898773100',
'test': True,
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"DHL-PL",
"action"=>"Track",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"shipment_id"=>"11898773100",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "DHL-PL",
"action": "Track",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"shipment_id": "11898773100",
"test": true
}
}
)
DHL-PL - Void
{
"carrier": "DHL-PL",
"action": "VoidShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"shipment_id": "16257008778",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL-PL',
'action' => 'VoidShipment',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'shipment_id' => '16257008778',
'test' => true,
),
)
);
rs.request(
{'action': 'VoidShipment',
'carrier': 'DHL-PL',
'params': {'password': 'YOUR_PASSWORD',
'shipment_id': '16257008778',
'test': True,
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"DHL-PL",
"action"=>"VoidShipment",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"shipment_id"=>"16257008778",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "DHL-PL",
"action": "VoidShipment",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"shipment_id": "16257008778",
"test": true
}
}
)
DHL-REST - Label
{
"carrier": "DHL-REST",
"action": "SubmitShipment",
"params": {
"client_id": "demo-key",
"client_secret": "demo-secret",
"account_number": "803921577",
"packages": [
{
"weight": 4,
"length": 7,
"width": 4,
"height": 4
}
],
"service": "N",
"shipper": "RocketShipIt",
"ship_addr1": "1401 Park Ave",
"ship_city": "Emeryville",
"ship_state": "CA",
"ship_code": "94608",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "John Doe",
"to_addr1": "940 Presidio Ave",
"to_addr2": "#103",
"to_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PDF",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'client_id' => 'demo-key',
'client_secret' => 'demo-secret',
'account_number' => '803921577',
'packages' =>
array (
0 =>
array (
'weight' => 4,
'length' => 7,
'width' => 4,
'height' => 4,
),
),
'service' => 'N',
'shipper' => 'RocketShipIt',
'ship_addr1' => '1401 Park Ave',
'ship_city' => 'Emeryville',
'ship_state' => 'CA',
'ship_code' => '94608',
'ship_phone' => '1231231234',
'ship_country' => 'US',
'to_name' => 'John Doe',
'to_addr1' => '940 Presidio Ave',
'to_addr2' => '#103',
'to_state' => 'CA',
'to_city' => 'San Francisco',
'to_code' => '94115',
'to_country' => 'US',
'image_type' => 'PDF',
'test' => true,
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'DHL-REST',
'params': {'account_number': '803921577',
'client_id': 'demo-key',
'client_secret': 'demo-secret',
'image_type': 'PDF',
'packages': [{'height': 4, 'length': 7, 'weight': 4, 'width': 4}],
'service': 'N',
'ship_addr1': '1401 Park Ave',
'ship_city': 'Emeryville',
'ship_code': '94608',
'ship_country': 'US',
'ship_phone': '1231231234',
'ship_state': 'CA',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '940 Presidio Ave',
'to_addr2': '#103',
'to_city': 'San Francisco',
'to_code': '94115',
'to_country': 'US',
'to_name': 'John Doe',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"DHL-REST",
"action"=>"SubmitShipment",
"params"=>
{"client_id"=>"demo-key",
"client_secret"=>"demo-secret",
"account_number"=>"803921577",
"packages"=>[{"weight"=>4, "length"=>7, "width"=>4, "height"=>4}],
"service"=>"N",
"shipper"=>"RocketShipIt",
"ship_addr1"=>"1401 Park Ave",
"ship_city"=>"Emeryville",
"ship_state"=>"CA",
"ship_code"=>"94608",
"ship_phone"=>"1231231234",
"ship_country"=>"US",
"to_name"=>"John Doe",
"to_addr1"=>"940 Presidio Ave",
"to_addr2"=>"#103",
"to_state"=>"CA",
"to_city"=>"San Francisco",
"to_code"=>"94115",
"to_country"=>"US",
"image_type"=>"PDF",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "DHL-REST",
"action": "SubmitShipment",
"params": {
"client_id": "demo-key",
"client_secret": "demo-secret",
"account_number": "803921577",
"packages": [
{
"weight": 4,
"length": 7,
"width": 4,
"height": 4
}
],
"service": "N",
"shipper": "RocketShipIt",
"ship_addr1": "1401 Park Ave",
"ship_city": "Emeryville",
"ship_state": "CA",
"ship_code": "94608",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "John Doe",
"to_addr1": "940 Presidio Ave",
"to_addr2": "#103",
"to_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "PDF",
"test": true
}
}
)
DHL-REST - Rates
{
"carrier": "DHL-REST",
"action": "GetAllRates",
"params": {
"client_id": "demo-key",
"client_secret": "demo-secret",
"packages": [
{
"weight": 5
}
],
"ship_city": "San Francisco",
"ship_code": "94115",
"to_code": "90210",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL-REST',
'action' => 'GetAllRates',
'params' =>
array (
'client_id' => 'demo-key',
'client_secret' => 'demo-secret',
'packages' =>
array (
0 =>
array (
'weight' => 5,
),
),
'ship_city' => 'San Francisco',
'ship_code' => '94115',
'to_code' => '90210',
'test' => true,
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'DHL-REST',
'params': {'client_id': 'demo-key',
'client_secret': 'demo-secret',
'packages': [{'weight': 5}],
'ship_city': 'San Francisco',
'ship_code': '94115',
'test': True,
'to_code': '90210'}}
)
rs.request(
{"carrier"=>"DHL-REST",
"action"=>"GetAllRates",
"params"=>
{"client_id"=>"demo-key",
"client_secret"=>"demo-secret",
"packages"=>[{"weight"=>5}],
"ship_city"=>"San Francisco",
"ship_code"=>"94115",
"to_code"=>"90210",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "DHL-REST",
"action": "GetAllRates",
"params": {
"client_id": "demo-key",
"client_secret": "demo-secret",
"packages": [
{
"weight": 5
}
],
"ship_city": "San Francisco",
"ship_code": "94115",
"to_code": "90210",
"test": true
}
}
)
DHL-REST - Tracking
{
"carrier": "DHL-REST",
"action": "Track",
"params": {
"client_id": "demo-key",
"client_secret": "demo-secret",
"tracking_number": "123456789",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'DHL-REST',
'action' => 'Track',
'params' =>
array (
'client_id' => 'demo-key',
'client_secret' => 'demo-secret',
'tracking_number' => '123456789',
'test' => true,
),
)
);
rs.request(
{'action': 'Track',
'carrier': 'DHL-REST',
'params': {'client_id': 'demo-key',
'client_secret': 'demo-secret',
'test': True,
'tracking_number': '123456789'}}
)
rs.request(
{"carrier"=>"DHL-REST",
"action"=>"Track",
"params"=>
{"client_id"=>"demo-key",
"client_secret"=>"demo-secret",
"tracking_number"=>"123456789",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "DHL-REST",
"action": "Track",
"params": {
"client_id": "demo-key",
"client_secret": "demo-secret",
"tracking_number": "123456789",
"test": true
}
}
)
DPD - Tracking
{
"carrier": "dpd",
"action": "track",
"params": {
"username": "GEOTRACK",
"password": "g30tr4ck",
"tracking_number": "1371134583769923",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'dpd',
'action' => 'track',
'params' =>
array (
'username' => 'GEOTRACK',
'password' => 'g30tr4ck',
'tracking_number' => '1371134583769923',
'test' => true,
),
)
);
rs.request(
{'action': 'track',
'carrier': 'dpd',
'params': {'password': 'g30tr4ck',
'test': True,
'tracking_number': '1371134583769923',
'username': 'GEOTRACK'}}
)
rs.request(
{"carrier"=>"dpd",
"action"=>"track",
"params"=>
{"username"=>"GEOTRACK",
"password"=>"g30tr4ck",
"tracking_number"=>"1371134583769923",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "dpd",
"action": "track",
"params": {
"username": "GEOTRACK",
"password": "g30tr4ck",
"tracking_number": "1371134583769923",
"test": true
}
}
)
{
"carrier": "Dicom",
"action": "SubmitShipment",
"params": {
"test": true,
"account_number": "YOUR_ACCOUNT_NUMBER",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_country": "US",
"to_city": "Emeryville",
"to_state": "CA",
"to_code": "90210",
"weight_unit": "LBS",
"length_unit": "IN",
"packaging_type": "BX"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'Dicom',
'action' => 'SubmitShipment',
'params' =>
array (
'test' => true,
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'packages' =>
array (
0 =>
array (
'weight' => 5,
'length' => 5,
'width' => 5,
'height' => 5,
),
),
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_country' => 'US',
'to_city' => 'Emeryville',
'to_state' => 'CA',
'to_code' => '90210',
'weight_unit' => 'LBS',
'length_unit' => 'IN',
'packaging_type' => 'BX',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'Dicom',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'customs': [],
'length_unit': 'IN',
'packages': [{'height': 5, 'length': 5, 'weight': 5, 'width': 5}],
'packaging_type': 'BX',
'password': 'YOUR_PASSWORD',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Emeryville',
'to_code': '90210',
'to_country': 'US',
'to_name': 'John Doe',
'to_state': 'CA',
'username': 'YOUR_USERNAME',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"Dicom",
"action"=>"SubmitShipment",
"params"=>
{"test"=>true,
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"packages"=>[{"weight"=>5, "length"=>5, "width"=>5, "height"=>5}],
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_country"=>"US",
"to_city"=>"Emeryville",
"to_state"=>"CA",
"to_code"=>"90210",
"weight_unit"=>"LBS",
"length_unit"=>"IN",
"packaging_type"=>"BX"}}
)
rocketshipit.request(
{
"carrier": "Dicom",
"action": "SubmitShipment",
"params": {
"test": true,
"account_number": "YOUR_ACCOUNT_NUMBER",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"packages": [
{
"weight": 5,
"length": 5,
"width": 5,
"height": 5
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_country": "US",
"to_city": "Emeryville",
"to_state": "CA",
"to_code": "90210",
"weight_unit": "LBS",
"length_unit": "IN",
"packaging_type": "BX"
}
}
)
{
"carrier": "Dicom",
"action": "GetAllRates",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_NUMBER",
"packages": [
{
"packaging_type": "Box",
"weight": 50,
"length": 5,
"width": 5,
"height": 5
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "CA",
"to_state": "BC",
"to_code": "V4W1N7",
"division": "express"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'Dicom',
'action' => 'GetAllRates',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'packages' =>
array (
0 =>
array (
'packaging_type' => 'Box',
'weight' => 50,
'length' => 5,
'width' => 5,
'height' => 5,
),
),
'customs' =>
array (
),
'shipper' => 'RocketShipIt',
'ship_addr1' => '123 Main St',
'ship_city' => 'Whitehall',
'ship_state' => 'MT',
'ship_code' => '59759',
'ship_country' => 'US',
'to_country' => 'CA',
'to_state' => 'BC',
'to_code' => 'V4W1N7',
'division' => 'express',
),
)
);
rs.request(
{'action': 'GetAllRates',
'carrier': 'Dicom',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'customs': [],
'division': 'express',
'packages': [{'height': 5,
'length': 5,
'packaging_type': 'Box',
'weight': 50,
'width': 5}],
'password': 'YOUR_PASSWORD',
'ship_addr1': '123 Main St',
'ship_city': 'Whitehall',
'ship_code': '59759',
'ship_country': 'US',
'ship_state': 'MT',
'shipper': 'RocketShipIt',
'to_code': 'V4W1N7',
'to_country': 'CA',
'to_state': 'BC',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"Dicom",
"action"=>"GetAllRates",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"packages"=>
[{"packaging_type"=>"Box",
"weight"=>50,
"length"=>5,
"width"=>5,
"height"=>5}],
"customs"=>[],
"shipper"=>"RocketShipIt",
"ship_addr1"=>"123 Main St",
"ship_city"=>"Whitehall",
"ship_state"=>"MT",
"ship_code"=>"59759",
"ship_country"=>"US",
"to_country"=>"CA",
"to_state"=>"BC",
"to_code"=>"V4W1N7",
"division"=>"express"}}
)
rocketshipit.request(
{
"carrier": "Dicom",
"action": "GetAllRates",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"account_number": "YOUR_ACCOUNT_NUMBER",
"packages": [
{
"packaging_type": "Box",
"weight": 50,
"length": 5,
"width": 5,
"height": 5
}
],
"customs": [],
"shipper": "RocketShipIt",
"ship_addr1": "123 Main St",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_country": "US",
"to_country": "CA",
"to_state": "BC",
"to_code": "V4W1N7",
"division": "express"
}
}
)
{
"carrier": "Dicom",
"action": "Track",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"tracking_number": "W1234567"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'Dicom',
'action' => 'Track',
'params' =>
array (
'username' => 'YOUR_USERNAME',
'password' => 'YOUR_PASSWORD',
'tracking_number' => 'W1234567',
),
)
);
rs.request(
{'action': 'Track',
'carrier': 'Dicom',
'params': {'password': 'YOUR_PASSWORD',
'tracking_number': 'W1234567',
'username': 'YOUR_USERNAME'}}
)
rs.request(
{"carrier"=>"Dicom",
"action"=>"Track",
"params"=>
{"username"=>"YOUR_USERNAME",
"password"=>"YOUR_PASSWORD",
"tracking_number"=>"W1234567"}}
)
rocketshipit.request(
{
"carrier": "Dicom",
"action": "Track",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"tracking_number": "W1234567"
}
}
)
FedEx - Address Validation
{
"carrier": "FedEx",
"action": "AddressValidate",
"params": {
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'AddressValidate',
'params' =>
array (
'to_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_state' => 'CA',
'to_city' => 'Beverly Hills',
'to_code' => '90210',
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'test' => true,
),
)
);
rs.request(
{'action': 'AddressValidate',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'password': 'YOUR_PASSWORD',
'test': True,
'to_addr1': '123 Main St',
'to_city': 'Beverly Hills',
'to_code': '90210',
'to_name': 'John Doe',
'to_state': 'CA'}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"AddressValidate",
"params"=>
{"to_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_state"=>"CA",
"to_city"=>"Beverly Hills",
"to_code"=>"90210",
"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "AddressValidate",
"params": {
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"test": true
}
}
)
FedEx - Create Manifest
{
"carrier": "FedEx",
"action": "CreateManifest",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",
"key": "YOUR_KEY",
"password": "YOUR_PASSWORD",
"test": true
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'FedEx',
'action' => 'CreateManifest',
'params' =>
array (
'account_number' => 'YOUR_ACCOUNT_NUMBER',
'meter_number' => 'YOUR_METER_NUMBER',
'key' => 'YOUR_KEY',
'password' => 'YOUR_PASSWORD',
'test' => true,
),
)
);
rs.request(
{'action': 'CreateManifest',
'carrier': 'FedEx',
'params': {'account_number': 'YOUR_ACCOUNT_NUMBER',
'key': 'YOUR_KEY',
'meter_number': 'YOUR_METER_NUMBER',
'password': 'YOUR_PASSWORD',
'test': True}}
)
rs.request(
{"carrier"=>"FedEx",
"action"=>"CreateManifest",
"params"=>
{"account_number"=>"YOUR_ACCOUNT_NUMBER",
"meter_number"=>"YOUR_METER_NUMBER",
"key"=>"YOUR_KEY",
"password"=>"YOUR_PASSWORD",
"test"=>true}}
)
rocketshipit.request(
{
"carrier": "FedEx",
"action": "CreateManifest",
"params": {
"account_number": "YOUR_ACCOUNT_NUMBER",
"meter_number": "YOUR_METER_NUMBER",