UPS-REST - Label DDP/DDU

Carrier: UPS-REST
Action: Label DDP/DDU
Description: Example implementation for UPS-REST Label DDP/DDU
{
  "carrier": "UPS-REST",
  "action": "SubmitShipment",
  "params": {
    "key": "your-key-from-authenticate-request",
    "test": true,
    "trade_terms": "DDP",
    "master_carton": true,
    "customs_forms": "03",
    "currency": "CAD",
    "invoice_date": "20170610",
    "reason_for_export": "SALE",
    "invoice_line_total": 100,
    "packages": [
      {
        "weight": 1,
        "length": 1,
        "width": 1,
        "height": 1,
        "reference_code": "TN",
        "reference_value": "12345678"
      }
    ],
    "customs": [
      {
        "invoice_line_number": "1",
        "invoice_line_part_number": "123",
        "invoice_line_description": "My Description",
        "invoice_line_value": "1",
        "invoice_line_origin_country_code": "CA",
        "customs_quantity_units": "EA",
        "commodity_code": "240110"
      }
    ],
    "invoice": "12345",
    "sold_company": "Acme Inc.",
    "sold_name": "John Doe",
    "sold_tax_id": "123abc",
    "sold_phone": "1231231234",
    "sold_addr1": "2000 Meadowvale Rd",
    "sold_city": "Toronto",
    "sold_state": "ON",
    "sold_code": "M1B5K7",
    "sold_country": "CA",
    "service": "07",
    "shipper": "John Doe",
    "ship_contact": "John Doe",
    "ship_name": "John Doe",
    "ship_addr1": "2300 Southern Blvd",
    "ship_state": "NY",
    "ship_city": "Bronx",
    "ship_code": "10460",
    "ship_country": "US",
    "ship_phone": "1231231234",
    "to_company": "Acme Inc.",
    "to_attention_name": "John Doe",
    "to_addr1": "2000 Meadowvale Rd",
    "to_city": "Toronto",
    "to_state": "ON",
    "to_code": "M1B5K7",
    "to_country": "CA",
    "to_phone": "1231231234",
    "image_type": "PNG",
    "shipment_description": "xxx",
    "packaging_type": "02",
    "pickup_type": "02",
    "weight_unit": "LBS",
    "length_unit": "IN"
  }
}

<?php
$rs = new RocketShipIt;
$response = $rs->request(
array (
  'carrier' => 'UPS-REST',
  'action' => 'SubmitShipment',
  'params' => 
  array (
    'key' => 'your-key-from-authenticate-request',
    'test' => true,
    'trade_terms' => 'DDP',
    'master_carton' => true,
    'customs_forms' => '03',
    'currency' => 'CAD',
    'invoice_date' => '20170610',
    'reason_for_export' => 'SALE',
    'invoice_line_total' => 100,
    'packages' => 
    array (
      0 => 
      array (
        'weight' => 1,
        'length' => 1,
        'width' => 1,
        'height' => 1,
        'reference_code' => 'TN',
        'reference_value' => '12345678',
      ),
    ),
    'customs' => 
    array (
      0 => 
      array (
        'invoice_line_number' => '1',
        'invoice_line_part_number' => '123',
        'invoice_line_description' => 'My Description',
        'invoice_line_value' => '1',
        'invoice_line_origin_country_code' => 'CA',
        'customs_quantity_units' => 'EA',
        'commodity_code' => '240110',
      ),
    ),
    'invoice' => '12345',
    'sold_company' => 'Acme Inc.',
    'sold_name' => 'John Doe',
    'sold_tax_id' => '123abc',
    'sold_phone' => '1231231234',
    'sold_addr1' => '2000 Meadowvale Rd',
    'sold_city' => 'Toronto',
    'sold_state' => 'ON',
    'sold_code' => 'M1B5K7',
    'sold_country' => 'CA',
    'service' => '07',
    'shipper' => 'John Doe',
    'ship_contact' => 'John Doe',
    'ship_name' => 'John Doe',
    'ship_addr1' => '2300 Southern Blvd',
    'ship_state' => 'NY',
    'ship_city' => 'Bronx',
    'ship_code' => '10460',
    'ship_country' => 'US',
    'ship_phone' => '1231231234',
    'to_company' => 'Acme Inc.',
    'to_attention_name' => 'John Doe',
    'to_addr1' => '2000 Meadowvale Rd',
    'to_city' => 'Toronto',
    'to_state' => 'ON',
    'to_code' => 'M1B5K7',
    'to_country' => 'CA',
    'to_phone' => '1231231234',
    'image_type' => 'PNG',
    'shipment_description' => 'xxx',
    'packaging_type' => '02',
    'pickup_type' => '02',
    'weight_unit' => 'LBS',
    'length_unit' => 'IN',
  ),
)
);

rs.request(
  {'action': 'SubmitShipment',
 'carrier': 'UPS-REST',
 'params': {'currency': 'CAD',
            'customs': [{'commodity_code': '240110',
                         'customs_quantity_units': 'EA',
                         'invoice_line_description': 'My Description',
                         'invoice_line_number': '1',
                         'invoice_line_origin_country_code': 'CA',
                         'invoice_line_part_number': '123',
                         'invoice_line_value': '1'}],
            'customs_forms': '03',
            'image_type': 'PNG',
            'invoice': '12345',
            'invoice_date': '20170610',
            'invoice_line_total': 100,
            'key': 'your-key-from-authenticate-request',
            'length_unit': 'IN',
            'master_carton': True,
            'packages': [{'height': 1,
                          'length': 1,
                          'reference_code': 'TN',
                          'reference_value': '12345678',
                          'weight': 1,
                          'width': 1}],
            'packaging_type': '02',
            'pickup_type': '02',
            'reason_for_export': 'SALE',
            'service': '07',
            'ship_addr1': '2300 Southern Blvd',
            'ship_city': 'Bronx',
            'ship_code': '10460',
            'ship_contact': 'John Doe',
            'ship_country': 'US',
            'ship_name': 'John Doe',
            'ship_phone': '1231231234',
            'ship_state': 'NY',
            'shipment_description': 'xxx',
            'shipper': 'John Doe',
            'sold_addr1': '2000 Meadowvale Rd',
            'sold_city': 'Toronto',
            'sold_code': 'M1B5K7',
            'sold_company': 'Acme Inc.',
            'sold_country': 'CA',
            'sold_name': 'John Doe',
            'sold_phone': '1231231234',
            'sold_state': 'ON',
            'sold_tax_id': '123abc',
            'test': True,
            'to_addr1': '2000 Meadowvale Rd',
            'to_attention_name': 'John Doe',
            'to_city': 'Toronto',
            'to_code': 'M1B5K7',
            'to_company': 'Acme Inc.',
            'to_country': 'CA',
            'to_phone': '1231231234',
            'to_state': 'ON',
            'trade_terms': 'DDP',
            'weight_unit': 'LBS'}}

)

rs.request(
  {"carrier"=>"UPS-REST",
 "action"=>"SubmitShipment",
 "params"=>
  {"key"=>"your-key-from-authenticate-request",
   "test"=>true,
   "trade_terms"=>"DDP",
   "master_carton"=>true,
   "customs_forms"=>"03",
   "currency"=>"CAD",
   "invoice_date"=>"20170610",
   "reason_for_export"=>"SALE",
   "invoice_line_total"=>100,
   "packages"=>
    [{"weight"=>1,
      "length"=>1,
      "width"=>1,
      "height"=>1,
      "reference_code"=>"TN",
      "reference_value"=>"12345678"}],
   "customs"=>
    [{"invoice_line_number"=>"1",
      "invoice_line_part_number"=>"123",
      "invoice_line_description"=>"My Description",
      "invoice_line_value"=>"1",
      "invoice_line_origin_country_code"=>"CA",
      "customs_quantity_units"=>"EA",
      "commodity_code"=>"240110"}],
   "invoice"=>"12345",
   "sold_company"=>"Acme Inc.",
   "sold_name"=>"John Doe",
   "sold_tax_id"=>"123abc",
   "sold_phone"=>"1231231234",
   "sold_addr1"=>"2000 Meadowvale Rd",
   "sold_city"=>"Toronto",
   "sold_state"=>"ON",
   "sold_code"=>"M1B5K7",
   "sold_country"=>"CA",
   "service"=>"07",
   "shipper"=>"John Doe",
   "ship_contact"=>"John Doe",
   "ship_name"=>"John Doe",
   "ship_addr1"=>"2300 Southern Blvd",
   "ship_state"=>"NY",
   "ship_city"=>"Bronx",
   "ship_code"=>"10460",
   "ship_country"=>"US",
   "ship_phone"=>"1231231234",
   "to_company"=>"Acme Inc.",
   "to_attention_name"=>"John Doe",
   "to_addr1"=>"2000 Meadowvale Rd",
   "to_city"=>"Toronto",
   "to_state"=>"ON",
   "to_code"=>"M1B5K7",
   "to_country"=>"CA",
   "to_phone"=>"1231231234",
   "image_type"=>"PNG",
   "shipment_description"=>"xxx",
   "packaging_type"=>"02",
   "pickup_type"=>"02",
   "weight_unit"=>"LBS",
   "length_unit"=>"IN"}}

)

rocketshipit.request(
  {
  "carrier": "UPS-REST",
  "action": "SubmitShipment",
  "params": {
    "key": "your-key-from-authenticate-request",
    "test": true,
    "trade_terms": "DDP",
    "master_carton": true,
    "customs_forms": "03",
    "currency": "CAD",
    "invoice_date": "20170610",
    "reason_for_export": "SALE",
    "invoice_line_total": 100,
    "packages": [
      {
        "weight": 1,
        "length": 1,
        "width": 1,
        "height": 1,
        "reference_code": "TN",
        "reference_value": "12345678"
      }
    ],
    "customs": [
      {
        "invoice_line_number": "1",
        "invoice_line_part_number": "123",
        "invoice_line_description": "My Description",
        "invoice_line_value": "1",
        "invoice_line_origin_country_code": "CA",
        "customs_quantity_units": "EA",
        "commodity_code": "240110"
      }
    ],
    "invoice": "12345",
    "sold_company": "Acme Inc.",
    "sold_name": "John Doe",
    "sold_tax_id": "123abc",
    "sold_phone": "1231231234",
    "sold_addr1": "2000 Meadowvale Rd",
    "sold_city": "Toronto",
    "sold_state": "ON",
    "sold_code": "M1B5K7",
    "sold_country": "CA",
    "service": "07",
    "shipper": "John Doe",
    "ship_contact": "John Doe",
    "ship_name": "John Doe",
    "ship_addr1": "2300 Southern Blvd",
    "ship_state": "NY",
    "ship_city": "Bronx",
    "ship_code": "10460",
    "ship_country": "US",
    "ship_phone": "1231231234",
    "to_company": "Acme Inc.",
    "to_attention_name": "John Doe",
    "to_addr1": "2000 Meadowvale Rd",
    "to_city": "Toronto",
    "to_state": "ON",
    "to_code": "M1B5K7",
    "to_country": "CA",
    "to_phone": "1231231234",
    "image_type": "PNG",
    "shipment_description": "xxx",
    "packaging_type": "02",
    "pickup_type": "02",
    "weight_unit": "LBS",
    "length_unit": "IN"
  }
}
)
← Back to All Examples

Other UPS-REST Examples

Address Validation
Example implementation for UPS-REST Address Validation
Address Validation City/State from Zip
Example implementation for UPS-REST Address Validation City/State from Zip
Authenticate
Example implementation for UPS-REST Authenticate
Download CSV
Example implementation for UPS-REST Download CSV
International w/ Com. Inv.
Example implementation for UPS-REST International w/ Com. Inv.
International w/ Com. Inv. with EEI
Example implementation for UPS-REST International w/ Com. Inv. with EEI
Label
Example implementation for UPS-REST Label
Label Additional Handling
Example implementation for UPS-REST Label Additional Handling
Label COD
Example implementation for UPS-REST Label COD
Label Direct Adult Signature
Example implementation for UPS-REST Label Direct Adult Signature
Label Direct Delivery Only
Example implementation for UPS-REST Label Direct Delivery Only
Label Direct Signature
Example implementation for UPS-REST Label Direct Signature
Label Email Notifications
Example implementation for UPS-REST Label Email Notifications
Label Ground Freight Pricing
Example implementation for UPS-REST Label Ground Freight Pricing
Label Insurance
Example implementation for UPS-REST Label Insurance
Label Lithium Battery
Example implementation for UPS-REST Label Lithium Battery
Label Mail Innovations
Example implementation for UPS-REST Label Mail Innovations
Label NAFTA CO
Example implementation for UPS-REST Label NAFTA CO
Label Recovery
Example implementation for UPS-REST Label Recovery
Label Reference Values
Example implementation for UPS-REST Label Reference Values
Label Return
Example implementation for UPS-REST Label Return
Label Return w/ Email Delivery
Example implementation for UPS-REST Label Return w/ Email Delivery
Label SurePost
Example implementation for UPS-REST Label SurePost
Label Third Party Billing
Example implementation for UPS-REST Label Third Party Billing
Label With Promo Discount
Example implementation for UPS-REST Label With Promo Discount
Label w/ Access Point
Example implementation for UPS-REST Label w/ Access Point
Letter International w/ Com. Inv.
Example implementation for UPS-REST Letter International w/ Com. Inv.
Locator
Example implementation for UPS-REST Locator
Pickup Cancel
Example implementation for UPS-REST Pickup Cancel
Pickup Rate
Example implementation for UPS-REST Pickup Rate
Pickup Schedule
Example implementation for UPS-REST Pickup Schedule
Pickup Status
Example implementation for UPS-REST Pickup Status
Pickup Status Oncall
Example implementation for UPS-REST Pickup Status Oncall
Rates
Example implementation for UPS-REST Rates
Rates Additional Handling
Example implementation for UPS-REST Rates Additional Handling
Rates COD
Example implementation for UPS-REST Rates COD
Rates Daily
Example implementation for UPS-REST Rates Daily
Rates Ground Freight Pricing
Example implementation for UPS-REST Rates Ground Freight Pricing
Rates International
Example implementation for UPS-REST Rates International
Rates Negotiated
Example implementation for UPS-REST Rates Negotiated
Rates Retail
Example implementation for UPS-REST Rates Retail
Rates Simple Rate
Example implementation for UPS-REST Rates Simple Rate
Rates Single
Example implementation for UPS-REST Rates Single
Rates SurePost
Example implementation for UPS-REST Rates SurePost
Rates with Return Service
Example implementation for UPS-REST Rates with Return Service
Rating w/ Access Point
Example implementation for UPS-REST Rating w/ Access Point
Time in Transit
Example implementation for UPS-REST Time in Transit
Time in Transit International
Example implementation for UPS-REST Time in Transit International
Track Alert (webhook)
Example implementation for UPS-REST Track Alert (webhook)
Track Alert Multiple (webhook)
Example implementation for UPS-REST Track Alert Multiple (webhook)
Tracking
Example implementation for UPS-REST Tracking
Tracking Mail Innovations
Example implementation for UPS-REST Tracking Mail Innovations
Upload Customs Document
Example implementation for UPS-REST Upload Customs Document
Upload Link Customs Document
Example implementation for UPS-REST Upload Link Customs Document
Void Shipment
Example implementation for UPS-REST Void Shipment