Show / Hide Table of Contents

Class Shipment

Class representing an EasyPost shipment.

Inheritance
System.Object
EphemeralEasyPostObject
EasyPostObject
Shipment
Implements
IEasyPostObject
IShipmentParameter
IParameter
Inherited Members
EasyPostObject.CreatedAt
EasyPostObject.Id
EasyPostObject.UpdatedAt
EasyPostObject.Prefix
EasyPostObject.AsDictionary()
EasyPostObject.ToString()
EasyPostObject.Equals(Nullable<Object>)
EasyPostObject.GetHashCode()
EphemeralEasyPostObject.Mode
EphemeralEasyPostObject.AsJson()
Namespace: EasyPost.Models.API
Assembly: EasyPost.dll
Syntax
public class Shipment : EasyPostObject, IEasyPostObject, IShipmentParameter, IParameter

Properties

| Improve this Doc View Source

BatchId

The ID of the Batch that contains this Shipment, if applicable.

Declaration
public string? BatchId { get; set; }
Property Value
Type Description
System.Nullable<System.String>
| Improve this Doc View Source

BatchMessage

A human-readable message for any errors that occurred during the batch shipment's life cycle.

Declaration
public string? BatchMessage { get; set; }
Property Value
Type Description
System.Nullable<System.String>
| Improve this Doc View Source

BatchStatus

The current state of the batch shipment. Valid statuses are:

  • "postage_purchased"
  • "postage_purchase_failed"
  • "queued_for_purchase"
  • "creation_failed"
Declaration
public string? BatchStatus { get; set; }
Property Value
Type Description
System.Nullable<System.String>
| Improve this Doc View Source

BuyerAddress

The Address of the buyer. Defaults to the ToAddress.

Declaration
public Address BuyerAddress { get; set; }
Property Value
Type Description
Address
| Improve this Doc View Source

CarrierAccounts

The CarrierAccounts associated with the shipment.

Declaration
public List<CarrierAccount>? CarrierAccounts { get; set; }
Property Value
Type Description
System.Nullable<List<CarrierAccount>>
| Improve this Doc View Source

CustomsInfo

The CustomsInfo associated with the shipment.

Declaration
public CustomsInfo CustomsInfo { get; set; }
Property Value
Type Description
CustomsInfo
| Improve this Doc View Source

Fees

A list of Fees associated with the shipment charged to the billing user's account.

Declaration
public List<Fee>? Fees { get; set; }
Property Value
Type Description
System.Nullable<List<Fee>>
| Improve this Doc View Source

Forms

A list of Forms associated with the shipment.

Declaration
public List<Form>? Forms { get; set; }
Property Value
Type Description
System.Nullable<List<Form>>
| Improve this Doc View Source

FromAddress

The origin Address of the shipment.

Declaration
public Address FromAddress { get; set; }
Property Value
Type Description
Address
| Improve this Doc View Source

Insurance

The Insurance associated with the shipment.

Declaration
public string? Insurance { get; set; }
Property Value
Type Description
System.Nullable<System.String>
| Improve this Doc View Source

IsReturn

Whether the shipment is a return shipment.

Declaration
public bool? IsReturn { get; set; }
Property Value
Type Description
System.Nullable<System.Boolean>
| Improve this Doc View Source

Messages

A list of any carrier errors that occurred during rating or purchasing.

Declaration
public List<Message>? Messages { get; set; }
Property Value
Type Description
System.Nullable<List<Message>>
| Improve this Doc View Source

Options

The Options used for the shipment.

Declaration
public Options Options { get; set; }
Property Value
Type Description
Options
| Improve this Doc View Source

OrderId

The ID of the Order associated with the shipment.

Declaration
public string? OrderId { get; set; }
Property Value
Type Description
System.Nullable<System.String>
| Improve this Doc View Source

Parcel

The Parcel associated with the shipment.

Declaration
public Parcel Parcel { get; set; }
Property Value
Type Description
Parcel
| Improve this Doc View Source

PostageLabel

The PostageLabel associated with the shipment.

Declaration
public PostageLabel PostageLabel { get; set; }
Property Value
Type Description
PostageLabel
| Improve this Doc View Source

Rates

A list of Rates available for the shipment.

Declaration
public List<Rate>? Rates { get; set; }
Property Value
Type Description
System.Nullable<List<Rate>>
| Improve this Doc View Source

Reference

An optional field that may be used in place of ID in some API endpoints.

Declaration
public string? Reference { get; set; }
Property Value
Type Description
System.Nullable<System.String>
| Improve this Doc View Source

RefundStatus

The status of the refund request. Possible values are:

  • "submitted"
  • "refunded"
  • "rejected"
Declaration
public string? RefundStatus { get; set; }
Property Value
Type Description
System.Nullable<System.String>
| Improve this Doc View Source

ReturnAddress

The Address of the shipper. Defaults to the FromAddress.

Declaration
public Address ReturnAddress { get; set; }
Property Value
Type Description
Address
| Improve this Doc View Source

ScanForm

The ScanForm associated with the shipment.

Declaration
public ScanForm ScanForm { get; set; }
Property Value
Type Description
ScanForm
| Improve this Doc View Source

SelectedRate

The Rate selected for the shipment.

Declaration
public Rate SelectedRate { get; set; }
Property Value
Type Description
Rate
| Improve this Doc View Source

Service

The service level of the SelectedRate.

Declaration
public string? Service { get; set; }
Property Value
Type Description
System.Nullable<System.String>
| Improve this Doc View Source

Status

The current status of the package. Possible values are:

  • "pre_transit"
  • "in_transit"
  • "out_for_delivery"
  • "delivered"
  • "available_for_pickup"
  • "return_to_sender"
  • "failure"
  • "cancelled"
  • "unknown"
  • "error"
Declaration
public string? Status { get; set; }
Property Value
Type Description
System.Nullable<System.String>
| Improve this Doc View Source

TaxIdentifiers

A list of TaxIdentifiers associated with the shipment.

Declaration
public List<TaxIdentifier>? TaxIdentifiers { get; set; }
Property Value
Type Description
System.Nullable<List<TaxIdentifier>>
| Improve this Doc View Source

ToAddress

The destination Address of the shipment.

Declaration
public Address ToAddress { get; set; }
Property Value
Type Description
Address
| Improve this Doc View Source

Tracker

The Tracker associated with the shipment.

Declaration
public Tracker Tracker { get; set; }
Property Value
Type Description
Tracker
| Improve this Doc View Source

TrackingCode

The tracking code provided by the carrier.

Declaration
public string? TrackingCode { get; set; }
Property Value
Type Description
System.Nullable<System.String>
| Improve this Doc View Source

UspsZone

The USPS zone number for the shipment.

Declaration
public string? UspsZone { get; set; }
Property Value
Type Description
System.Nullable<System.String>

Methods

| Improve this Doc View Source

LowestRate(Nullable<List<String>>, Nullable<List<String>>, Nullable<List<String>>, Nullable<List<String>>)

Get the lowest rate for this Shipment.

Declaration
public Rate LowestRate(List<string>? includeCarriers = null, List<string>? includeServices = null, List<string>? excludeCarriers = null, List<string>? excludeServices = null)
Parameters
Type Name Description
System.Nullable<List<System.String>> includeCarriers

Carriers to include in the filter.

System.Nullable<List<System.String>> includeServices

Services to include in the filter.

System.Nullable<List<System.String>> excludeCarriers

Carriers to exclude in the filter.

System.Nullable<List<System.String>> excludeServices

Services to exclude in the filter.

Returns
Type Description
Rate

Lowest EasyPost.Rate object instance.

Implements

IEasyPostObject
IShipmentParameter
IParameter
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX