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
Name | Type | Required? | Description |
---|---|---|---|
id | ✔ | UUID that uniquely identifies the delivery service. This ID should never change. | |
identifiers | object | Your own identifiers for this delivery service. | |
code | string | ✔ | Code used to map to what the carrier uses to identify the delivery service. |
name | string | ✔ | The user-friendly service name (e.g. "Priority Overnight", "2-Day Air"). |
description | string | A short, user-friendly description of the service. | |
fulfillmentService | string | A well-known fulfillment service that's used to fulfill this delivery service, such as "fedex_ground". | |
serviceArea | string | The service area this delivery service covers. Valid values include the following:
| |
isConsolidationService | boolean | ✔ | Indicates whether this delivery service is a consolidation of multiple carrier services. |
allowsMultiplePackages | boolean | ✔ | Indicates whether the delivery service allows multiple packages in a single shipment. |
isInsurable | boolean | ✔ | Indicates whether shippers can purchase insurance from the carrier for this delivery service. |
isTrackable | boolean | ✔ | Indicates whether tracking numbers are provided by this delivery service. |
supportsReturns | boolean | Indicates whether the carrier supports return shipments. Defaults to | |
labelFormats | string[] | ✔ | The list of label formats that are offered for this delivery service. Valid values include the following:
|
labelSizes | string[] | ✔ | The list of label sizes that are offered for this delivery service. Valid values include the following:
|
availableCountries | string[] | ✔ | The seller's home countries in ISO 3166-1 alpha-2 format that should have access to this service. |
packaging | string[] | ✔ | 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. |
manifestType | string | Indicates whether the service supports digital or physical manifests. Valid values include the following:
|
Examples
id: 43fc9d24-6a89-428a-ad34-c614c14170b6identifiers: apiCode: ECOcode: ECOname: International Economydescription: Worldwide delivery at an affordable priceserviceArea: globalisConsolidationService: trueisTrackable: falseisInsurable: truesupportsReturns: falsemanifestType: digitallabelFormats: - pdflabelSizes: - A4 - letteravailableCountries: north-america.yamlpackaging: - ../packaging/package.yaml - ../packaging/pallet.yamldeliveryConfirmations: - ../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"}