{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"account_number": "YOURACCOUNT",
"trade_terms": "DDP",
"packages": [
{
"weight": 0.23,
"length": 6,
"width": 10,
"height": 1,
"signature_type": "",
"reference_code": "PO",
"reference_value": "1234567890",
"reference_barcode": true
}
],
"service": "11",
"customs_forms": "01,04",
"currency": "USD",
"invoice_date": "20250112",
"invoice_line_total": 0.01,
"reason_for_export": "SALE",
"invoice": "1234567890",
"sold_company": "Acme Inc",
"sold_name": "John Doe",
"sold_addr1": "123 Main St",
"sold_addr2": "N\/A",
"sold_city": "Brossard",
"sold_state": "QC",
"sold_code": "J4X2H5",
"sold_country": "CA",
"sold_phone": "1239238780",
"shipper": "Acme Inc",
"ship_contact": "Acme Inc",
"ship_name": "Acme Inc",
"ship_addr1": "123 Main St",
"ship_addr2": null,
"ship_city": "Boca Raton",
"ship_state": "FL",
"ship_code": "33487",
"ship_phone": "1239488932",
"ship_country": "US",
"to_name": "John Doe",
"to_attention_name": "John Doe",
"to_addr1": "123 Main St",
"to_addr2": "N\/A",
"to_state": "QC",
"to_city": "Brossard",
"to_phone": "1239238780",
"to_code": "J4X2H5",
"to_country": "CA",
"addons": null,
"accessorials": null,
"shipment_description": "Acme Inc",
"weight_unit": "LB",
"image_type": "ZPL",
"length_unit": "IN",
"negotiated_rates": true,
"test": true,
"producer_name": "Acme Inc",
"producer_addr1": "123 Main St",
"producer_city": "Whitehall",
"producer_state": "MT",
"producer_code": "59759",
"producer_country": "US",
"customs": [
{
"invoice_line_number": 1,
"invoice_line_part_number": "5729",
"invoice_line_description": "East Coast Tobacco Concentrated Fla",
"invoice_line_value": "8.00",
"invoice_line_origin_country_code": "US",
"customs_quantity_units": "PCS",
"commodity_code": "210690",
"net_cost_code": "NO",
"preference_criteria": "A",
"producer_info": "YES"
},
{
"invoice_line_number": 2,
"invoice_line_part_number": "35826",
"invoice_line_description": "Virginia Concentrated Flavoring - 1",
"invoice_line_value": "10.00",
"invoice_line_origin_country_code": "US",
"customs_quantity_units": "PCS",
"commodity_code": "210690",
"net_cost_code": "NO",
"preference_criteria": "A",
"producer_info": "YES"
}
]
}
}
<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
'carrier' => 'UPS-REST',
'action' => 'SubmitShipment',
'params' =>
array (
'account_number' => 'YOURACCOUNT',
'trade_terms' => 'DDP',
'packages' =>
array (
0 =>
array (
'weight' => 0.23,
'length' => 6,
'width' => 10,
'height' => 1,
'signature_type' => '',
'reference_code' => 'PO',
'reference_value' => '1234567890',
'reference_barcode' => true,
),
),
'service' => '11',
'customs_forms' => '01,04',
'currency' => 'USD',
'invoice_date' => '20250112',
'invoice_line_total' => 0.01,
'reason_for_export' => 'SALE',
'invoice' => '1234567890',
'sold_company' => 'Acme Inc',
'sold_name' => 'John Doe',
'sold_addr1' => '123 Main St',
'sold_addr2' => 'N/A',
'sold_city' => 'Brossard',
'sold_state' => 'QC',
'sold_code' => 'J4X2H5',
'sold_country' => 'CA',
'sold_phone' => '1239238780',
'shipper' => 'Acme Inc',
'ship_contact' => 'Acme Inc',
'ship_name' => 'Acme Inc',
'ship_addr1' => '123 Main St',
'ship_addr2' => NULL,
'ship_city' => 'Boca Raton',
'ship_state' => 'FL',
'ship_code' => '33487',
'ship_phone' => '1239488932',
'ship_country' => 'US',
'to_name' => 'John Doe',
'to_attention_name' => 'John Doe',
'to_addr1' => '123 Main St',
'to_addr2' => 'N/A',
'to_state' => 'QC',
'to_city' => 'Brossard',
'to_phone' => '1239238780',
'to_code' => 'J4X2H5',
'to_country' => 'CA',
'addons' => NULL,
'accessorials' => NULL,
'shipment_description' => 'Acme Inc',
'weight_unit' => 'LB',
'image_type' => 'ZPL',
'length_unit' => 'IN',
'negotiated_rates' => true,
'test' => true,
'producer_name' => 'Acme Inc',
'producer_addr1' => '123 Main St',
'producer_city' => 'Whitehall',
'producer_state' => 'MT',
'producer_code' => '59759',
'producer_country' => 'US',
'customs' =>
array (
0 =>
array (
'invoice_line_number' => 1,
'invoice_line_part_number' => '5729',
'invoice_line_description' => 'East Coast Tobacco Concentrated Fla',
'invoice_line_value' => '8.00',
'invoice_line_origin_country_code' => 'US',
'customs_quantity_units' => 'PCS',
'commodity_code' => '210690',
'net_cost_code' => 'NO',
'preference_criteria' => 'A',
'producer_info' => 'YES',
),
1 =>
array (
'invoice_line_number' => 2,
'invoice_line_part_number' => '35826',
'invoice_line_description' => 'Virginia Concentrated Flavoring - 1',
'invoice_line_value' => '10.00',
'invoice_line_origin_country_code' => 'US',
'customs_quantity_units' => 'PCS',
'commodity_code' => '210690',
'net_cost_code' => 'NO',
'preference_criteria' => 'A',
'producer_info' => 'YES',
),
),
),
)
);
rs.request(
{'action': 'SubmitShipment',
'carrier': 'UPS-REST',
'params': {'accessorials': None,
'account_number': 'YOURACCOUNT',
'addons': None,
'currency': 'USD',
'customs': [{'commodity_code': '210690',
'customs_quantity_units': 'PCS',
'invoice_line_description': 'East Coast Tobacco '
'Concentrated Fla',
'invoice_line_number': 1,
'invoice_line_origin_country_code': 'US',
'invoice_line_part_number': '5729',
'invoice_line_value': '8.00',
'net_cost_code': 'NO',
'preference_criteria': 'A',
'producer_info': 'YES'},
{'commodity_code': '210690',
'customs_quantity_units': 'PCS',
'invoice_line_description': 'Virginia Concentrated '
'Flavoring - 1',
'invoice_line_number': 2,
'invoice_line_origin_country_code': 'US',
'invoice_line_part_number': '35826',
'invoice_line_value': '10.00',
'net_cost_code': 'NO',
'preference_criteria': 'A',
'producer_info': 'YES'}],
'customs_forms': '01,04',
'image_type': 'ZPL',
'invoice': '1234567890',
'invoice_date': '20250112',
'invoice_line_total': 0.01,
'length_unit': 'IN',
'negotiated_rates': True,
'packages': [{'height': 1,
'length': 6,
'reference_barcode': True,
'reference_code': 'PO',
'reference_value': '1234567890',
'signature_type': '',
'weight': 0.23,
'width': 10}],
'producer_addr1': '123 Main St',
'producer_city': 'Whitehall',
'producer_code': '59759',
'producer_country': 'US',
'producer_name': 'Acme Inc',
'producer_state': 'MT',
'reason_for_export': 'SALE',
'service': '11',
'ship_addr1': '123 Main St',
'ship_addr2': None,
'ship_city': 'Boca Raton',
'ship_code': '33487',
'ship_contact': 'Acme Inc',
'ship_country': 'US',
'ship_name': 'Acme Inc',
'ship_phone': '1239488932',
'ship_state': 'FL',
'shipment_description': 'Acme Inc',
'shipper': 'Acme Inc',
'sold_addr1': '123 Main St',
'sold_addr2': 'N/A',
'sold_city': 'Brossard',
'sold_code': 'J4X2H5',
'sold_company': 'Acme Inc',
'sold_country': 'CA',
'sold_name': 'John Doe',
'sold_phone': '1239238780',
'sold_state': 'QC',
'test': True,
'to_addr1': '123 Main St',
'to_addr2': 'N/A',
'to_attention_name': 'John Doe',
'to_city': 'Brossard',
'to_code': 'J4X2H5',
'to_country': 'CA',
'to_name': 'John Doe',
'to_phone': '1239238780',
'to_state': 'QC',
'trade_terms': 'DDP',
'weight_unit': 'LB'}}
)
rs.request(
{"carrier"=>"UPS-REST",
"action"=>"SubmitShipment",
"params"=>
{"account_number"=>"YOURACCOUNT",
"trade_terms"=>"DDP",
"packages"=>
[{"weight"=>0.23,
"length"=>6,
"width"=>10,
"height"=>1,
"signature_type"=>"",
"reference_code"=>"PO",
"reference_value"=>"1234567890",
"reference_barcode"=>true}],
"service"=>"11",
"customs_forms"=>"01,04",
"currency"=>"USD",
"invoice_date"=>"20250112",
"invoice_line_total"=>0.01,
"reason_for_export"=>"SALE",
"invoice"=>"1234567890",
"sold_company"=>"Acme Inc",
"sold_name"=>"John Doe",
"sold_addr1"=>"123 Main St",
"sold_addr2"=>"N/A",
"sold_city"=>"Brossard",
"sold_state"=>"QC",
"sold_code"=>"J4X2H5",
"sold_country"=>"CA",
"sold_phone"=>"1239238780",
"shipper"=>"Acme Inc",
"ship_contact"=>"Acme Inc",
"ship_name"=>"Acme Inc",
"ship_addr1"=>"123 Main St",
"ship_addr2"=>nil,
"ship_city"=>"Boca Raton",
"ship_state"=>"FL",
"ship_code"=>"33487",
"ship_phone"=>"1239488932",
"ship_country"=>"US",
"to_name"=>"John Doe",
"to_attention_name"=>"John Doe",
"to_addr1"=>"123 Main St",
"to_addr2"=>"N/A",
"to_state"=>"QC",
"to_city"=>"Brossard",
"to_phone"=>"1239238780",
"to_code"=>"J4X2H5",
"to_country"=>"CA",
"addons"=>nil,
"accessorials"=>nil,
"shipment_description"=>"Acme Inc",
"weight_unit"=>"LB",
"image_type"=>"ZPL",
"length_unit"=>"IN",
"negotiated_rates"=>true,
"test"=>true,
"producer_name"=>"Acme Inc",
"producer_addr1"=>"123 Main St",
"producer_city"=>"Whitehall",
"producer_state"=>"MT",
"producer_code"=>"59759",
"producer_country"=>"US",
"customs"=>
[{"invoice_line_number"=>1,
"invoice_line_part_number"=>"5729",
"invoice_line_description"=>"East Coast Tobacco Concentrated Fla",
"invoice_line_value"=>"8.00",
"invoice_line_origin_country_code"=>"US",
"customs_quantity_units"=>"PCS",
"commodity_code"=>"210690",
"net_cost_code"=>"NO",
"preference_criteria"=>"A",
"producer_info"=>"YES"},
{"invoice_line_number"=>2,
"invoice_line_part_number"=>"35826",
"invoice_line_description"=>"Virginia Concentrated Flavoring - 1",
"invoice_line_value"=>"10.00",
"invoice_line_origin_country_code"=>"US",
"customs_quantity_units"=>"PCS",
"commodity_code"=>"210690",
"net_cost_code"=>"NO",
"preference_criteria"=>"A",
"producer_info"=>"YES"}]}}
)
rocketshipit.request(
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"account_number": "YOURACCOUNT",
"trade_terms": "DDP",
"packages": [
{
"weight": 0.23,
"length": 6,
"width": 10,
"height": 1,
"signature_type": "",
"reference_code": "PO",
"reference_value": "1234567890",
"reference_barcode": true
}
],
"service": "11",
"customs_forms": "01,04",
"currency": "USD",
"invoice_date": "20250112",
"invoice_line_total": 0.01,
"reason_for_export": "SALE",
"invoice": "1234567890",
"sold_company": "Acme Inc",
"sold_name": "John Doe",
"sold_addr1": "123 Main St",
"sold_addr2": "N\/A",
"sold_city": "Brossard",
"sold_state": "QC",
"sold_code": "J4X2H5",
"sold_country": "CA",
"sold_phone": "1239238780",
"shipper": "Acme Inc",
"ship_contact": "Acme Inc",
"ship_name": "Acme Inc",
"ship_addr1": "123 Main St",
"ship_addr2": null,
"ship_city": "Boca Raton",
"ship_state": "FL",
"ship_code": "33487",
"ship_phone": "1239488932",
"ship_country": "US",
"to_name": "John Doe",
"to_attention_name": "John Doe",
"to_addr1": "123 Main St",
"to_addr2": "N\/A",
"to_state": "QC",
"to_city": "Brossard",
"to_phone": "1239238780",
"to_code": "J4X2H5",
"to_country": "CA",
"addons": null,
"accessorials": null,
"shipment_description": "Acme Inc",
"weight_unit": "LB",
"image_type": "ZPL",
"length_unit": "IN",
"negotiated_rates": true,
"test": true,
"producer_name": "Acme Inc",
"producer_addr1": "123 Main St",
"producer_city": "Whitehall",
"producer_state": "MT",
"producer_code": "59759",
"producer_country": "US",
"customs": [
{
"invoice_line_number": 1,
"invoice_line_part_number": "5729",
"invoice_line_description": "East Coast Tobacco Concentrated Fla",
"invoice_line_value": "8.00",
"invoice_line_origin_country_code": "US",
"customs_quantity_units": "PCS",
"commodity_code": "210690",
"net_cost_code": "NO",
"preference_criteria": "A",
"producer_info": "YES"
},
{
"invoice_line_number": 2,
"invoice_line_part_number": "35826",
"invoice_line_description": "Virginia Concentrated Flavoring - 1",
"invoice_line_value": "10.00",
"invoice_line_origin_country_code": "US",
"customs_quantity_units": "PCS",
"commodity_code": "210690",
"net_cost_code": "NO",
"preference_criteria": "A",
"producer_info": "YES"
}
]
}
}
)