UNPKG

@shipengine/connect-carrier-api

Version:

This is the typescript/javascript definitions for carrier api

50 lines (48 loc) 3.34 kB
import { StandardizedStatusCodes } from './standardized-status-codes'; import { Dimensions } from '../units/dimensions'; import { Service } from './service'; import { TrackEvent } from './track-event'; import { StandardizedStatusDetailCodes } from './standardized-status-detail-codes'; /** @description Basic structure for tracking information */ export class TrackingInfo { /** @description The human readable name of the carrier tracking this shipment. */ carrier_name?: string; /** @description The carrier specific tracking identifier for this shipment. */ tracking_number?: string; /** @description This represents the ShipEngine supported status codes for a shipment. UN - Unknown AC - Accepted IT - In Transit DE - Delivered EX - Exception AT - Delivery Attempted NY - Not Yet In System */ standardized_status_code?: StandardizedStatusCodes; /** @description This represents the ShipEngine supported status detil codes for a shipment. */ standardized_status_detail_code?: StandardizedStatusDetailCodes; /** @description If the carrier returns both a generic and a specific tracking status code for the shipment, this field should contain the generic value while `carrier_detail_code` should contain the specific value. Otherwise, this field contains the carrier's specific status code. */ carrier_status_code?: string; /** @description Optional field for the carrier's specific tracking status code when `carrier_status_code` is populated with a generic status code. */ carrier_detail_code?: string; /** @description The human readable description of this shipment's tracking status. */ carrier_status_description?: string; /** @description When the package(s) in this shipment were turned over to the carrier. Formatted per https://tools.ietf.org/html/rfc3339. Must be in UTC. */ shipped_datetime?: string; /** @description When the package(s) in this shipment are expected to arrive at their destination. Formatted per https://tools.ietf.org/html/rfc3339. Must be in UTC. */ estimated_delivery_datetime?: string; /** @description When the package(s) in this shipment arrived at their destination. Formatted per https://tools.ietf.org/html/rfc3339. Must be in UTC. */ actual_delivery_datetime?: string; /** @description A human readable description of why the shipment is in an error state. */ shipping_problem_description?: string; /** @description The weight measured by the carrier of the package(s) in this shipment. */ weight?: number; /** @description The dimensions measured by the carrier of the package(s) in this shipment. */ dimensions?: Dimensions; /** @description A shipping provider specific service. */ service?: Service; /** @description The carrier packaging code. */ packaging?: string; /** @description The carrier observed count of packages in this shipment. */ package_count?: number; /** @description A list of tracking events for this shipment */ events?: TrackEvent[]; /** @description Whether or not this shipment has entered an error state. */ shipping_problem?: boolean; /** @description The unique identifying code for the type of error encountered by this shipment. */ shipping_problem_code?: string; /** @description The human readable explanation of the error encountered by this shipment. */ error_description?: string; }