Class Shipment
Class representing an EasyPost shipment.
Inherited Members
Namespace: EasyPost.Models.API
Assembly: EasyPost.dll
Syntax
public class Shipment : EasyPostObject, IEasyPostObject, IShipmentParameter, IParameter
Properties
| Improve this Doc View SourceBatchId
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> |
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> |
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> |
BuyerAddress
Declaration
public Address BuyerAddress { get; set; }
Property Value
| Type | Description |
|---|---|
| Address |
CarrierAccounts
The CarrierAccounts associated with the shipment.
Declaration
public List<CarrierAccount>? CarrierAccounts { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<List<CarrierAccount>> |
CustomsInfo
The CustomsInfo associated with the shipment.
Declaration
public CustomsInfo CustomsInfo { get; set; }
Property Value
| Type | Description |
|---|---|
| CustomsInfo |
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>> |
Forms
A list of Forms associated with the shipment.
Declaration
public List<Form>? Forms { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<List<Form>> |
FromAddress
The origin Address of the shipment.
Declaration
public Address FromAddress { get; set; }
Property Value
| Type | Description |
|---|---|
| Address |
Insurance
The Insurance associated with the shipment.
Declaration
public string? Insurance { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.String> |
IsReturn
Whether the shipment is a return shipment.
Declaration
public bool? IsReturn { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.Boolean> |
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>> |
Options
The Options used for the shipment.
Declaration
public Options Options { get; set; }
Property Value
| Type | Description |
|---|---|
| Options |
OrderId
The ID of the Order associated with the shipment.
Declaration
public string? OrderId { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.String> |
Parcel
The Parcel associated with the shipment.
Declaration
public Parcel Parcel { get; set; }
Property Value
| Type | Description |
|---|---|
| Parcel |
PostageLabel
The PostageLabel associated with the shipment.
Declaration
public PostageLabel PostageLabel { get; set; }
Property Value
| Type | Description |
|---|---|
| PostageLabel |
Rates
A list of Rates available for the shipment.
Declaration
public List<Rate>? Rates { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<List<Rate>> |
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> |
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> |
ReturnAddress
The Address of the shipper. Defaults to the FromAddress.
Declaration
public Address ReturnAddress { get; set; }
Property Value
| Type | Description |
|---|---|
| Address |
ScanForm
The ScanForm associated with the shipment.
Declaration
public ScanForm ScanForm { get; set; }
Property Value
| Type | Description |
|---|---|
| ScanForm |
SelectedRate
The Rate selected for the shipment.
Declaration
public Rate SelectedRate { get; set; }
Property Value
| Type | Description |
|---|---|
| Rate |
Service
The service level of the SelectedRate.
Declaration
public string? Service { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.String> |
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> |
TaxIdentifiers
A list of TaxIdentifiers associated with the shipment.
Declaration
public List<TaxIdentifier>? TaxIdentifiers { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<List<TaxIdentifier>> |
ToAddress
The destination Address of the shipment.
Declaration
public Address ToAddress { get; set; }
Property Value
| Type | Description |
|---|---|
| Address |
Tracker
The Tracker associated with the shipment.
Declaration
public Tracker Tracker { get; set; }
Property Value
| Type | Description |
|---|---|
| Tracker |
TrackingCode
The tracking code provided by the carrier.
Declaration
public string? TrackingCode { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.String> |
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 SourceLowestRate(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. |