@shipengine/connect-carrier-api
Version:
This is the typescript/javascript definitions for carrier api
65 lines (63 loc) • 2.41 kB
text/typescript
import { BaseRequest } from './base-request';
import {
AdvancedOptions,
ConfirmationTypes,
FulfillmentPlanDetails,
InsuranceProviders,
DocumentFormat,
LabelLayouts,
Package,
ReturnLabelDetails,
ShipFrom,
PudoLocation,
ShipFromDisplay,
ShipTo,
Document,
TimeWindow,
RelayPointDetails,
DisplayScheme,
Customs,
BillTo,
} from '../models';
import { DangerousGoodsDeclaration } from '../models/dangerous-good/dangerous-goods-declaration';
/** @description Basic structure for a request to create a label */
export class CreateLabelRequest extends BaseRequest {
service_code?: string;
ship_datetime!: string;
confirmation?: ConfirmationTypes;
label_format?: DocumentFormat;
label_layout?: LabelLayouts;
/** @description Whether the request is for a test */
is_test_label?: boolean;
/** @description Any additional options a shipment may require, including custom options */
advanced_options?: AdvancedOptions;
insurance_provider?: InsuranceProviders;
/** @description Whether the shipment is a return */
is_return_label!: boolean;
packages!: Package[];
ship_to!: ShipTo;
ship_from!: ShipFrom;
dropoff_location?: PudoLocation;
pickup_location?: PudoLocation;
relay_points?: RelayPointDetails;
ship_from_display?: ShipFromDisplay;
/** @description Whether the shipment requires next day shipping */
next_day?: boolean;
/** @description Whether the shipment is international */
international?: boolean;
reference?: string;
return_details?: ReturnLabelDetails;
fulfillment_plan_details?: FulfillmentPlanDetails;
attachments?: Document[];
/** @description The carrier pickup window is the time designated when the carrier will pickup your package from the initial location */
carrier_pickup_window?: TimeWindow;
/** @description Unique identifier for the carrier rate */
carrier_rate_id?: string;
/** @description Display schemes that the label will be returned in. Label is returned by default */
display_schemes?: DisplayScheme[];
customs?: Customs;
/** @description Bill the shipping charges to this entity. If null, it should be assumed the "shipper" is responsible for the shipping charges. */
bill_shipping_to?: BillTo;
/** @description An object containing high-level information about the dangerous goods declaration for the entire shipment. */
dangerous_goods_declaration?: DangerousGoodsDeclaration;
}