Create a CBDS International Outbound Shipment

HTTP Request

POST /v1/shipments?carrier=PBI

Summary

The PB Cross-Border Delivery Service (CBDS) provides international shipping and compliance. CBDS Outbound ships from CBDS Hubs in the U.S., Canada, and UK to international destinations.

This API creates a post-paid CBDS shipment and returns an end-to-end tracking number. The merchant’s CBDS delivery solution determines whether the API prints a label.

This page describes international outbound shipping. CBDS also provides international inbound and domestic shipping.

Prerequisites

To use this API, the merchant must first onboard with CBDS.

Testing in Sandbox

To test this API in Sandbox, use the Sandbox Client IDs listed on the Delivery Solution page. You can use the Sandbox Client IDs with any Shipper ID in your Sandbox environment.

Considerations

  1. The merchant’s delivery solution determines whether the API returns a label. Before using this API, determine the merchant’s delivery solution.

  2. The fromAddress, toAddress, and altReturnAddress objects require the following fields:

    • addressLines

    • cityTown

    • stateProvince. Required for Canadian addresses. Use the 2-letter province code.

    • postalCode. Required if the API returns a label. This field is always recommended. For additional information on destination postal codes, see Rules for Destination Postal Codes.

    • countryCode

    • name

  3. The altReturnAddress is required if the fromAddress is the wrong address for your returns. Specify the return address in the altReturnAddress object.

    Important

    By default, returns from the CBDS Hub are sent to the fromAddress. If that is not the correct return address, specify the correct return address in altReturnAddress. Failure to do so will result in a parcel being returned to the wrong address.

  4. The supported service classes depend on the country of origin (as shown below), the shipping lane, and the merchant’s delivery agreement.

    Country of Origin

    Service Class

    U.S. Outbound

    PBXPS: Standard DDP
    PBXUS: Standard DDU
    PBXPE: Expedited DDP

    UK Outbound

    PBXPS: Standard DDP

    Canada Outbound

    PBXPS: Standard DDP

  5. Do not pass a special service in the request. If you do, the service will be ignored. Note that the response might return the DelCon special service, which is a no-charge service.

  6. In the shipmentOptions array, set the following options, depending on the delivery solution:

    Shipment Option

    Required for:

    SHIPPER_ID

    All solutions

    CLIENT_ID

    Solutions that print a PB Standard label

    CLIENT_FACILITY_ID

    Solutions that print a PB Standard label

    CARRIER_FACILITY_ID

    Bulk Pickup solution,
    All Drop-Off solutions

  7. The customs.customsInfo object requires the currencyCode field. For U.S. outbound, set currencyCode to USD. For UK outbound, set currencyCode to GBP. For Canada outbound, set currencyCode to CAD.

    The API does not use the other fields in the customs.customsInfo object. If you pass them, they will be ignored.

  8. In the customs.customsItems array’s description field, provide as much detail as possible about the item and brand in order to facilitate assignment of the correct HS code. See the following examples:

    "description": "Acme AC8431 Rechargeable Hand Blender with Electric Attachments"
    
    "description": "Antique Vintage Victorian Edwardian Walnut Writing Stationery Box"
    
    "description": "Pitney Bowes 793-5 Fluorescent Red Ink Cartridge DM100 DM200"
    
  9. If shipping a HAZMAT-flagged item, enter the applicable HAZMAT classifications in the customs.customsItems array’s hazmats field. See HAZMAT-Flagged Items

  10. If using the Drop-Off to CBDS solution, which does not print a first-mile label, pass the first-mile label’s tracking number through the domesticShipmentDetails object.

    Important

    Failure to provide the tracking number will result in the parcel being unrecognized at the CBDS Hub.

  11. The API response returns:

    • The estimated charges, which include the Transportation cost and, if applicable, the Importation costs.

    • The tracking number for the parcel’s full journey, from the origin address to the international destination.

    • If applicable, the label for delivery to the CBDS Hub.

  12. If the API returns a label, the label must be used within 25 days.

Request URLs

Sandbox: https://shipping-api-sandbox.pitneybowes.com/shippingservices/v1/shipments?carrier=PBI
Production: https://shipping-api.pitneybowes.com/shippingservices/v1/shipments?carrier=PBI

Query Parameter

Name

Description

carrier

Required. Set this to PBI.

includeDeliveryCommitment

Required. If set to true, returns estimated transit time. Transit times is returned as number of days.

Valid values:

  • true

  • false

Request Headers

Name


Description

Authorization

Required. OAuth token generated using the Generate an OAuth Token API.

Content-Type

Required. The media type of the request entity. Set this to application/json.

X-PB-TransactionId

Required. A unique identifier for the transaction, up to 25 characters. The following characters are allowed: letters, numbers, hyphens (-), and underscores (_).

Important: Ensure this is unique.

X-PB-UnifiedErrorStructure

Recommended. Set this to true to use the standard error object if an error occurs.

Request / Response Elements

This POST operation sends and receives the Shipment object, described here. Required fields are marked Required. All other fields are optional, with two exceptions: 1. Fields that are marked RESPONSE ONLY appear only in the response. 2. Fields that are marked as applying only to other label types do not apply to this one.

Name


Data Type

Description

shipmentType

String

Return Labels Only. For return labels, set this to RETURN.

Required for Expedited Returns , Standard Returns, and when rating return labels. Note that you cannot rate Standard Returns.

Recommended for CBDS Returns.

fromAddress

Address Object

Required. Origin address.

If you want a different address to appear on the label from the one listed here, see this FAQ. The FAQ does not apply to PB Standard.

toAddress

Address Object

Required. Destination address.

If you are shipping to Puerto Rico or an international destination with FedEx or UPS, and if the importer is different from the final recipient, enter the address of the importer here in the toAddress object. For the address of the recipient, use the soldToAddress object. If the importer is the same as the final recipient, the toAddress and soldToAddress must match.

altReturnAddress

Address Object

For these carriers, sets an address for parcel returns:

  • PB Expedited: If you are sending an international shipment and if you have set the NON_DELIVERY_OPTION option to redirect, use this field to specify the address for a parcel return.

  • PB Presort

  • PMOD

  • CBDS Outbound & CBDS Domestic: By default, parcel returns are sent to a shipment’s fromAddress. (Parcel returns are sent from the CBDS Hub.) If the fromAddress is the wrong address for your returns, then you must use the altReturnAddress to enter the correct address for returns. Failure to do so will result returns to the wrong address.

  • FedEx

  • UPS

additionalAddresses

Array[Additional Addresses Object]

CBDS Returns Only. If the seller’s address is different from the toAddress, enter the seller’s address here.

Required if the toAddress and seller address are different.

parcel

Parcel Object

Required. Contains physical characteristics of the parcel.

rates

Array[Rates Object]

Required. Specifies the carrier, service, parcel, and other information. In a response, this field also contains the service charges.

Important: In a request, the rates array can contain only one rates object.

documents

Array[Documents Object]

Required, except as noted below. Defines the label, manifest, or other shipping document created by the API call. In a response, this array provides the URL or Base64 string for a document and in some cases can contain multiple objects.

This field does not apply to:
- Rate Parcel API.
- Create CBDS Shipment API if the merchant prints the first-mile label prior to invoking the API.

shipmentOptions

Array[Object]

Required. Each object in this array defines a shipment option. Specify each option as a name-value pair in the array.

The SHIPPER_ID option is required. For additional requirements for a carrier, see the Considerations section on the carrier’s Create Shipment page.

shipmentOptions.name

String

The name of the shipment option.

shipmentOptions.value

String

The value of the shipment option.

customs

Object

For shipments that use customs forms, this object contains the customs information.

Required in the following situations:

  • PB Expedited: Required for shipments to international destinations. Conditional for shipments to APO/FPO/DPO, U.S. Territories, and FAS, as explained in this FAQ.

  • CBDS: Required for all shipments.

  • FedEx: Required for shipments to international destinations and Puerto Rico.

  • UPS: Required for shipments to international destinations and Puerto Rico.

customs.customsInfo

Customs Info Object

Customs clearance information for the commercial invoice.

Required in the customs object.

customs.customsItems

Array[Customs Items Object]

Customs clearance information for each commodity.

Required in the customs object.

Maximum number of objects in the array: 30

domesticShipmentDetails

Domestic Shipment Details Object

CBDS Only. The first-mile label’s tracking number and other information about the first-mile leg.

Required if the merchant prints the first-mile label prior to invoking the API, as is the case with the Drop-Off to CBDS solution. Send the first-mile label’s tracking number and details.

RESPONSE ONLY for all other CBDS shipment requests.

references

Array[Object]

PB Standard & CBDS Only. The merchant’s reference fields. Each object in the array includes a name-value pair that defines a reference field. See the following, depending on your carrier:

To pass references for carriers other than the above, see How do I Add Reference Fields for My Carrier?

hazmatDetails

Hazmat Details Object

PB Standard Only. If shipping hazardous materials with PB Standard, use this object.

carrierPayments

Array[Shipment: Carrier Payments Object]

FedEx & UPS Only. Indicates that one or more of the shipment costs should be charged to a third-party account.

soldToAddress

Address Object

FedEx & UPS Only. The final recipient of a the shipment.

Required for shipments from the U.S. to Puerto Rico or international destinations. Otherwise optional.

This address must match the toAddress.countryCode, with the exception of shipments to Canada and to U.S. satellite countries.

If the final recipient’s address is the same as the importer’s address, the entries in the soldToAddress object must match the entries in the toAddress object.

shipmentId

String

RESPONSE ONLY. Unique identifier for the shipment, generated by the system in response to shipment purchase.

parcelTrackingNumber

String

RESPONSE ONLY. Tracking number assigned to the shipment by the system.

References Array in a CBDS Shipment

The references array passes merchant-generated references. Pitney Bowes includes the values in tracking files and invoices. Each object in the array contains a name-value pair that defines a reference field, as shown in this example:

"references": [ {
    "name": "ORDER_NUMBER",
    "value": "123456"
},{
    "name": "ReferenceNumber",
    "value": "321789"
} ]

The array defines the following reference fields:

Name

Value


ORDER_NUMBER

The merchant-generated order ID. The order ID cannot have spaces.

ReferenceNumber

The merchant-generated reference number.

This is required for the Bulk Pickup delivery solution.

Sample Requests

This section provides the following sample requests:

For this solution:


See this example:


Piece-Level Shipment

Sample Request to Return a USPS Label

Bulk Pickup

Sample Request to Return a PB Standard Label

Drop-Off to PB Standard

Sample Request to Return a PB Standard Label

Drop-Off to CBDS (U.S. Outbound)

Sample Request for Drop-Off to CBDS (U.S. Outbound)

Drop-Off to CBDS (UK Outbound)

Sample Request for Drop-Off to CBDS (UK Outbound)

Drop-Off to CBDS (Canada Outbound)

Sample Request for Drop-Off to CBDS (Canada Outbound)


Sample Request to Return a USPS Label

The following is a sample request for the Piece-Level Shipment delivery solution. The request returns a USPS label, as shown below after the sample response.

Sample Request to Return a USPS Label
curl -X POST .../v1/shipments?carrier=PBI&includeDeliveryCommitment=true \
-H "Authorization: Bearer <oauth_token>" \
-H "Content-Type: application/json" \
-H "X-PB-TransactionId: <unique_transaction_id>" \
-d '
{
    "fromAddress": { ... },
    "toAddress": { ... },
    "altReturnAddress": { ... },
    "parcel": {
        "dimension": {
            "length": "12",
            "width": "5",
            "height": "10",
            "unitOfMeasurement": "IN"
        },
        "weight": {
            "weight": 80,
            "unitOfMeasurement": "OZ"
        }
    },
    "rates": [ {
        "carrier": "PBI",
        "serviceId": "PBXPS",
        "parcelType": "PKG"
    } ],
    "documents": [ {
        "type": "SHIPPING_LABEL",
        "contentType": "URL",
        "size": "DOC_8X11",
        "fileFormat": "PDF",
        "resolution": "DPI_203",
        "printDialogOption": "EMBED_PRINT_DIALOG"
    } ],
    "shipmentOptions": [ {
        "name": "SHIPPER_ID",
        "value": "9024324564"
    } ],
    "customs": {
        "customsInfo": {
            "currencyCode": "USD"
        },
        "customsItems": [ {
            "description": "vintage floral-print patchwork long-sleeve cotton linen dress with pockets",
            "hSTariffCode": "610442",
            "hSTariffCodeCountry": "US",
            "itemId": "54378DRE",
            "quantity": 2,
            "unitPrice": 100.00,
            "url": "https://www.example.com/shop/women/clothing/dress/54378DRE"
        } ]
    },
    "references": [ {
        "name": "ORDER_NUMBER",
        "value": "123456"
    } ]
}'
Sample Response that Returns a USPS Label
{
    "fromAddress": { ... },
    "toAddress": { ... },
    "parcel": {
        "dimension": {
            "length": 12,
            "height": 10,
            "width": 5,
            "unitOfMeasurement": "IN"
        },
        "weight": {
            "weight": 80,
            "unitOfMeasurement": "OZ"
        },
        "valueOfGoods": 200.0
    },
    "rates": [ {
        "carrier": "PBI",
        "serviceId": "PBXPS",
        "parcelType": "PKG",
        "specialServices": [ {
            "specialServiceId": "DelCon",
            "inputParameters": [ {
                "name": "INPUT_VALUE",
                "value": "0"
            } ],
            "fee": 0.00
        } ],
        "inductionPostalCode": "36830",
        "dimensionalWeight": {
            "weight": 0.0,
            "unitOfMeasurement": "OZ"
        },
        "baseCharge": 42.22,
        "totalCarrierCharge": 89.87,
        "deliveryCommitment": {
            "minEstimatedNumberOfDays": "5",
            "maxEstimatedNumberOfDays": "8"
        },
        "currencyCode": "USD",
        "destinationZone": 4,
        "totalDutyAmount": 16.20,
        "totalTaxAmount": 31.45
    } ],
    "documents": [ {
        "type": "SHIPPING_LABEL",
        "size": "DOC_8X11",
        "fileFormat": "PDF",
        "contentType": "URL",
        "contents": "https://.../usps/325584758/outbound/label/9d1da50f82734ab9d4a41d5ffb9a19b.pdf"
        }
    ],
    "shipmentOptions": [ {
        "name": "HIDE_TOTAL_CARRIER_CHARGE",
        "value": "false"
    },{
        "name": "SHIPPER_ID",
        "value": "9024324564"
    },{
        "name": "ADD_TO_MANIFEST",
        "value": "false"
    },{
        "name": "FUTURE_SHIPMENT_DATE",
        "value": "2020-10-06 16:35:26.327"
    },{
        "name": "MINIMAL_ADDRESS_VALIDATION",
        "value": "false"
    },{
        "name": "SHIPPING_LABEL_RECEIPT",
        "value": "noOptions"
    },{
        "name": "PRINT_CUSTOM_MESSAGE_2",
        "value": "UPPBX0015B2A0E60EF73"
    } ],
    "customs": {
        "customsInfo": {
            "currencyCode": "USD"
        },
        "customsItems": [ {
            "itemId": "54378DRE",
            "description": "vintage floral-print patchwork long-sleeve cotton linen dress with pockets",
            "quantity": 2,
            "unitPrice": 100.00,
            "url": "https://www.example.com/shop/women/clothing/dress/54378DRE",
            "hSTariffCode": "610442",
            "hSTariffCodeCountry": "US"
        } ]
    },
    "domesticShipmentDetails": { ... },
    "references": [ {
        "name": "ORDER_NUMBER",
        "value": "123456"
    } ],
    "parcelTrackingNumber": "SBXCZ000000002135402",
    "shipmentId": "SBXCZ000000002135402"
}

Sample Label for Piece-Level Shipment

The following is a sample USPS label returned for the Piece-Level Shipment delivery solution.

Sample Label Returned for Piece-Level Shipment Solution



Sample Request to Return a PB Standard Label

The following sample request is used for both the Bulk Pickup and Drop-Off to PB Standard delivery solutions. For a sample label, see the sample label after the request and response.

Sample Request to Return a PB Standard Label
curl -X POST ../v1/shipments?carrier=PBI&includeDeliveryCommitment=false \
-H "Authorization: Bearer <oauth_token>" \
-H "Content-Type: application/json" \
-H "X-PB-TransactionId: <unique_transaction_id>" \
-d '
{
    "fromAddress": { ... },
    "toAddress": { ... },
    "altReturnAddress": { ... },
    "parcel": {
        "dimension": {
            "unitOfMeasurement": "in",
            "length": "2.15",
            "width": "2",
            "height": "3",
            "irregularParcelGirth": "2"
        },
        "weight": {
            "unitOfMeasurement": "Lb",
            "weight": "2"
        }
    },
    "rates": [ {
        "carrier": "PBI",
        "serviceId": "PBXPS",
        "parcelType": "PKG"
    } ],
    "documents": [ {
        "type": "SHIPPING_LABEL",
        "size": "DOC_4X6",
        "fileFormat": "PDF",
        "contentType": "URL",
        "printDialogOption": "EMBED_PRINT_DIALOG"
    } ],
    "shipmentOptions": [ {
        "name": "SHIPPER_ID",
        "value": "9024324564"
    },{
        "name": "CLIENT_ID",
        "value": "NGST"
    },{
        "name": "CLIENT_FACILITY_ID",
        "value": "2067"
    },{
        "name": "CARRIER_FACILITY_ID",
        "value": "0921"
    } ],
    "customs": {
        "customsInfo": {
            "currencyCode": "USD"
        },
        "customsItems": [ {
            "description": "Sample Items Acme AC8431 Rechargeable Hand Blender with Electric Attachments",
            "quantity": 1,
            "unitPrice": 164,
            "unitWeight": {
                "weight": 2,
                "unitOfMeasurement": "Lb"
            },
            "hSTariffCode": "0",
            "originCountryCode": "MX",
            "url": "https://example.com/blender",
            "itemId": "85-SKU",
            "hSTariffCodeCountry": "US"
          } ]
    },
    "references": [ {
        "name": "ORDER_NUMBER",
        "value": "123456"
    },{
        "name": "ReferenceNumber",
        "value": "321789"
    } ]
}'
Sample Response that Returns a PB Standard Label
{
    "fromAddress": { ... },
    "toAddress": { ... },
    "altReturnAddress": { ... },
    "parcel": {
        "dimension": {
            "length": 2.15,
            "height": 3,
            "width": 2,
            "unitOfMeasurement": "in",
            "irregularParcelGirth": "2"
        },
        "weight": {
            "weight": 2,
            "unitOfMeasurement": "Lb"
        },
        "valueOfGoods": 164.0
    },
    "rates": [ {
        "carrier": "PBI",
        "serviceId": "PBXPS",
        "parcelType": "PKG",
        "specialServices": [ {
            "specialServiceId": "DelCon",
            "inputParameters": [ {
                "name": "INPUT_VALUE",
                "value": "0"
            } ]
        } ],
        "baseCharge": 21.14,
         "totalCarrierCharge": 29.34,
         "currencyCode": "USD",
         "totalTaxAmount": 8.20
    } ],
    "documents": [ {
        "type": "SHIPPING_LABEL",
        "size": "DOC_4X6",
        "fileFormat": "PDF",
        "contentType": "URL",
        "contents": "https://.../4d864381fb1a4c8ba678e2e8d867abcd.pdf"
    } ],
    "shipmentOptions": [ {
        "name": "SHIPPER_ID",
        "value": "9024324564"
    },{
        "name": "CLIENT_ID",
        "value": "NGST"
    },{
        "name": "CLIENT_FACILITY_ID",
        "value": "2067"
    },{
        "name": "CARRIER_FACILITY_ID",
        "value": "0921"
    },{
        "name": "PRINT_CUSTOM_MESSAGE_2",
        "value": "UPPBX0016FF5B249E826"
    } ],
    "customs": {
        "customsInfo": {
            "currencyCode": "USD"
        },
        "customsItems": [ {
            "itemId": "85-SKU",
            "description": "Sample Items Acme AC8431 Rechargeable Hand Blender with Electric Attachments",
            "quantity": 1,
            "unitPrice": 164.00,
            "url": "https://example.com/blender",
            "unitWeight": {
                "weight": 2,
                "unitOfMeasurement": "Lb"
            },
            "originCountryCode": "MX",
            "hSTariffCode": "0",
            "hSTariffCodeCountry": "US"
        } ]
    },
    "domesticShipmentDetails": {
        "shipperTrackingNumber": "7624003NGST0000000000D",
        "barCodeLabelNumber": "7624003NGST0000000000D"
    },
    "references": [ {
        "name": "ORDER_NUMBER",
        "value": "123456"
    },{
        "name": "ReferenceNumber",
        "value": "321789"
    } ],
    "parcelTrackingNumber": "UPPBX0016FF5B249E826",
    "shipmentId": "UPPBX0016FF5B249E826"
}

Sample PB Standard Label

The following is a sample PB Standard label, which is returned for the Bulk Pickup and Drop-Off to PB Standard delivery solutions.

Sample PB Standard Label



Sample Request for Drop-Off to CBDS (U.S. Outbound)

The following is a sample request for a U.S. Outbound shipment that uses the Drop-Off to CBDS solution. You must print the first-mile label prior to the API call. When making the API call, you must pass the label’s tracking number through the domesticShipmentDetails object. The request does not return a label.

Sample Request for Drop-Off to CBDS (U.S. Outbound)
curl -X POST .../v1/shipments?carrier=PBI&includeDeliveryCommitment=true \
-H "Authorization: Bearer <oauth_token>" \
-H "Content-Type: application/json" \
-H "X-PB-TransactionId: <unique_transaction_id>" \
-d '
{
    "fromAddress": { ... },
    "toAddress": { ... },
    "altReturnAddress": { ... },
    "parcel": {
        "dimension": {
            "length": "16",
            "width": "12",
            "height": "2",
            "unitOfMeasurement": "IN"
        },
        "weight": {
            "weight": 24,
            "unitOfMeasurement": "OZ"
        }
    },
    "rates": [ {
        "carrier": "PBI",
        "serviceId": "PBXPS",
        "parcelType": "PKG"
    } ],
    "shipmentOptions": [ {
        "name": "SHIPPER_ID",
        "value": "9024324564"
    },{
        "name": "CARRIER_FACILITY_ID",
        "value": "US_ELOVATIONS_KY"
    } ],
    "customs": {
        "customsInfo": {
            "currencyCode": "USD"
        },
        "customsItems": [ {
            "description": "clothing men's shirt casual button-down slim fit cotton wrinkle-free single-needle construction",
            "hSTariffCode": "6205200010",
            "hSTariffCodeCountry": "CA",
            "itemId": "43953AE0",
            "quantity": 1,
            "unitPrice": 45.00,
            "url": "https://www.example.com/shop/43953AE0"
        } ]
    },
    "domesticShipmentDetails": {
        "shipperTrackingNumber": "USPS13600000008398",
        "carrier": "USPS"
    },
    "references": [ {
        "name": "ORDER_NUMBER",
        "value": "123456"
    } ]
}'
Sample Response for Drop-Off to CBDS (U.S. Outbound)
{
    "fromAddress": { ... },
    "toAddress": { ... },
    "parcel": {
        "dimension": {
            "length": 16,
            "height": 2,
            "width": 12,
            "unitOfMeasurement": "IN"
        },
        "weight": {
            "weight": 24,
            "unitOfMeasurement": "OZ"
        },
        "valueOfGoods": 125.00
    },
    "rates": [ {
        "carrier": "PBI",
        "serviceId": "PBXPS",
        "parcelType": "PKG",
        "baseCharge": 41.38,
        "totalCarrierCharge": 49.69,
        "deliveryCommitment": {
            "minEstimatedNumberOfDays": "6",
            "maxEstimatedNumberOfDays": "9"
        },
        "currencyCode": "USD",
        "totalTaxAmount": 8.31
    } ],
    "shipmentOptions": [ {
        "name": "SHIPPER_ID",
        "value": "9024324564"
    },{
        "name": "CARRIER_FACILITY_ID",
        "value": "US_ELOVATIONS_KY"
    } ],
    "customs": {
        "customsInfo": {
            "currencyCode": "USD"
        },
        "customsItems": [ {
            "itemId": "43953AE0",
            "description": "clothing men's shirt casual button-down slim fit cotton wrinkle-free single-needle construction",
            "quantity": 1,
            "unitPrice": 45.00,
            "url": "https://www.example.com/shop/43953AE0",
            "hSTariffCode": "6205200010",
            "hSTariffCodeCountry": "CA"
        } ]
    },
    "domesticShipmentDetails": {
        "carrier": "USPS",
        "shipperTrackingNumber": "USPS13600000008398"
    },
    "references": [ {
        "name": "ORDER_NUMBER",
        "value": "123456"
    } ],
    "parcelTrackingNumber": "SBXCZ000000002140172",
    "shipmentId": "SBXCZ000000002140172"
}



Sample Request for Drop-Off to CBDS (UK Outbound)

Merchants who use the Drop-Off to CBDS solution for the UK Hub have two options:

  • Print the first-mile label before invoking the API. See this sample request.

  • Use the API to print a generic first-mile label the merchant will use to bring the parcel to the UK Hub. See this sample request.

Sample UK Drop-Off Request that Inputs Tracking Number

The following is a sample request for a UK Outbound shipment that uses the Drop-Off to CBDS solution. You must print the first-mile label prior to the API call and pass the label’s tracking number through the domesticShipmentDetails object. The request does not return a label.

Sample Request for Drop-Off to CBDS UK
curl -X POST .../v1/shipments?carrier=PBI&includeDeliveryCommitment=true \
-H "Authorization: Bearer <oauth_token>" \
-H "Content-Type: application/json" \
-H "X-PB-TransactionId: <unique_transaction_id>" \
-d '
{
    "fromAddress": { ... },
    "toAddress": { ... },
    "altReturnAddress": { ... },
    "parcel": {
        "dimension": {
            "length": "6",
            "width": "8",
            "height": "9",
            "unitOfMeasurement": "IN",
            "irregularParcelGirth": "0.0"
        },
        "weight": {
            "unitOfMeasurement": "LB",
            "weight": "2"
        },
    },
    "rates": [ {
        "carrier": "PBI",
        "serviceId": "PBXPS",
        "parcelType": "PKG"
    } ],
    "shipmentOptions": [ {
        "name": "SHIPPER_ID",
        "value": "9024324564"
    },{
        "name": "CARRIER_FACILITY_ID",
        "value": "GB_GEODIS_GBA"
    } ],
    "customs": {
        "customsInfo": {
           "currencyCode": "GBP"
        },
        "customsItems": [ {
            "itemId": "880682",
            "description": "clothing men's shirt casual button-down slim fit cotton wrinkle-free single-needle construction",
            "quantity": "2",
            "unitPrice": "100.00",
            "url": "https://www.example.com/uk/shop/880682",
            "hSTariffCode": "620120",
            "hSTariffCodeCountry": "US",
            "originCountryCode": "GB"
        } ]
    },
    "domesticShipmentDetails": {
        "shipperTrackingNumber": "4039180763478-245789",
        "carrier": "FEDEX",
        "dcAddress": { ... }
    },
    "references": [ {
        "name": "ORDER_NUMBER",
        "value": "MerchantOrder-2583"
    } ]
}'
Sample Response for Drop-Off to CBDS UK
{
    "fromAddress": { ... },
    "toAddress": { ... },
    "altReturnAddress": { ... },
    "parcel": {
        "dimension": {
            "length": 6,
            "height": 9,
            "width": 8,
            "unitOfMeasurement": "IN"
        },
        "weight": {
            "weight": 2.0,
            "unitOfMeasurement": "LB"
        },
        "valueOfGoods": 200.0
    },
    "rates": [ {
        "carrier": "PBI",
        "serviceId": "PBXPS",
        "parcelType": "PKG"
        "baseCharge": 15.76,
        "totalCarrierCharge": 221.12,
        "deliveryCommitment": {
            "minEstimatedNumberOfDays": "4",
            "maxEstimatedNumberOfDays": "8"
         },
         "currencyCode": "GBP",
         "totalDutyAmount": 110.88,
         "totalTaxAmount": 94.48
    } ],
    "shipmentOptions": [ {
        "name": "SHIPPER_ID",
        "value": "9024324564"
    },{
        "name": "CARRIER_FACILITY_ID",
        "value": "GB_GEODIS_GBA"
    } ],
    "customs": {
        "customsInfo": {
           "currencyCode": "GBP"
        },
        "customsItems": [ {
            "itemId": "880682",
            "description": "clothing men's shirt casual button-down slim fit cotton wrinkle-free single-needle construction",
            "quantity": "2",
            "unitPrice": "100.00",
            "url": "https://www.example.com/uk/shop/880682",
            "hSTariffCode": "620120",
            "hSTariffCodeCountry": "US",
            "originCountryCode": "GB"
        } ]
    },
    "domesticShipmentDetails": {
        "shipperTrackingNumber": "4039180763478-245789",
        "carrier": "FEDEX",
        "dcAddress": { ... }
    },
    "references": [ {
        "name": "ORDER_NUMBER",
        "value": "MerchantOrder-2583"
    } ],
    "parcelTrackingNumber": "PBXAA000000010030065",
    "shipmentId": "PBXAA000000010030065"
}

Sample UK Drop-Off Request that Prints Generic Label

Merchants who use the Drop-Off to CBDS solution for the UK Hub have the option of using the API to print a generic label the merchant will then use to bring the parcel to the UK Hub.

Sample Request for Drop-Off to CBDS UK with Generic Label
curl -X POST .../v1/shipments?carrier=PBI&includeDeliveryCommitment=true \
-H "Authorization: Bearer <oauth_token>" \
-H "Content-Type: application/json" \
-H "X-PB-TransactionId: <unique_transaction_id>" \
-d '
{
    "fromAddress": { ... },
    "toAddress": { ... },
    "altReturnAddress": { ... },
    "parcel": {
        "dimension": {
            "length": 12,
            "height": 4,
            "width": 2,
            "unitOfMeasurement": "in"
        },
        "weight": {
            "unitOfMeasurement": "Lb",
            "weight": "30"
        }
    },
    "rates": [ {
        "carrier": "PBI",
        "serviceId": "PBXPS",
        "parcelType": "PKG"
    } ],
    "documents": [ {
        "type": "SHIPPING_LABEL",
        "contentType": "URL",
        "size": "DOC_4X6",
        "fileFormat": "PDF",
        "resolution": "DPI_203",
        "printDialogOption": "EMBED_PRINT_DIALOG"
    } ],
    "shipmentOptions": [ {
        "name": "CARRIER_FACILITY_ID",
        "value": "GB_GEODIS_GBA"
    },{
        "name": "SHIPPER_ID",
        "value": "9024324564"
    } ],
    "customs": {
        "customsInfo": {
            "currencyCode": "GBP"
        },
        "customsItems": [ {
            "description": "Dish Towel 100% Cotton",
            "hSTariffCode": "6302600010",
            "hSTariffCodeCountry": "US",
            "itemId": "24d",
            "quantity": 100,
            "unitPrice": 10,
            "url": "https://www.example.com/Flour-Sack-Dish-Towels-White"
        } ]
    },
    "references": [ {
        "name": "ORDER_NUMBER",
        "value": "FMEUK24192"
    } ]
}'
Sample Response for Drop-Off to CBDS UK with Generic Label
{
    "fromAddress": { ... },
    "toAddress": { ... },
    "altReturnAddress": { ... },
    "parcel": {
        "dimension": {
            "length": 12,
            "height": 4,
            "width": 2,
            "unitOfMeasurement": "in"
        },
        "weight": {
            "weight": 30,
            "unitOfMeasurement": "Lb"
        "valueOfGoods": 1000.0
        }
    },
    "rates": [ {
        "carrier": "PBI",
        "serviceId": "PBXPS",
        "parcelType": "PKG",
        "baseCharge": 258.27,
        "totalCarrierCharge": 428.27,
        "deliveryCommitment": {
            "minEstimatedNumberOfDays": "5",
            "maxEstimatedNumberOfDays": "10"
        },
        "currencyCode": "GBP",
        "totalDutyAmount": 170.00
    } ],
    "documents": [ {
        "type": "SHIPPING_LABEL",
        "size": "DOC_4X6",
        "fileFormat": "PDF",
        "contentType": "URL",
        "contents": "https://.../f03fc9ca3d4346a1ba7ec4d87a4d63b8.pdf"
    } ],
    "shipmentOptions": [ {
        "name": "CARRIER_FACILITY_ID",
        "value": "GB_GEODIS_GBA"
    },{
        "name": "SHIPPER_ID",
        "value": "9024324564"
    } ],
    "customs": {
        "customsInfo": {
            "currencyCode": "GBP"
        },
        "customsItems": [ {
            "itemId": "24d",
            "description": "Dish Towel 100% Cotton",
            "quantity": 100,
            "unitPrice": 10.00,
            "url": "https://www.example.com/Flour-Sack-Dish-Towels-White",
            "hSTariffCode": "6302600010",
            "hSTariffCodeCountry": "US"
        } ]
    },
    "domesticShipmentDetails": { ... },
    "references": [ {
        "name": "ORDER_NUMBER",
        "value": "FMEUK24192"
    } ],
    "parcelTrackingNumber": "PBXGA00169B75401F704",
    "shipmentId": "PBXGA00169B75401F704"
}



Sample Request for Drop-Off to CBDS (Canada Outbound)

Sample Request for Drop-Off to CBDS (Canada Outbound)
curl -X POST .../v1/shipments?carrier=PBI&includeDeliveryCommitment=true \
-H "Authorization: Bearer <oauth_token>" \
-H "Content-Type: application/json" \
-H "X-PB-TransactionId: <unique_transaction_id>" \
-d '
{
    "fromAddress": { ... },
    "toAddress": { ... },
    "altReturnAddress": { ... },
    "parcel": {
        "weight": {
            "unitOfMeasurement": "Lb",
            "weight": "0.03"
        },
        "dimension": {
            "unitOfMeasurement": "in",
            "length": "5",
            "width": "7",
            "height": "6"
        }
    },
    "rates": [ {
        "carrier": "PBI",
        "serviceId": "PBXPS",
        "parcelType": "PKG"
    } ],
    "documents": [ {
        "type": "SHIPPING_LABEL",
        "size": "DOC_4X6",
        "fileFormat": "PDF",
        "contentType": "URL",
        "printDialogOption": "EMBED_PRINT_DIALOG"
    } ],
    "shipmentOptions": [ {
        "name": "SHIPPER_ID",
        "value": "9024324564"
    },{
        "name": "CARRIER_FACILITY_ID",
        "value": "CA_GLOBAL_ONA"
    } ],
    "customs": {
        "customsInfo": {
            "currencyCode": "CAD"
        },
        "customsItems": [ {
            "itemId": "OLCom_973",
            "description": "shore bird canvas wall art for family room living room bedroom 12x12",
            "url": "www.example.com/olcom_973",
            "unitPrice": "500",
            "quantity": "1",
            "hSTariffCode": "6205200010",
            "hSTariffCodeCountry": "CA",
            "originCountryCode": "CA"
        } ]
    },
    "references": [ {
        "name": "ORDER_NUMBER",
        "value": "67707"
    } ]
}'


Error Codes

For common error codes specific to this API call, please see 13-Prefix Error Codes.

For a list of all error codes returned by the Ecommerce APIs, please see Error Codes.