Delivery Service Definition

A Delivery Service is a type of delivery that is offered by a carrier, such as "international" or "standard overnight". Each delivery service that is offered must be defined in its own delivery service definition file. This file can reside anywhere within your application as long as its location is specified in the Carrier Application Definition file. The definition may be specified in JavaScript, TypeScript, JSON, or YAML.

These delivery service definitions will be used by the ShipEngine Connect to display delivery service options within our suite of e-commerce applications when your carrier is used.

Delivery Service Properties

NameTypeRequired?Description
id

UUID

UUID that uniquely identifies the delivery service. This ID should never change.

identifiersobject

Your own identifiers for this delivery service.

codestring

Code used to map to what the carrier uses to identify the delivery service.

namestring

The user-friendly service name (e.g. "Priority Overnight", "2-Day Air").

descriptionstring

A short, user-friendly description of the service.

fulfillmentServicestring

A well-known fulfillment service that's used to fulfill this delivery service, such as "fedex_ground".

serviceAreastring

The service area this delivery service covers. Valid values include the following:

  • regional - Delivery based on the shipment's distance to its destination. Rates typically vary by zone.
  • domestic - Delivery with an origin address and a destination address within the same country.
  • international - Delivery to a from address in at least one other country.
  • global - Delivery to a from address anywhere in the world.
isConsolidationServiceboolean

Indicates whether this delivery service is a consolidation of multiple carrier services.

allowsMultiplePackagesboolean

Indicates whether the delivery service allows multiple packages in a single shipment.

isInsurableboolean

Indicates whether shippers can purchase insurance from the carrier for this delivery service.

isTrackableboolean

Indicates whether tracking numbers are provided by this delivery service.

supportsReturnsboolean

Indicates whether the carrier supports return shipments. Defaults to false if not specified.

labelFormatsstring[]

The list of label formats that are offered for this delivery service. Valid values include the following:

  • pdf - Potable Document Format (PDF)
  • zpl - Zebra Printer Label (ZPL)
  • png - Portable Graphics Format (PNG)
labelSizesstring[]

The list of label sizes that are offered for this delivery service. Valid values include the following:

  • A4 - A4 sized paper. 8.27 inches x 11.69 inches.
  • letter - Letter sized paper. 8.5 inches by 11 inches.
  • 4x6 - Paper sized 4 inches by 6 inches.
  • 4x8 - Paper sized 4 inches by 8 inches.
availableCountriesstring[]

The seller's home countries in ISO 3166-1 alpha-2 format that should have access to this service.

packagingstring[]

The types of packaging that are offered for this delivery service. This property should contain the paths to the packaging definition files for the packaging types that are valid for this delivery confirmation type.

deliveryConfirmation

Delivery Confirmation[] or string[]

The types of delivery confirmations offered for this delivery service. This property may define the delivery confirmations directly inline, following the delivery confirmation format. It may also contain a list of paths to files that define the delivery confirmations available. Defining your delivery confirmations inside definition files allows you to reference those delivery confirmation definitions in multiple delivery service definition files.

manifestTypestring

Indicates whether the service supports digital or physical manifests. Valid values include the following:

  • physical - This service will require physical documents even if the carrier default is digital transmission.
  • digital - This service will not require physical documents even if the carrier default is for physical documents.

Examples

id: 43fc9d24-6a89-428a-ad34-c614c14170b6
identifiers:
apiCode: ECO
code: ECO
name: International Economy
description: Worldwide delivery at an affordable price
serviceArea: global
isConsolidationService: true
isTrackable: false
isInsurable: true
supportsReturns: false
manifestType: digital
labelFormats:
- pdf
labelSizes:
- A4
- letter
availableCountries: north-america.yaml
packaging:
- ../packaging/package.yaml
- ../packaging/pallet.yaml
deliveryConfirmations:
- ../delivery-confirmations/signature-required.yaml
- ../delivery-confirmations/adult-signature.yaml
- ../delivery-confirmations/recipient-signature.yaml
{
id: "43fc9d24-6a89-428a-ad34-c614c14170b6",
identifiers: {
apiCode: "ECO"
},
code: "IEC",
name: "International Economy",
description: "Worldwide delivery at an affordable price",
serviceArea: "global",
isConsolidationService: true,
isTrackable: false,
isInsurable: true,
supportsReturns: false,
manifestType: "digital",
labelFormats:[
"pdf"
],
labelSizes: [
"A4",
"letter"
],
availableCountries: "north-america.yaml",
packaging: [
"../packaging/package.yaml",
"../packaging/pallet.yaml"
],
deliveryConfirmations: [
"../delivery-confirmations/signature-required.yaml",
"../delivery-confirmations/adult-signature.yaml",
"../delivery-confirmations/recipient-signature.yaml"
]
}
import {
Country,
DeliveryServiceClass,
DeliveryServiceDefinition,
DeliveryServiceGrade,
DocumentFormat,
DocumentSize,
ServiceArea,
} from "@shipengine/connect";
const internationalEconomyDeliveryService: DeliveryServiceDefinition = {
id: "43fc9d24-6a89-428a-ad34-c614c14170b6",
code: "IEC",
name: "International Economy",
description:
"Worldwide delivery at an affordable price",
deliveryConfirmations: [import("./signature-delivery-confirmation")],
isInsurable: true,
isTrackable: false,
manifestType: digital,
supportsReturns: false,
labelFormats: [DocumentFormat.PDF, DocumentFormat.PNG],
labelSizes: [DocumentSize.Letter, DocumentSize.Inches4x6],
availableCountries: [Country.UnitedStates],
packaging: [import("./package-packaging")],
serviceArea: ServiceArea.domestic,
};
export default internationalEconomyDeliveryService;
{
"id": "43fc9d24-6a89-428a-ad34-c614c14170b6",
"name": "International Economy",
"code": "IEC",
"description": "Worldwide delivery at an affordable price",
"deliveryConfirmations": ["./signature-delivery-confirmation.json"],
"isInsurable": true,
"isTrackable": false,
"supportsReturns": false,
"manifestType": "digital",
"labelFormats": ["pdf"],
"labelSizes": ["4x8"],
"availableCountries": ["US", "CA", "MX"],
"packaging": ["./package-packaging.json"],
"serviceArea": "international"
}