{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"test": true,
"account_number": "YOUR_ACCOUNT",
"customs_forms": "01",
"currency": "CAD",
"invoice_date": "20160910",
"reason_for_export": "SALE",
"invoice_line_total": 100,
"documents_only": true,
"packages": [
{
"weight": 1,
"reference_code": "TN",
"reference_value": "12345678"
}
],
"customs": [
{
"invoice_line_number": "1",
"invoice_line_part_number": "123",
"invoice_line_description": "My Description",
"invoice_line_value": "1",
"invoice_line_origin_country_code": "CA",
"customs_quantity_units": "EA"
}
],
"sold_company": "Acme Inc.",
"sold_name": "John Doe",
"sold_tax_id": "123abc",
"sold_phone": "1231231234",
"sold_addr1": "2000 Meadowvale Rd",
"sold_city": "Toronto",
"sold_state": "ON",
"sold_code": "M1B5K7",
"sold_country": "CA",
"service": "14",
"shipper": "John Doe",
"ship_contact": "John Doe",
"ship_addr1": "2000 Meadowvale Rd",
"ship_city": "Toronto",
"ship_state": "ON",
"ship_code": "M1B5K7",
"ship_country": "CA",
"ship_phone": "1231231234",
"to_attention_name": "John Doe",
"to_name": "John Doe",
"to_addr1": "2300 Southern Blvd",
"to_state": "NY",
"to_city": "Bronx",
"to_code": "10460",
"to_country": "US",
"to_phone": "1231231234",
"image_type": "PNG",
"shipment_description": "xxx",
"packaging_type": "01",
"pickup_type": "02",
"weight_unit": "LBS",
"length_unit": "IN"
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'key' => 'your-key-from-authenticate-request',
'test' => true,
'account_number' => 'YOUR_ACCOUNT',
'customs_forms' => '01',
'currency' => 'CAD',
'invoice_date' => '20160910',
'reason_for_export' => 'SALE',
'invoice_line_total' => 100,
'documents_only' => true,
'packages' =>
array (
0 =>
array (
'weight' => 1,
'reference_code' => 'TN',
'reference_value' => '12345678',
),
),
'customs' =>
array (
0 =>
array (
'invoice_line_number' => '1',
'invoice_line_part_number' => '123',
'invoice_line_description' => 'My Description',
'invoice_line_value' => '1',
'invoice_line_origin_country_code' => 'CA',
'customs_quantity_units' => 'EA',
),
),
'sold_company' => 'Acme Inc.',
'sold_name' => 'John Doe',
'sold_tax_id' => '123abc',
'sold_phone' => '1231231234',
'sold_addr1' => '2000 Meadowvale Rd',
'sold_city' => 'Toronto',
'sold_state' => 'ON',
'sold_code' => 'M1B5K7',
'sold_country' => 'CA',
'service' => '14',
'shipper' => 'John Doe',
'ship_contact' => 'John Doe',
'ship_addr1' => '2000 Meadowvale Rd',
'ship_city' => 'Toronto',
'ship_state' => 'ON',
'ship_code' => 'M1B5K7',
'ship_country' => 'CA',
'ship_phone' => '1231231234',
'to_attention_name' => 'John Doe',
'to_name' => 'John Doe',
'to_addr1' => '2300 Southern Blvd',
'to_state' => 'NY',
'to_city' => 'Bronx',
'to_code' => '10460',
'to_country' => 'US',
'to_phone' => '1231231234',
'image_type' => 'PNG',
'shipment_description' => 'xxx',
'packaging_type' => '01',
'pickup_type' => '02',
'weight_unit' => 'LBS',
'length_unit' => 'IN',
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS-REST',
'params': {'account_number': 'YOUR_ACCOUNT',
'currency': 'CAD',
'customs': [{'customs_quantity_units': 'EA',
'invoice_line_description': 'My Description',
'invoice_line_number': '1',
'invoice_line_origin_country_code': 'CA',
'invoice_line_part_number': '123',
'invoice_line_value': '1'}],
'customs_forms': '01',
'documents_only': True,
'image_type': 'PNG',
'invoice_date': '20160910',
'invoice_line_total': 100,
'key': 'your-key-from-authenticate-request',
'length_unit': 'IN',
'packages': [{'reference_code': 'TN',
'reference_value': '12345678',
'weight': 1}],
'packaging_type': '01',
'pickup_type': '02',
'reason_for_export': 'SALE',
'service': '14',
'ship_addr1': '2000 Meadowvale Rd',
'ship_city': 'Toronto',
'ship_code': 'M1B5K7',
'ship_contact': 'John Doe',
'ship_country': 'CA',
'ship_phone': '1231231234',
'ship_state': 'ON',
'shipment_description': 'xxx',
'shipper': 'John Doe',
'sold_addr1': '2000 Meadowvale Rd',
'sold_city': 'Toronto',
'sold_code': 'M1B5K7',
'sold_company': 'Acme Inc.',
'sold_country': 'CA',
'sold_name': 'John Doe',
'sold_phone': '1231231234',
'sold_state': 'ON',
'sold_tax_id': '123abc',
'test': True,
'to_addr1': '2300 Southern Blvd',
'to_attention_name': 'John Doe',
'to_city': 'Bronx',
'to_code': '10460',
'to_country': 'US',
'to_name': 'John Doe',
'to_phone': '1231231234',
'to_state': 'NY',
'weight_unit': 'LBS'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"SubmitShipment",
"params"=>
{"key"=>"your-key-from-authenticate-request",
"test"=>true,
"account_number"=>"YOUR_ACCOUNT",
"customs_forms"=>"01",
"currency"=>"CAD",
"invoice_date"=>"20160910",
"reason_for_export"=>"SALE",
"invoice_line_total"=>100,
"documents_only"=>true,
"packages"=>
[{"weight"=>1, "reference_code"=>"TN", "reference_value"=>"12345678"}],
"customs"=>
[{"invoice_line_number"=>"1",
"invoice_line_part_number"=>"123",
"invoice_line_description"=>"My Description",
"invoice_line_value"=>"1",
"invoice_line_origin_country_code"=>"CA",
"customs_quantity_units"=>"EA"}],
"sold_company"=>"Acme Inc.",
"sold_name"=>"John Doe",
"sold_tax_id"=>"123abc",
"sold_phone"=>"1231231234",
"sold_addr1"=>"2000 Meadowvale Rd",
"sold_city"=>"Toronto",
"sold_state"=>"ON",
"sold_code"=>"M1B5K7",
"sold_country"=>"CA",
"service"=>"14",
"shipper"=>"John Doe",
"ship_contact"=>"John Doe",
"ship_addr1"=>"2000 Meadowvale Rd",
"ship_city"=>"Toronto",
"ship_state"=>"ON",
"ship_code"=>"M1B5K7",
"ship_country"=>"CA",
"ship_phone"=>"1231231234",
"to_attention_name"=>"John Doe",
"to_name"=>"John Doe",
"to_addr1"=>"2300 Southern Blvd",
"to_state"=>"NY",
"to_city"=>"Bronx",
"to_code"=>"10460",
"to_country"=>"US",
"to_phone"=>"1231231234",
"image_type"=>"PNG",
"shipment_description"=>"xxx",
"packaging_type"=>"01",
"pickup_type"=>"02",
"weight_unit"=>"LBS",
"length_unit"=>"IN"}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"key": "your-key-from-authenticate-request",
"test": true,
"account_number": "YOUR_ACCOUNT",
"customs_forms": "01",
"currency": "CAD",
"invoice_date": "20160910",
"reason_for_export": "SALE",
"invoice_line_total": 100,
"documents_only": true,
"packages": [
{
"weight": 1,
"reference_code": "TN",
"reference_value": "12345678"
}
],
"customs": [
{
"invoice_line_number": "1",
"invoice_line_part_number": "123",
"invoice_line_description": "My Description",
"invoice_line_value": "1",
"invoice_line_origin_country_code": "CA",
"customs_quantity_units": "EA"
}
],
"sold_company": "Acme Inc.",
"sold_name": "John Doe",
"sold_tax_id": "123abc",
"sold_phone": "1231231234",
"sold_addr1": "2000 Meadowvale Rd",
"sold_city": "Toronto",
"sold_state": "ON",
"sold_code": "M1B5K7",
"sold_country": "CA",
"service": "14",
"shipper": "John Doe",
"ship_contact": "John Doe",
"ship_addr1": "2000 Meadowvale Rd",
"ship_city": "Toronto",
"ship_state": "ON",
"ship_code": "M1B5K7",
"ship_country": "CA",
"ship_phone": "1231231234",
"to_attention_name": "John Doe",
"to_name": "John Doe",
"to_addr1": "2300 Southern Blvd",
"to_state": "NY",
"to_city": "Bronx",
"to_code": "10460",
"to_country": "US",
"to_phone": "1231231234",
"image_type": "PNG",
"shipment_description": "xxx",
"packaging_type": "01",
"pickup_type": "02",
"weight_unit": "LBS",
"length_unit": "IN"
}
}
)