API Reference | ReDoc

TradeDirect

The TradeDirect Shipments API facilitates the management of external trade shipments within the TradeDirect system, providing robust endpoints for creating, managing, and finalizing international and domestic shipments. This includes deleting master, small package, and LTL shipments, as well as closing out master shipments to ensure seamless trade operations.

Key Benefits Value

  • Streamlined External Trade Management: Simplify the process of creating and managing international and domestic shipments with a unified API.
    • Secure Access: OAuth2 and JWT-based authentication ensure secure and reliable API usage for global trade operations.
    • Flexible Shipment Handling: Provides the ability to delete small package and LTL shipments, ensuring efficient management of shipment records across borders.
    • Comprehensive Shipment Closure: Enables closing out master shipments, ensuring proper finalization of shipment processes for external trade.

Reference

Delete master shipment

This API allows users to delete a master shipment identified by a unique shipment identifier (USI) and the shipper's account number. The master shipment and its associated child shipments will be permanently removed.

Request
path Parameters
version
required
string
Default: "v1"

version

Value: "v1"
usi-number
required
string^(?:[0-9]{10}|[0-9]{9}T)$

The unique shipment identifier (USI) is used to create Master, LTL and Child shipments. Used for Freight shipments.

Example: 578299028T
query Parameters
shipper_account_number
required
string^[A-Z0-9]{6}$

The unique shipment identifier (USI) is used to create Master, LTL and Child shipments. Used for Freight shipments.

Example: shipper_account_number=1234WW
header Parameters
transId
required
string

An identifier unique to the request.

Example: XZ345445668
transactionSrc
required
string

Identifies the client/source application that is calling.

Example: XOLT
Responses
204

Master shipment deleted successfully

400

Missing or Invalid parameter

401

Invalid Authentication Information

404

Resource not found

500

Internal Server Error

delete/ship/tradedirect/{version}/master-shipments/{usi-number}
Request samples
Response samples
application/json
{
  • "response": {
    }
}

Delete small package shipment

Deletes a small package child shipment identified by a unique shipment identifier (USI) representing the master shipment and the shipment's tracking number.

Request
path Parameters
version
required
string
Default: "v1"

version

Value: "v1"
usi-number
required
string^(?:[0-9]{10}|[0-9]{9}T)$

The unique shipment identifier (USI) is used to create Master, LTL and Child shipments. Used for Freight shipments.

Example: 578299028T
tracking-number
required
string^[A-Z0-9]{18}$

UPS Tracking Number

Example: 1Z1388YY0316063678
header Parameters
transId
required
string
Example: XZ345445668
transactionSrc
required
string

Identifies the client/source application that is calling.

Example: XOLT
Responses
204

child shipment deleted successfully

400

Missing or Invalid parameter

401

Invalid Authentication Information

404

Resource not found

500

Internal Server Error

delete/ship/tradedirect/{version}/master-shipments/{usi-number}/child-shipments/{tracking-number}
Request samples
Response samples
application/json
{
  • "response": {
    }
}

Closeout a Master Shipment

Transitions a master shipment to a closed state, finalizing its processing. Identified by a unique shipment identifier (USI).

Request
path Parameters
version
required
string
Default: "v1"

version

Value: "v1"
usi-number
required
string^(?:[0-9]{10}|[0-9]{9}T)$

The unique shipment identifier (USI) is used to create Master, LTL and Child shipments. Used for Freight shipments.

Example: 578299028T
header Parameters
transId
required
string
Example: XZ345445668
transactionSrc
required
string

Identifies the client/source application that is calling.

Example: XOLT
Request Body schema: application/json

Request payload containing shipment details required to close out a master shipment.

required
object

Contains all the details of the shipment.

required
object

Contains the account number to be used in closeout request.

accountNumber
required
string^[A-Z0-9]{6}$

The UPS account number of the shipper to be used to clouseout shipment.

Array of objects (Package) [ 0 .. 200 ] items

The list of packages in the shipment.

Array ([ 0 .. 200 ] items)
numberOfIdenticalUnits
required
integer [ 1 .. 200 ]

Number of identical units in the package/ltl.

required
object (HandlingUnits)

Used to provide information about the handling units in the package/ltl.

Responses
200

Closeout performed on the provided master shipment successfully.

207

Closeout performed on the provided master that is partial success.

400

Missing or Invalid parameter

401

Invalid Authentication Information

404

Resource not found

422

Resource not found

500

Internal Server Error

post/ship/tradedirect/{version}/master-shipments/{usi-number}/closeout
Request samples
application/json
{
  • "shipment": {
    }
}
Response samples
application/json
{
  • "invoiceLabelResponse": {
    },
  • "bolLabelResponse": {
    },
  • "palletLabelResponses": {
    }
}

Delete Less Than Truckload (LTL) child shipment

Deletes a Less Than Truckload (LTL) child shipment identified by a unique shipment identifier (USI) and a sub pro number.

Request
path Parameters
version
required
string
Default: "v1"

version

Value: "v1"
usi-number
required
string^(?:[0-9]{10}|[0-9]{9}T)$

The unique shipment identifier (USI) is used to create Master, LTL and Child shipments. Used for Freight shipments.

Example: 578299028T
sub-pro-number
required
string

A unique tracking number used for individual, smaller shipments within a larger Less-Than-Truckload (LTL) or Truckload (TL) freight shipment

Example: SBP12345
header Parameters
transId
required
string
Example: XZ345445668
transactionSrc
required
string

Identifies the client/source application that is calling.

Example: XOLT
Responses
204

LTL Child Shipment Deleted Successfully

400

Missing or Invalid parameter

401

Invalid Authentication Information

404

Resource not found

500

Internal Server Error

delete/ship/tradedirect/{version}/master-shipments/{usi-number}/ltl-child-shipments/{sub-pro-number}
Request samples
Response samples
application/json
{
  • "response": {
    }
}

Genereate Documents and Labels for LTL Shipments and Closeout

Generates documents and labels for master/ltl shipments identified by a unique shipment identifier (USI).

Request
path Parameters
version
required
string
Default: "v1"

version

Value: "v1"
header Parameters
transId
required
string
Example: XZ345445668
transactionSrc
required
string

Identifies the client/source application that is calling.

Example: XOLT
Request Body schema: application/json

Request payload containing shipment details required to generate documents

requestedDoc
required
string

The type of document requested for generation.

Code Description
CCI Consolidated Commercial Invoice
CBOL Consolidated Bill of Lading
BOL Bill of Lading
PLT Pallet Label
PKGPLT Package Pallet Label
Enum: "CCI" "CBOL" "BOL" "PLT" "PKGPLT"
docFormat
required
string

Image format type for the label requested by customer.

Code Description
ZPL ZPL format
EPL EPL format
STARPL STARPL format
SPL SPL format
PNG PNG format
PDF PDF format
GIF GIF format
Enum: "ZPL" "EPL" "STARPL" "SPL" "PNG" "PDF" "GIF"
usiNumber
required
string^(?:[0-9]{10}|[0-9]{9}T)$

The unique shipment identifier (USI) is used to create Master, LTL and Child shipments. Used for Freight shipments.

shipperAccountNumber
required
string^[A-Z0-9]{6}$

The UPS account number of the shipper that was used in clouseout shipment.

subproNumber
string^[A-Z0-9]{15,20}$

A unique tracking number used for LTL shipments.

Responses
200

Documents generated successfully for provided USI. See base64-data-samples document for data sample.

400

Missing or Invalid parameter

401

Invalid Authentication Information

404

Resource not found

422

Resource not found

500

Internal Server Error

post/ship/tradedirect/{version}/master-shipments/documents
Request samples
application/json
{
  • "requestedDoc": "BOL",
  • "docFormat": "PDF",
  • "usiNumber": "578299028T",
  • "shipperAccountNumber": "1234WW"
}
Response samples
application/json
{
  • "documents": {
    }
}