UPS-REST - Label NAFTA CO

Carrier: UPS-REST
Action: Label NAFTA CO
Description: Example implementation for UPS-REST Label NAFTA CO
{
  "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"
      }
    ]
  }
}
)
← 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 DDP/DDU
Example implementation for UPS-REST Label DDP/DDU
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 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