labels

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2026 License: MIT Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package labels provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.0 DO NOT EDIT.

Index

Constants

View Source
const (
	OAuthScopes = "OAuth.Scopes"
)

Variables

This section is empty.

Functions

func NewDeleteIndiciaImbRequest

func NewDeleteIndiciaImbRequest(server string, imb IMB, params *DeleteIndiciaImbParams) (*http.Request, error)

NewDeleteIndiciaImbRequest generates requests for DeleteIndiciaImb

func NewDeleteLabelBrandingRequest

func NewDeleteLabelBrandingRequest(server string, imageUUID LabelBrandingImageUUID, params *DeleteLabelBrandingParams) (*http.Request, error)

NewDeleteLabelBrandingRequest generates requests for DeleteLabelBranding

func NewDeleteLabelByIdempotencyRequest

func NewDeleteLabelByIdempotencyRequest(server string, params *DeleteLabelByIdempotencyParams) (*http.Request, error)

NewDeleteLabelByIdempotencyRequest generates requests for DeleteLabelByIdempotency

func NewDeleteLabelByTrackingRequest

func NewDeleteLabelByTrackingRequest(server string, trackingNumber TrackingNumber, params *DeleteLabelByTrackingParams) (*http.Request, error)

NewDeleteLabelByTrackingRequest generates requests for DeleteLabelByTracking

func NewGetListLabelBrandingRequest

func NewGetListLabelBrandingRequest(server string, params *GetListLabelBrandingParams) (*http.Request, error)

NewGetListLabelBrandingRequest generates requests for GetListLabelBranding

func NewGetSingleLabelBrandingRequest

func NewGetSingleLabelBrandingRequest(server string, imageUUID LabelBrandingImageUUID, params *GetSingleLabelBrandingParams) (*http.Request, error)

NewGetSingleLabelBrandingRequest generates requests for GetSingleLabelBranding

func NewPatchLabelBrandingRequest

func NewPatchLabelBrandingRequest(server string, imageUUID LabelBrandingImageUUID, params *PatchLabelBrandingParams, body PatchLabelBrandingJSONRequestBody) (*http.Request, error)

NewPatchLabelBrandingRequest calls the generic PatchLabelBranding builder with application/json body

func NewPatchLabelBrandingRequestWithBody

func NewPatchLabelBrandingRequestWithBody(server string, imageUUID LabelBrandingImageUUID, params *PatchLabelBrandingParams, contentType string, body io.Reader) (*http.Request, error)

NewPatchLabelBrandingRequestWithBody generates requests for PatchLabelBranding with any type of body

func NewPatchLabelEditRequest

func NewPatchLabelEditRequest(server string, trackingNumber TrackingNumber, params *PatchLabelEditParams, body PatchLabelEditJSONRequestBody) (*http.Request, error)

NewPatchLabelEditRequest calls the generic PatchLabelEdit builder with application/json body

func NewPatchLabelEditRequestWithBody

func NewPatchLabelEditRequestWithBody(server string, trackingNumber TrackingNumber, params *PatchLabelEditParams, contentType string, body io.Reader) (*http.Request, error)

NewPatchLabelEditRequestWithBody generates requests for PatchLabelEdit with any type of body

func NewPostIndiciaImbRequest

func NewPostIndiciaImbRequest(server string, params *PostIndiciaImbParams, body PostIndiciaImbJSONRequestBody) (*http.Request, error)

NewPostIndiciaImbRequest calls the generic PostIndiciaImb builder with application/json body

func NewPostIndiciaImbRequestWithBody

func NewPostIndiciaImbRequestWithBody(server string, params *PostIndiciaImbParams, contentType string, body io.Reader) (*http.Request, error)

NewPostIndiciaImbRequestWithBody generates requests for PostIndiciaImb with any type of body

func NewPostLabelBrandingRequest

func NewPostLabelBrandingRequest(server string, params *PostLabelBrandingParams, body PostLabelBrandingJSONRequestBody) (*http.Request, error)

NewPostLabelBrandingRequest calls the generic PostLabelBranding builder with application/json body

func NewPostLabelBrandingRequestWithBody

func NewPostLabelBrandingRequestWithBody(server string, params *PostLabelBrandingParams, contentType string, body io.Reader) (*http.Request, error)

NewPostLabelBrandingRequestWithBody generates requests for PostLabelBranding with any type of body

func NewPostLabelIndiciaRequest

func NewPostLabelIndiciaRequest(server string, params *PostLabelIndiciaParams, body PostLabelIndiciaJSONRequestBody) (*http.Request, error)

NewPostLabelIndiciaRequest calls the generic PostLabelIndicia builder with application/json body

func NewPostLabelIndiciaRequestWithBody

func NewPostLabelIndiciaRequestWithBody(server string, params *PostLabelIndiciaParams, contentType string, body io.Reader) (*http.Request, error)

NewPostLabelIndiciaRequestWithBody generates requests for PostLabelIndicia with any type of body

func NewPostLabelReprintByIdempotencyRequest

func NewPostLabelReprintByIdempotencyRequest(server string, params *PostLabelReprintByIdempotencyParams, body PostLabelReprintByIdempotencyJSONRequestBody) (*http.Request, error)

NewPostLabelReprintByIdempotencyRequest calls the generic PostLabelReprintByIdempotency builder with application/json body

func NewPostLabelReprintByIdempotencyRequestWithBody

func NewPostLabelReprintByIdempotencyRequestWithBody(server string, params *PostLabelReprintByIdempotencyParams, contentType string, body io.Reader) (*http.Request, error)

NewPostLabelReprintByIdempotencyRequestWithBody generates requests for PostLabelReprintByIdempotency with any type of body

func NewPostLabelReprintByTrackingRequest

func NewPostLabelReprintByTrackingRequest(server string, trackingNumber TrackingNumber, params *PostLabelReprintByTrackingParams, body PostLabelReprintByTrackingJSONRequestBody) (*http.Request, error)

NewPostLabelReprintByTrackingRequest calls the generic PostLabelReprintByTracking builder with application/json body

func NewPostLabelReprintByTrackingRequestWithBody

func NewPostLabelReprintByTrackingRequestWithBody(server string, trackingNumber TrackingNumber, params *PostLabelReprintByTrackingParams, contentType string, body io.Reader) (*http.Request, error)

NewPostLabelReprintByTrackingRequestWithBody generates requests for PostLabelReprintByTracking with any type of body

func NewPostLabelRequest

func NewPostLabelRequest(server string, params *PostLabelParams, body PostLabelJSONRequestBody) (*http.Request, error)

NewPostLabelRequest calls the generic PostLabel builder with application/json body

func NewPostLabelRequestWithBody

func NewPostLabelRequestWithBody(server string, params *PostLabelParams, contentType string, body io.Reader) (*http.Request, error)

NewPostLabelRequestWithBody generates requests for PostLabel with any type of body

func NewPostReturnLabelRequest

func NewPostReturnLabelRequest(server string, params *PostReturnLabelParams, body PostReturnLabelJSONRequestBody) (*http.Request, error)

NewPostReturnLabelRequest calls the generic PostReturnLabel builder with application/json body

func NewPostReturnLabelRequestWithBody

func NewPostReturnLabelRequestWithBody(server string, params *PostReturnLabelParams, contentType string, body io.Reader) (*http.Request, error)

NewPostReturnLabelRequestWithBody generates requests for PostReturnLabel with any type of body

Types

type Address

type Address struct {
	// CityAbbreviation This is the abbreviation of city name for the address.
	CityAbbreviation *string `json:"cityAbbreviation,omitempty"`

	// SecondaryAddress The secondary unit designator, such as apartment(APT) or suite(STE) number, defining the exact location of the address within a building.  For more information please see [Postal Explorer](https://pe.usps.com/text/pub28/28c2_003.htm).
	SecondaryAddress *string `json:"secondaryAddress,omitempty"`

	// StreetAddress The number of a building along with the name of the road or street on which it is located.
	StreetAddress *string `json:"streetAddress,omitempty"`

	// StreetAddressAbbreviation This is the abbreviation of street address line for the address.
	StreetAddressAbbreviation *string                `json:"streetAddressAbbreviation,omitempty"`
	AdditionalProperties      map[string]interface{} `json:"-"`
}

Address Address fields standard to all locations.

func (Address) Get

func (a Address) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for Address. Returns the specified element and whether it was found

func (Address) MarshalJSON

func (a Address) MarshalJSON() ([]byte, error)

Override default JSON handling for Address to handle AdditionalProperties

func (*Address) Set

func (a *Address) Set(fieldName string, value interface{})

Setter for additional properties for Address

func (*Address) UnmarshalJSON

func (a *Address) UnmarshalJSON(b []byte) error

Override default JSON handling for Address to handle AdditionalProperties

type Addressee

type Addressee struct {
	// Firm Firm/business name corresponding to the address.
	Firm *string `json:"firm,omitempty"`

	// FirstName First Name corresponding to the address.
	FirstName *string `json:"firstName,omitempty"`

	// LastName Last Name corresponding to the address.
	LastName             *string                `json:"lastName,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

Addressee Fields used to identity the entity receiving a mail piece or package

func (Addressee) Get

func (a Addressee) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for Addressee. Returns the specified element and whether it was found

func (Addressee) MarshalJSON

func (a Addressee) MarshalJSON() ([]byte, error)

Override default JSON handling for Addressee to handle AdditionalProperties

func (*Addressee) Set

func (a *Addressee) Set(fieldName string, value interface{})

Setter for additional properties for Addressee

func (*Addressee) UnmarshalJSON

func (a *Addressee) UnmarshalJSON(b []byte) error

Override default JSON handling for Addressee to handle AdditionalProperties

type AnyValue

type AnyValue = interface{}

AnyValue Can be anything: string, number, array, object, etc. (except `null`)

type BaseDomesticPackageDescription

type BaseDomesticPackageDescription struct {
	// CarrierRelease Indicates whether recipients authorize a carrier to leave a shipment if no one is available to receive it at the time of delivery. Priority Mail Express® shipments or items requiring a signature at delivery are not eligible (e.g. Signature Confirmation, Insurance > $500).
	//
	// Note:
	//  * Carrier Release is currently not supported when `holdForPickup` is set to `true`.
	//  * Carrier Release is currently not supported with mail class values of `PRIORITY_MAIL`, `PRIORITY_MAIL_EXPRESS`, or `USPS_GROUND_ADVANTAGE`.
	//  * Carrier Release is currently not supported with `extraServices` `910`, `911`, `912`, `913`, `921`, `922`, `923`, `924`, `925`, `930`, `931`, `934`, `955`, or `981`.
	CarrierRelease *bool `json:"carrierRelease,omitempty"`

	// CustomerReference Used for shippers to print a value on a label and included in the Shipping Services File (SSF).
	//
	// Note:
	//  * Customer Reference #3-4 are only supported with label types `4X5LABEL`, `4X6LABEL`, and `6X4LABEL`.
	//  * Customer Reference #3-4 cannot be used with a customs form.
	//  * Customer Reference #3-4 will not be added to the SSF.
	//  * Customer Reference will not display with `imageInfo.brandingImageFormat` value of `RECTANGLE`.
	//  * When Customer Reference #4 is provided with a Destination Entry Facility, the Drop-Off Location will not be displayed on the label.
	CustomerReference *[]DomesticCustomerReference `json:"customerReference,omitempty"`

	// DestinationEntryFacilityAddress Address fields for US locations
	DestinationEntryFacilityAddress *DomesticAddress `json:"destinationEntryFacilityAddress,omitempty"`

	// DestinationEntryFacilityType Types of Facilities:
	// * `NONE` - Translate to Destination Rate Indicator N
	// * `DESTINATION_NETWORK_DISTRIBUTION_CENTER` - Translate to Destination Rate Indicator B
	// * `DESTINATION_SECTIONAL_CENTER_FACILITY` - Translate to Destination Rate Indicator S
	// * `DESTINATION_DELIVERY_UNIT` - Translate to Destination Rate Indicator D
	// * `DESTINATION_SERVICE_HUB` - Translate to Destination Rate Indicator H
	// * `DESTINATION_REGIONAL_PROCESSING_DISTRIBUTION_CENTER` - Translate to Destination Rate Indicator B
	//
	// Note:
	// * If any value other than `NONE` is selected, a destinationEntryFacilityAddress is required.
	// * The destinationEntryFacilityAddress must be a valid facility to drop your package
	// * The destination entry facility type must be set to `NONE` when there is a value provided for the 'inductionZipCode' field
	// * Effective 01/19/2025: `DESTINATION_DELIVERY_UNIT` is the only valid enumeration when using the 'USPS_CONNECT_MAIL' mail class
	// * Effective 01/18/2026: `DESTINATION_NETWORK_DISTRIBUTION_CENTER` with `PARCEL_SELECT` is no longer eligible.
	// * Effective 01/18/2026: (NSA Only) `DESTINATION_REGIONAL_PROCESSING_DISTRIBUTION_CENTER` with `PARCEL_SELECT` is available as an option.
	DestinationEntryFacilityType BaseDomesticPackageDescriptionDestinationEntryFacilityType `json:"destinationEntryFacilityType"`

	// DimensionsUOM Dimensions unit of measure
	// * in - Inches
	DimensionsUOM *BaseDomesticPackageDescriptionDimensionsUOM `json:"dimensionsUOM,omitempty"`

	// ExtraServices Extra Service Code requested.
	// * 365 - Global Direct Entry
	// * 415 - USPS Label Delivery
	// * 480 - Tracking Plus 6 Months
	// * 481 - Tracking Plus 1 Year
	// * 482 - Tracking Plus 3 Years
	// * 483 - Tracking Plus 5 Years
	// * 484 - Tracking Plus 7 Years
	// * 485 - Tracking Plus 10 Years
	// * 486 - Tracking Plus Signature 3 Years
	// * 487 - Tracking Plus Signature 5 Years
	// * 488 - Tracking Plus Signature 7 Years
	// * 489 - Tracking Plus Signature 10 Years
	// * 810 - HAZMAT Air Eligible Ethanol Package
	// * 811 - HAZMAT Class 1 - Toy Propellant/Safety Fuse Package
	// * 812 - HAZMAT Class 3 – Flammable Liquid Package
	// * 813 - HAZMAT Class 7 - Radioactive Materials Package
	// * 814 - HAZMAT Class 8 - Corrosive Materials Package
	// * 815 - HAZMAT Class 8 - Nonspillable Wet Battery Package
	// * 816 - HAZMAT Class 9 - Lithium Battery Marked - Ground Only Package
	// * 817 - HAZMAT Class 9 - Lithium Battery - Returns Package
	// * 818 - HAZMAT Class 9 - Lithium batteries, marked package
	// * 819 - HAZMAT Class 9 - Dry Ice Package
	// * 820 - HAZMAT Class 9 - Lithium batteries, unmarked package
	// * 821 - HAZMAT Class 9 - Magnetized Materials Package
	// * 822 - HAZMAT Division 4.1 – Flammable Solids or Safety Matches Package
	// * 823 - HAZMAT Division 5.1 - Oxidizers Package
	// * 824 - HAZMAT Division 5.2 - Organic Peroxides Package
	// * 825 - HAZMAT Division 6.1 – Toxic Materials Package
	// * 826 - HAZMAT Division 6.2 – Infectious Substances Package
	// * 827 - HAZMAT Excepted Quantity Provision Package
	// * 828 - HAZMAT Ground Only
	// * 829 - HAZMAT ID8000 Consumer Commodity Package
	// * 830 - HAZMAT Lighters Package
	// * 831 - HAZMAT LTD QTY Ground Package
	// * 832 - HAZMAT Small Quantity Provision Package
	// * 857 - Hazardous Material
	// * 910 - Certified Mail
	// * 911 - Certified Mail Restricted Delivery
	// * 912 - Certified Mail Adult Signature Required
	// * 913 - Certified Mail Adult Signature Restricted Delivery
	// * 920 - USPS Tracking
	// * 921 - Signature Confirmation
	// * 922 - Adult Signature Required 21 or Over
	// * 923 - Adult Signature Restricted Delivery 21 or Over
	// * 924 - Signature Confirmation Restricted Delivery
	// * 925 - Priority Mail Express Merchandise Insurance
	// * 930 - Insurance <= $500
	// * 931 - Insurance > $500
	// * 934 - Insurance Restricted Delivery
	// * 955 - Return Receipt
	// * 957 - Return Receipt Electronic
	// * 981 - Signature Requested (PRIORITY_MAIL_EXPRESS only)
	// * 986 - PO to Addressee (PRIORITY_MAIL_EXPRESS only)
	// * 991 - Sunday Delivery
	//
	// Note:
	// * When the extra service code "930" is provided in the request, if the item value is over $500, "930" will automatically be replaced with "931" - Insurance (Greater than $500).
	// * USPS Label Delivery (Print and Deliver, extra service code "415"): When requesting this service, no images will be returned in the API response. The label and receipt will be printed and mailed to the `fromAddress` provided. The mailed label will always include a receipt on the page. This service is not available at all locations.
	// * Some service codes require a combination with extra services such as "955" and "957". For all valid combinations, visit [https://postalpro.usps.com/IMPB_Service_Type_Codes](https://postalpro.usps.com/IMPB_Service_Type_Codes).
	ExtraServices *[]ExtraService `json:"extraServices,omitempty"`

	// Girth The girth of the container, in dimensionsUOM. If partial dimensions are provided, an error response will return. Length, Width, Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. In addition, Girth is required only for a non- rectangular package in addition to Length, Width, Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non- rectangular packages.
	Girth *float32 `json:"girth,omitempty"`

	// HasNonstandardCharacteristics Package is nonstandard. Nonstandard packages include cylindrical tubes and rolls, certain high-density items, cartons containing more than 24 ounces of liquids in one or more glass containers, cartons containing 1 gallon or more of liquid in metal or plastic containers, and items in [201.7.6.2](https://pe.usps.com/text/dmm300/201.htm#7.6.2).
	HasNonstandardCharacteristics *bool `json:"hasNonstandardCharacteristics,omitempty"`

	// Height The height of the container, in dimensionsUOM. If partial dimensions are provided, an error response will return. Length, Width, and Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. Girth is required only for a non-rectangular package in addition to Length, Width, and Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non-rectangular packages.
	Height float32 `json:"height"`

	// InductionZIPCode The 5-Digit ZIP Code representing the location where the package is being inducted (i.e. dropped off) into the mailstream.  When provided, this ZIP Code will be used for pricing instead of `fromAddress.ZIPCode`.
	InductionZIPCode *InductionZIPCode `json:"inductionZIPCode,omitempty"`

	// Length The length of the container, in dimensionsUOM. If partial dimensions are provided, an error response will return. Length, Width, and Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. Girth is required only for a non-rectangular package in addition to Length, Width, and Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non-rectangular packages.
	Length float32 `json:"length"`

	// LogisticsManagerMID This is the mailer ID associated with the logistics manager for this label This provides an additional copy of the scan extract file to the MID's outbound folder.
	LogisticsManagerMID *string `json:"logisticsManagerMID,omitempty"`

	// MailClass The mail service requested.
	//
	// Note:
	// - `PARCEL_SELECT` with a `destinationEntryFacilityType` of `NONE` will convert to `USPS_GROUND_ADVANTAGE`.
	// - `PARCEL_SELECT_LIGHTWEIGHT` is deprecated and will convert to `PARCEL_SELECT`.
	// - `FIRST-CLASS_PACKAGE_SERVICE` is deprecated and will convert to `USPS_GROUND_ADVANTAGE`.
	// - Certain mail classes, such as `MEDIA_MAIL`, `BOUND_PRINTED_MATTER`, and `LIBRARY_MAIL`, have eligibility rules on what can be mailed using that service.  For more details on these mail classes, please visit [What are Package Services?](https://faq.usps.com/s/article/What-are-Package-Services).
	// - The Heavy Printed Matter product is supported with `MARKETING_MAIL_PARCELS`. To create Heavy Printed Matter labels, the `rateIndicator` should be set to `PR` or `NP` for Presorted or Nonpresorted USPS Marketing Mail Parcels Heavy Printed Matter or to `PN` or `NN` for Nonprofit Presorted or Nonpresorted USPS Marketing Mail Parcels Heavy Printed Matter respectively.
	MailClass BaseDomesticPackageDescriptionMailClass `json:"mailClass"`

	// MailOwnerMID This is the mailer ID associated with the mail owner for this label This provides an additional copy of the scan extract file to the MID's outbound folder.
	MailOwnerMID *string `json:"mailOwnerMID,omitempty"`

	// MailingDate The local date on which the package will be mailed. If the time is not provided, it will be defaulted to 10:00 p.m. local time.  Local time will be based on the `destinationEntryFacilityAddress.ZIPCode` or `inductionZIPCode` when provided, otherwise `fromAddress.ZIPCode` will be used as the origin ZIP Code.
	MailingDate string `json:"mailingDate"`

	// Nonprofit Used to specify if the shipment is a nonprofit mailing.  Shippers must be authorized for nonprofit mailings to qualify for nonprofit pricing.  All nonprofit mailings must not be used for product fulfillment.  For more details on Nonprofit Mailers, visit [Nonprofit Mailers](https://pe.usps.com/BusinessMail101?ViewName=NonprofitPrices).
	//
	// When `nonprofit` is `true` and `mailClass` is `MARKETING_MAIL_PARCELS`, nonprofit rates will be applied.  When using `rateIndicator` values, the `rateIndicator` must also be `NN` or `PN`.
	//
	// When `nonprofit` is `false` and `mailClass` is `MARKETING_MAIL_PARCELS`, standard rates will be applied.
	//
	// `nonprofit` is not supported for any other mail class.
	Nonprofit      *Nonprofit                                     `json:"nonprofit,omitempty"`
	PackageOptions *BaseDomesticPackageDescription_PackageOptions `json:"packageOptions,omitempty"`

	// PhysicalSignatureRequired Indicates the method for the signature that will be used when signing for the package.  Required when requesting signature `extraServices` including `910`, `911`, `912`, `913`, `921`, `922`, `923`, `924`, `925`, `931`, `934`, `955`, and `981`.  Additionally required when requesting `extraServices` code `930` with a `packageValue` greater than $500.
	//
	// When `physicalSignatureRequired` is `false`, a USPS Electronic Signature Online (USPS eSOL) may be used to sign for the item.  For more information on USPS eSOL, please visit the [USPS eSOL FAQ](https://faq.usps.com/s/article/USPS-Electronic-Signature-Online).
	//
	// When `physicalSignatureRequired` is `true`, the recipient will be required to physically sign for the item.  A USPS eSOL on record will not be accepted as a valid signature for the item.
	//
	// Notes:
	//  * Regardless of the boolean, the printed label will still display "SIGNATURE REQUIRED" if a signature service is included with the label.
	//  * `carrierRelease` is not eligible to be used with `physicalSignatureRequired`.
	PhysicalSignatureRequired *bool `json:"physicalSignatureRequired,omitempty"`

	// ProcessingCategory Value designates if shipment is `MACHINABLE`, `NONSTANDARD`, `LETTERS`, or `FLATS`.
	//
	// Note:
	// * When requesting the mail class `USPS_CONNECT_MAIL`, users are required to use a processing category of `FLATS`.
	// * The processing category `LETTERS` is only valid for mail classes `PRIORITY_MAIL` and `PRIORITY_MAIL_EXPRESS` for outbound shipments.
	// * The processing category `FLATS` is not valid for mail class `USPS_GROUND_ADVANTAGE`.
	// * `IRREGULAR` is deprecated and will convert to `NONSTANDARD` as of 01/19/2025.
	// * `NON_MACHINABLE` is deprecated and will convert to `NONSTANDARD` as of 01/19/2025.
	ProcessingCategory BaseDomesticPackageDescriptionProcessingCategory `json:"processingCategory"`

	// SerialNumberFormat Used to specify the barcode construct used for the generated tracking number.  For details on barcode constructs, reference Appendix J in [Pub 199](https://postalpro.usps.com/pub199).
	//
	// `STANDARD` - Will generate a `C01`, `C03`, `C05`, or `C07` barcode construct, based on the Label Owner's `MID` in the Payment Authorization Token.
	//
	// `EXTENDED` - Will generate a `C02` or `C06` barcode construct, based on the Label Owner's `MID` in the Payment Authorization Token.
	SerialNumberFormat *SerialNumberFormat `json:"serialNumberFormat,omitempty"`

	// ShipperVisibilityMethod When generating labels for a third party shipper the label provider must capture and provide contact details of the individual or entity to whom they provide the label. There are two methods for reporting shipper information to USPS:
	//
	// 1. The label provider creates a unique USPS Mailer ID (MID) using the name, validated address, phone, and email contact information of each shipper. When using this method the Mailer ID should be submitted in the MID field in the LABEL_OWNER role when generating the payment authorization token and this field should be populated with 'MID_INFORMATION'
	//
	// 2. An alternative method allows for the label provider to assign a unique alphanumeric value known as a platformUserId to each shipper and to report the platformUserId together with the required shipper contact details. When using this method the shipper contact details are required in the `senderAddress` object (including `streetAddress`, `city`, `state`, `ZIPCode`, `phone`, `email`, `platformUserId` & `firstName`/`lastName` or `firm`) and this field should be populated with 'SENDER_INFORMATION'.
	ShipperVisibilityMethod *BaseDomesticPackageDescriptionShipperVisibilityMethod `json:"shipperVisibilityMethod,omitempty"`

	// Weight The package weight, in weightUOM (Unit Of Measure). Items must weigh 70 pounds (1120 ounces) or less.
	Weight float32 `json:"weight"`

	// WeightUOM Weight Unit of Measurement
	//   * lb - Pounds
	WeightUOM *BaseDomesticPackageDescriptionWeightUOM `json:"weightUOM,omitempty"`

	// Width The width of the container, in dimensionsUOM. If partial dimensions are provided, an error response will return. Length, Width, and Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. Girth is required only for a non-rectangular package in addition to Length, Width, and Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non- rectangular packages.
	Width                float32                `json:"width"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

BaseDomesticPackageDescription defines model for BaseDomesticPackageDescription.

func (BaseDomesticPackageDescription) Get

func (a BaseDomesticPackageDescription) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for BaseDomesticPackageDescription. Returns the specified element and whether it was found

func (BaseDomesticPackageDescription) MarshalJSON

func (a BaseDomesticPackageDescription) MarshalJSON() ([]byte, error)

Override default JSON handling for BaseDomesticPackageDescription to handle AdditionalProperties

func (*BaseDomesticPackageDescription) Set

func (a *BaseDomesticPackageDescription) Set(fieldName string, value interface{})

Setter for additional properties for BaseDomesticPackageDescription

func (*BaseDomesticPackageDescription) UnmarshalJSON

func (a *BaseDomesticPackageDescription) UnmarshalJSON(b []byte) error

Override default JSON handling for BaseDomesticPackageDescription to handle AdditionalProperties

type BaseDomesticPackageDescriptionDestinationEntryFacilityType

type BaseDomesticPackageDescriptionDestinationEntryFacilityType string

BaseDomesticPackageDescriptionDestinationEntryFacilityType Types of Facilities: * `NONE` - Translate to Destination Rate Indicator N * `DESTINATION_NETWORK_DISTRIBUTION_CENTER` - Translate to Destination Rate Indicator B * `DESTINATION_SECTIONAL_CENTER_FACILITY` - Translate to Destination Rate Indicator S * `DESTINATION_DELIVERY_UNIT` - Translate to Destination Rate Indicator D * `DESTINATION_SERVICE_HUB` - Translate to Destination Rate Indicator H * `DESTINATION_REGIONAL_PROCESSING_DISTRIBUTION_CENTER` - Translate to Destination Rate Indicator B

Note: * If any value other than `NONE` is selected, a destinationEntryFacilityAddress is required. * The destinationEntryFacilityAddress must be a valid facility to drop your package * The destination entry facility type must be set to `NONE` when there is a value provided for the 'inductionZipCode' field * Effective 01/19/2025: `DESTINATION_DELIVERY_UNIT` is the only valid enumeration when using the 'USPS_CONNECT_MAIL' mail class * Effective 01/18/2026: `DESTINATION_NETWORK_DISTRIBUTION_CENTER` with `PARCEL_SELECT` is no longer eligible. * Effective 01/18/2026: (NSA Only) `DESTINATION_REGIONAL_PROCESSING_DISTRIBUTION_CENTER` with `PARCEL_SELECT` is available as an option.

const (
	BaseDomesticPackageDescriptionDestinationEntryFacilityTypeDESTINATIONDELIVERYUNIT                         BaseDomesticPackageDescriptionDestinationEntryFacilityType = "DESTINATION_DELIVERY_UNIT"
	BaseDomesticPackageDescriptionDestinationEntryFacilityTypeDESTINATIONNETWORKDISTRIBUTIONCENTER            BaseDomesticPackageDescriptionDestinationEntryFacilityType = "DESTINATION_NETWORK_DISTRIBUTION_CENTER"
	BaseDomesticPackageDescriptionDestinationEntryFacilityTypeDESTINATIONREGIONALPROCESSINGDISTRIBUTIONCENTER BaseDomesticPackageDescriptionDestinationEntryFacilityType = "DESTINATION_REGIONAL_PROCESSING_DISTRIBUTION_CENTER"
	BaseDomesticPackageDescriptionDestinationEntryFacilityTypeDESTINATIONSECTIONALCENTERFACILITY              BaseDomesticPackageDescriptionDestinationEntryFacilityType = "DESTINATION_SECTIONAL_CENTER_FACILITY"
	BaseDomesticPackageDescriptionDestinationEntryFacilityTypeDESTINATIONSERVICEHUB                           BaseDomesticPackageDescriptionDestinationEntryFacilityType = "DESTINATION_SERVICE_HUB"
	BaseDomesticPackageDescriptionDestinationEntryFacilityTypeNONE                                            BaseDomesticPackageDescriptionDestinationEntryFacilityType = "NONE"
)

Defines values for BaseDomesticPackageDescriptionDestinationEntryFacilityType.

type BaseDomesticPackageDescriptionDimensionsUOM

type BaseDomesticPackageDescriptionDimensionsUOM string

BaseDomesticPackageDescriptionDimensionsUOM Dimensions unit of measure * in - Inches

const (
	BaseDomesticPackageDescriptionDimensionsUOMIn BaseDomesticPackageDescriptionDimensionsUOM = "in"
)

Defines values for BaseDomesticPackageDescriptionDimensionsUOM.

type BaseDomesticPackageDescriptionMailClass

type BaseDomesticPackageDescriptionMailClass string

BaseDomesticPackageDescriptionMailClass The mail service requested.

Note: - `PARCEL_SELECT` with a `destinationEntryFacilityType` of `NONE` will convert to `USPS_GROUND_ADVANTAGE`. - `PARCEL_SELECT_LIGHTWEIGHT` is deprecated and will convert to `PARCEL_SELECT`. - `FIRST-CLASS_PACKAGE_SERVICE` is deprecated and will convert to `USPS_GROUND_ADVANTAGE`. - Certain mail classes, such as `MEDIA_MAIL`, `BOUND_PRINTED_MATTER`, and `LIBRARY_MAIL`, have eligibility rules on what can be mailed using that service. For more details on these mail classes, please visit [What are Package Services?](https://faq.usps.com/s/article/What-are-Package-Services). - The Heavy Printed Matter product is supported with `MARKETING_MAIL_PARCELS`. To create Heavy Printed Matter labels, the `rateIndicator` should be set to `PR` or `NP` for Presorted or Nonpresorted USPS Marketing Mail Parcels Heavy Printed Matter or to `PN` or `NN` for Nonprofit Presorted or Nonpresorted USPS Marketing Mail Parcels Heavy Printed Matter respectively.

const (
	BaseDomesticPackageDescriptionMailClassBOUNDPRINTEDMATTER       BaseDomesticPackageDescriptionMailClass = "BOUND_PRINTED_MATTER"
	BaseDomesticPackageDescriptionMailClassFIRSTCLASSPACKAGESERVICE BaseDomesticPackageDescriptionMailClass = "FIRST-CLASS_PACKAGE_SERVICE"
	BaseDomesticPackageDescriptionMailClassLIBRARYMAIL              BaseDomesticPackageDescriptionMailClass = "LIBRARY_MAIL"
	BaseDomesticPackageDescriptionMailClassMARKETINGMAILPARCELS     BaseDomesticPackageDescriptionMailClass = "MARKETING_MAIL_PARCELS"
	BaseDomesticPackageDescriptionMailClassMEDIAMAIL                BaseDomesticPackageDescriptionMailClass = "MEDIA_MAIL"
	BaseDomesticPackageDescriptionMailClassPARCELSELECT             BaseDomesticPackageDescriptionMailClass = "PARCEL_SELECT"
	BaseDomesticPackageDescriptionMailClassPARCELSELECTLIGHTWEIGHT  BaseDomesticPackageDescriptionMailClass = "PARCEL_SELECT_LIGHTWEIGHT"
	BaseDomesticPackageDescriptionMailClassPRIORITYMAIL             BaseDomesticPackageDescriptionMailClass = "PRIORITY_MAIL"
	BaseDomesticPackageDescriptionMailClassPRIORITYMAILEXPRESS      BaseDomesticPackageDescriptionMailClass = "PRIORITY_MAIL_EXPRESS"
	BaseDomesticPackageDescriptionMailClassUSPSCONNECTLOCAL         BaseDomesticPackageDescriptionMailClass = "USPS_CONNECT_LOCAL"
	BaseDomesticPackageDescriptionMailClassUSPSCONNECTMAIL          BaseDomesticPackageDescriptionMailClass = "USPS_CONNECT_MAIL"
	BaseDomesticPackageDescriptionMailClassUSPSCONNECTREGIONAL      BaseDomesticPackageDescriptionMailClass = "USPS_CONNECT_REGIONAL"
	BaseDomesticPackageDescriptionMailClassUSPSGROUNDADVANTAGE      BaseDomesticPackageDescriptionMailClass = "USPS_GROUND_ADVANTAGE"
)

Defines values for BaseDomesticPackageDescriptionMailClass.

type BaseDomesticPackageDescriptionPackageOptionsAncillaryServiceEndorsements

type BaseDomesticPackageDescriptionPackageOptionsAncillaryServiceEndorsements string

BaseDomesticPackageDescriptionPackageOptionsAncillaryServiceEndorsements Endorsements allow the sender to obtain the addressee's new (forwarding) address (provided the appropriate endorsement is used and if the addressee filed a Change-of-Address Order with the Postal Service) or the reason for non-delivery. For more information see [PostalPro](https://postalpro.usps.com/address-quality/ancillary-service-endorsements).

Note:

  • Ancillary Service Endorsements are currently not supported when 'holdForPickup' is set to 'true'.
  • 'CHANGE_SERVICE_REQUESTED' with a mail class value of 'PRIORITY_MAIL' currently only supports a contentType of 'PERISHABLE'.
  • 'CHANGE_SERVICE_REQUESTED' cannot be requested with a 'contentType' of 'HAZMAT' or any hazmat shipments.
  • 'CHANGE_SERVICE_REQUESTED' with mail classes 'PARCEL_SELECT', 'USPS_GROUND_ADVANTAGE', and 'PRIORITY_MAIL' can only be used with extraServices '920' and '921'.
  • Ancillary Service Endorsements are currently only supported with mail class values 'PARCEL_SELECT', 'USPS_GROUND_ADVANTAGE', 'PRIORITY_MAIL', and 'PRIORITY_MAIL_EXPRESS'.
  • 'ELECTRONIC_SERVICE_REQUESTED' with a mail class value of 'PARCEL_SELECT' cannot be requested with a 'contentType' of 'HAZMAT' or any hazmat shipments.
const (
	BaseDomesticPackageDescriptionPackageOptionsAncillaryServiceEndorsementsADDRESSSERVICEREQUESTED    BaseDomesticPackageDescriptionPackageOptionsAncillaryServiceEndorsements = "ADDRESS_SERVICE_REQUESTED"
	BaseDomesticPackageDescriptionPackageOptionsAncillaryServiceEndorsementsCHANGESERVICEREQUESTED     BaseDomesticPackageDescriptionPackageOptionsAncillaryServiceEndorsements = "CHANGE_SERVICE_REQUESTED"
	BaseDomesticPackageDescriptionPackageOptionsAncillaryServiceEndorsementsELECTRONICSERVICEREQUESTED BaseDomesticPackageDescriptionPackageOptionsAncillaryServiceEndorsements = "ELECTRONIC_SERVICE_REQUESTED"
	BaseDomesticPackageDescriptionPackageOptionsAncillaryServiceEndorsementsFORWARDINGSERVICEREQUESTED BaseDomesticPackageDescriptionPackageOptionsAncillaryServiceEndorsements = "FORWARDING_SERVICE_REQUESTED"
	BaseDomesticPackageDescriptionPackageOptionsAncillaryServiceEndorsementsRETURNSERVICEREQUESTED     BaseDomesticPackageDescriptionPackageOptionsAncillaryServiceEndorsements = "RETURN_SERVICE_REQUESTED"
	BaseDomesticPackageDescriptionPackageOptionsAncillaryServiceEndorsementsTEMPRETURNSERVICEREQUESTED BaseDomesticPackageDescriptionPackageOptionsAncillaryServiceEndorsements = "TEMP_RETURN_SERVICE_REQUESTED"
)

Defines values for BaseDomesticPackageDescriptionPackageOptionsAncillaryServiceEndorsements.

type BaseDomesticPackageDescriptionPackageOptionsContentType

type BaseDomesticPackageDescriptionPackageOptionsContentType string

BaseDomesticPackageDescriptionPackageOptionsContentType The type of contents in the package.

Note: * `CREMATED_REMAINS` is currently only eligible for the `PRIORITY_MAIL_EXPRESS` mail class and is not eligible for Hold for Pickup shipments. Please refer to [Publication 139](https://about.usps.com/publications/pub139/welcome.htm) for guidelines on how to package and ship `CREMATED_REMAINS`. * `DAY_OLD_POULTRY` is currently only eligible with mail class values of `USPS_GROUND_ADVANTAGE`, `PRIORITY_MAIL` and `PRIORITY_MAIL_EXPRESS`. * Shipments that contain Live Animals or Perishables will incur a Live Animal and Perishables Handling Fee per mail piece. Content types `HAZMAT`, `CREMATED_REMAINS`, and `MEDICAL_SUPPLIES` do not apply and will not incur a fee. For `DAY_OLD_POULTRY` shipments only, an additional Live Animal Transport Fee per pound is applied. For more information, please visit [Live Animals Transportation Fee FAQ](https://faq.usps.com/s/article/Live-Animal-Transportation-Fee#:~:text=The%20Live%20Animal%20Transportation%20fee%20is%20charged%20%240.20%20per%20pound,prices%20to%20Zones%205%2D9) * `HAZMAT` domestic labels with destination addresses to APO/FPO/DPO and PTFAS (except Puerto Rico) will not contain any Hazmat markings/indicators, including service type codes in the IMpb. When users indicate a shipment contains hazmat materials in the API request (via content type and/or extra services), that information will still be captured and sent in the shipping services file. For more information, please review the [USPS APIs release notes](https://postalpro.usps.gov/usps-apis-releases) * For guidelines on shipping Perishable and Hazardous Material, please refer to [Publication 52](https://pe.usps.com/text/pub52/welcome.htm). * For ZIP codes with restrictions:

  • Please refer to the most recent [Postal Bulletin](https://about.usps.com/resources/postal-bulletin.htm) ZIP restriction table for more information. You can find this data under `Pull-Out information` -> `Other Information` -> `Overseas Military/Diplomatic Mail`.
  • When restriction `M` applies, then `BEES`, `DAY_OLD_POULTRY`, `ADULT_BIRDS`, `OTHER_LIVES`, `FRUITS`, `VEGETABLES`, and `LIVE_PLANTS` are not allowed.
  • When restriction `X` applies, then `CREMATED_REMAINS` are not allowed.
const (
	BaseDomesticPackageDescriptionPackageOptionsContentTypeADULTBIRDS      BaseDomesticPackageDescriptionPackageOptionsContentType = "ADULT_BIRDS"
	BaseDomesticPackageDescriptionPackageOptionsContentTypeBEES            BaseDomesticPackageDescriptionPackageOptionsContentType = "BEES"
	BaseDomesticPackageDescriptionPackageOptionsContentTypeCREMATEDREMAINS BaseDomesticPackageDescriptionPackageOptionsContentType = "CREMATED_REMAINS"
	BaseDomesticPackageDescriptionPackageOptionsContentTypeDAYOLDPOULTRY   BaseDomesticPackageDescriptionPackageOptionsContentType = "DAY_OLD_POULTRY"
	BaseDomesticPackageDescriptionPackageOptionsContentTypeFRUITS          BaseDomesticPackageDescriptionPackageOptionsContentType = "FRUITS"
	BaseDomesticPackageDescriptionPackageOptionsContentTypeHAZMAT          BaseDomesticPackageDescriptionPackageOptionsContentType = "HAZMAT"
	BaseDomesticPackageDescriptionPackageOptionsContentTypeLIVEPLANTS      BaseDomesticPackageDescriptionPackageOptionsContentType = "LIVE_PLANTS"
	BaseDomesticPackageDescriptionPackageOptionsContentTypeMEDICALSUPPLIES BaseDomesticPackageDescriptionPackageOptionsContentType = "MEDICAL_SUPPLIES"
	BaseDomesticPackageDescriptionPackageOptionsContentTypeOTHERLIVES      BaseDomesticPackageDescriptionPackageOptionsContentType = "OTHER_LIVES"
	BaseDomesticPackageDescriptionPackageOptionsContentTypePERISHABLE      BaseDomesticPackageDescriptionPackageOptionsContentType = "PERISHABLE"
	BaseDomesticPackageDescriptionPackageOptionsContentTypePHARMACEUTICALS BaseDomesticPackageDescriptionPackageOptionsContentType = "PHARMACEUTICALS"
	BaseDomesticPackageDescriptionPackageOptionsContentTypeVEGETABLES      BaseDomesticPackageDescriptionPackageOptionsContentType = "VEGETABLES"
)

Defines values for BaseDomesticPackageDescriptionPackageOptionsContentType.

type BaseDomesticPackageDescriptionPackageOptionsNonDeliveryOption

type BaseDomesticPackageDescriptionPackageOptionsNonDeliveryOption string

BaseDomesticPackageDescriptionPackageOptionsNonDeliveryOption Requested action in the case a package is undeliverable:

  • `RETURN` for package to be returned to `fromAddress`.
  • `REDIRECT` to return package to address specified in the `redirectAddress`.
  • `ABANDON` to dispose of undeliverable package

Note:

  • `REDIRECT` and `ABANDON` will not impact the domestic package endpoint. Please use ancillary service endorsements instead.
  • An address must be provided in `redirectAddress` when a value of `REDIRECT` is provided.
const (
	BaseDomesticPackageDescriptionPackageOptionsNonDeliveryOptionABANDON  BaseDomesticPackageDescriptionPackageOptionsNonDeliveryOption = "ABANDON"
	BaseDomesticPackageDescriptionPackageOptionsNonDeliveryOptionREDIRECT BaseDomesticPackageDescriptionPackageOptionsNonDeliveryOption = "REDIRECT"
	BaseDomesticPackageDescriptionPackageOptionsNonDeliveryOptionRETURN   BaseDomesticPackageDescriptionPackageOptionsNonDeliveryOption = "RETURN"
)

Defines values for BaseDomesticPackageDescriptionPackageOptionsNonDeliveryOption.

type BaseDomesticPackageDescriptionProcessingCategory

type BaseDomesticPackageDescriptionProcessingCategory string

BaseDomesticPackageDescriptionProcessingCategory Value designates if shipment is `MACHINABLE`, `NONSTANDARD`, `LETTERS`, or `FLATS`.

Note: * When requesting the mail class `USPS_CONNECT_MAIL`, users are required to use a processing category of `FLATS`. * The processing category `LETTERS` is only valid for mail classes `PRIORITY_MAIL` and `PRIORITY_MAIL_EXPRESS` for outbound shipments. * The processing category `FLATS` is not valid for mail class `USPS_GROUND_ADVANTAGE`. * `IRREGULAR` is deprecated and will convert to `NONSTANDARD` as of 01/19/2025. * `NON_MACHINABLE` is deprecated and will convert to `NONSTANDARD` as of 01/19/2025.

const (
	BaseDomesticPackageDescriptionProcessingCategoryFLATS         BaseDomesticPackageDescriptionProcessingCategory = "FLATS"
	BaseDomesticPackageDescriptionProcessingCategoryIRREGULAR     BaseDomesticPackageDescriptionProcessingCategory = "IRREGULAR"
	BaseDomesticPackageDescriptionProcessingCategoryLETTERS       BaseDomesticPackageDescriptionProcessingCategory = "LETTERS"
	BaseDomesticPackageDescriptionProcessingCategoryMACHINABLE    BaseDomesticPackageDescriptionProcessingCategory = "MACHINABLE"
	BaseDomesticPackageDescriptionProcessingCategoryNONMACHINABLE BaseDomesticPackageDescriptionProcessingCategory = "NON_MACHINABLE"
	BaseDomesticPackageDescriptionProcessingCategoryNONSTANDARD   BaseDomesticPackageDescriptionProcessingCategory = "NONSTANDARD"
)

Defines values for BaseDomesticPackageDescriptionProcessingCategory.

type BaseDomesticPackageDescriptionShipperVisibilityMethod

type BaseDomesticPackageDescriptionShipperVisibilityMethod string

BaseDomesticPackageDescriptionShipperVisibilityMethod When generating labels for a third party shipper the label provider must capture and provide contact details of the individual or entity to whom they provide the label. There are two methods for reporting shipper information to USPS:

1. The label provider creates a unique USPS Mailer ID (MID) using the name, validated address, phone, and email contact information of each shipper. When using this method the Mailer ID should be submitted in the MID field in the LABEL_OWNER role when generating the payment authorization token and this field should be populated with 'MID_INFORMATION'

2. An alternative method allows for the label provider to assign a unique alphanumeric value known as a platformUserId to each shipper and to report the platformUserId together with the required shipper contact details. When using this method the shipper contact details are required in the `senderAddress` object (including `streetAddress`, `city`, `state`, `ZIPCode`, `phone`, `email`, `platformUserId` & `firstName`/`lastName` or `firm`) and this field should be populated with 'SENDER_INFORMATION'.

const (
	BaseDomesticPackageDescriptionShipperVisibilityMethodMIDINFORMATION    BaseDomesticPackageDescriptionShipperVisibilityMethod = "MID_INFORMATION"
	BaseDomesticPackageDescriptionShipperVisibilityMethodSENDERINFORMATION BaseDomesticPackageDescriptionShipperVisibilityMethod = "SENDER_INFORMATION"
)

Defines values for BaseDomesticPackageDescriptionShipperVisibilityMethod.

type BaseDomesticPackageDescriptionWeightUOM

type BaseDomesticPackageDescriptionWeightUOM string

BaseDomesticPackageDescriptionWeightUOM Weight Unit of Measurement

  • lb - Pounds
const (
	BaseDomesticPackageDescriptionWeightUOMLb BaseDomesticPackageDescriptionWeightUOM = "lb"
)

Defines values for BaseDomesticPackageDescriptionWeightUOM.

type BaseDomesticPackageDescription_PackageOptions

type BaseDomesticPackageDescription_PackageOptions struct {
	// AncillaryServiceEndorsements Endorsements allow the sender to obtain the addressee's new (forwarding) address
	// (provided the appropriate endorsement is used and if the addressee filed a
	// Change-of-Address Order with the Postal Service) or the reason for non-delivery.
	// For more information see [PostalPro](https://postalpro.usps.com/address-quality/ancillary-service-endorsements).
	//
	// Note:
	//   * Ancillary Service Endorsements are currently not supported when 'holdForPickup' is set to 'true'.
	//   * 'CHANGE_SERVICE_REQUESTED' with a mail class value of 'PRIORITY_MAIL' currently only supports a contentType of 'PERISHABLE'.
	//   * 'CHANGE_SERVICE_REQUESTED' cannot be requested with a 'contentType' of 'HAZMAT' or any hazmat shipments.
	//   * 'CHANGE_SERVICE_REQUESTED' with mail classes 'PARCEL_SELECT', 'USPS_GROUND_ADVANTAGE', and 'PRIORITY_MAIL' can only be used with extraServices '920' and '921'.
	//   * Ancillary Service Endorsements are currently only supported with mail class values 'PARCEL_SELECT', 'USPS_GROUND_ADVANTAGE', 'PRIORITY_MAIL', and 'PRIORITY_MAIL_EXPRESS'.
	//   * 'ELECTRONIC_SERVICE_REQUESTED' with a mail class value of 'PARCEL_SELECT' cannot be requested with a 'contentType' of 'HAZMAT' or any hazmat shipments.
	AncillaryServiceEndorsements *BaseDomesticPackageDescriptionPackageOptionsAncillaryServiceEndorsements `json:"ancillaryServiceEndorsements,omitempty"`

	// Containers containers
	Containers *[]Container `json:"containers,omitempty"`

	// ContentType The type of contents in the package.
	//
	// Note:
	// * `CREMATED_REMAINS` is currently only eligible for the `PRIORITY_MAIL_EXPRESS` mail class and is not eligible for Hold for Pickup shipments.  Please refer to [Publication 139](https://about.usps.com/publications/pub139/welcome.htm) for guidelines on how to package and ship `CREMATED_REMAINS`.
	// * `DAY_OLD_POULTRY` is currently only eligible with mail class values of `USPS_GROUND_ADVANTAGE`, `PRIORITY_MAIL` and `PRIORITY_MAIL_EXPRESS`.
	// * Shipments that contain Live Animals or Perishables will incur a Live Animal and Perishables Handling Fee per mail piece. Content types `HAZMAT`, `CREMATED_REMAINS`, and `MEDICAL_SUPPLIES` do not apply and will not incur a fee. For `DAY_OLD_POULTRY` shipments only, an additional Live Animal Transport Fee per pound is applied. For more information, please visit [Live Animals Transportation Fee FAQ](https://faq.usps.com/s/article/Live-Animal-Transportation-Fee#:~:text=The%20Live%20Animal%20Transportation%20fee%20is%20charged%20%240.20%20per%20pound,prices%20to%20Zones%205%2D9)
	// * `HAZMAT` domestic labels with destination addresses to APO/FPO/DPO and PTFAS (except Puerto Rico) will not contain any Hazmat markings/indicators, including service type codes in the IMpb. When users indicate a shipment contains hazmat materials in the API request (via content type and/or extra services), that information will still be captured and sent in the shipping services file. For more information, please review the [USPS APIs release notes](https://postalpro.usps.gov/usps-apis-releases)
	// * For guidelines on shipping Perishable and Hazardous Material, please refer to [Publication 52](https://pe.usps.com/text/pub52/welcome.htm).
	// * For ZIP codes with restrictions:
	//   * Please refer to the most recent [Postal Bulletin](https://about.usps.com/resources/postal-bulletin.htm) ZIP restriction table for more information. You can find this data under `Pull-Out information` -> `Other Information` -> `Overseas Military/Diplomatic Mail`.
	//   * When restriction `M` applies, then `BEES`, `DAY_OLD_POULTRY`, `ADULT_BIRDS`, `OTHER_LIVES`, `FRUITS`, `VEGETABLES`, and `LIVE_PLANTS` are not allowed.
	//   * When restriction `X` applies, then `CREMATED_REMAINS` are not allowed.
	ContentType *BaseDomesticPackageDescriptionPackageOptionsContentType `json:"contentType,omitempty"`

	// GenerateGXEvent Provides the option for a user to not create a "GX" event for the package. By default, a GX event will be created.
	GenerateGXEvent *bool `json:"generateGXEvent,omitempty"`

	// ImmediateManifest Setting this field to `true` will send electronic data to Postal systems within 15 minutes of label creation.
	//
	// If invoked, this label <u><strong>cannot</strong></u> be canceled. Instead, one must request an unused label refund – which may be subject to an admin fee.
	//
	// Depending on time of label creation, your packages could be charged same day instead of next day.
	ImmediateManifest *bool `json:"immediateManifest,omitempty"`

	// NonDeliveryOption Requested action in the case a package is undeliverable:
	//   - `RETURN` for package to be returned to `fromAddress`.
	//   - `REDIRECT` to return package to address specified in the `redirectAddress`.
	//   - `ABANDON` to dispose of undeliverable package
	//
	// Note:
	//   * `REDIRECT` and `ABANDON` will not impact the domestic package endpoint. Please use ancillary service endorsements instead.
	//   * An address must be provided in `redirectAddress` when a value of `REDIRECT` is provided.
	NonDeliveryOption *BaseDomesticPackageDescriptionPackageOptionsNonDeliveryOption `json:"nonDeliveryOption,omitempty"`

	// Omas Fields specific to Official Mail Accounting System (OMAS).  Used for Federal Agencies.
	Omas *struct {
		// ChargebackCode Code used with OMAS transactions.
		ChargebackCode *string `json:"chargebackCode,omitempty"`
	} `json:"omas,omitempty"`

	// OriginalPackage * Note: packageOptions.originalPackage fields cannot be used in combination with packageOptions.returnReceiptTracking.
	OriginalPackage *struct {
		// OriginalConstructCode A 3-character code to identify the construct of the Original Label Tracking Number
		OriginalConstructCode string `json:"originalConstructCode"`

		// OriginalTrackingNumber The tracking number associated with the package before it was over labeled.
		// For accurate tracking, this field requires a concatenated string consisting of the routingInformation and trackingNumber from the original label response.
		OriginalTrackingNumber string `json:"originalTrackingNumber"`
	} `json:"originalPackage,omitempty"`

	// PackageValue The merchandise value of the package, in US dollars. Used as the declared value for Insurance and for fee calculation when provided.
	//
	//  Note:
	//   * `packageValue` is required when `extraServices` includes `930` or `931`.
	PackageValue *float32 `json:"packageValue,omitempty"`
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	RedirectAddress *DomesticLabelAddress `json:"redirectAddress,omitempty"`

	// ReturnReceiptTracking Indicates whether a return receipt tracking number should be generated for the package.
	// If set to `true`, the system will automatically add the Extra Service Code (ESC) `955`
	// if it is not already present. When enabled, the `returnReceiptTrackingNumber` field will be populated in the response.
	//
	// Note:
	//   * `returnReceiptTracking` cannot be used in combination with `packageOptions.originalPackage` fields.
	//   * Utilizing `returnReceiptTracking` will incur the `955` ESC associated fee.
	ReturnReceiptTracking *bool                  `json:"returnReceiptTracking,omitempty"`
	AdditionalProperties  map[string]interface{} `json:"-"`
}

BaseDomesticPackageDescription_PackageOptions defines model for BaseDomesticPackageDescription.PackageOptions.

func (BaseDomesticPackageDescription_PackageOptions) Get

func (a BaseDomesticPackageDescription_PackageOptions) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for BaseDomesticPackageDescription_PackageOptions. Returns the specified element and whether it was found

func (BaseDomesticPackageDescription_PackageOptions) MarshalJSON

Override default JSON handling for BaseDomesticPackageDescription_PackageOptions to handle AdditionalProperties

func (*BaseDomesticPackageDescription_PackageOptions) Set

func (a *BaseDomesticPackageDescription_PackageOptions) Set(fieldName string, value interface{})

Setter for additional properties for BaseDomesticPackageDescription_PackageOptions

func (*BaseDomesticPackageDescription_PackageOptions) UnmarshalJSON

Override default JSON handling for BaseDomesticPackageDescription_PackageOptions to handle AdditionalProperties

type BaseReturnsPackageDescription

type BaseReturnsPackageDescription struct {
	// CustomerReference Used for shippers to print a value on a label and included in the Shipping Services Files.
	CustomerReference *[]DomesticCustomerReference `json:"customerReference,omitempty"`

	// DestinationEntryFacilityAddress Destination entry facility address
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	DestinationEntryFacilityAddress *DomesticAddress `json:"destinationEntryFacilityAddress,omitempty"`

	// DimensionsUOM Dimensions unit of measure
	// * in - Inches
	DimensionsUOM *BaseReturnsPackageDescriptionDimensionsUOM `json:"dimensionsUOM,omitempty"`

	// ExtraServices Extra Service Code requested.
	// * 365 - Global Direct Entry
	// * 415 - USPS Label Delivery
	// * 480 - Tracking Plus 6 Months
	// * 481 - Tracking Plus 1 Year
	// * 482 - Tracking Plus 3 Years
	// * 483 - Tracking Plus 5 Years
	// * 484 - Tracking Plus 7 Years
	// * 485 - Tracking Plus 10 Years
	// * 486 - Tracking Plus Signature 3 Years
	// * 487 - Tracking Plus Signature 5 Years
	// * 488 - Tracking Plus Signature 7 Years
	// * 489 - Tracking Plus Signature 10 Years
	// * 810 - HAZMAT Air Eligible Ethanol Package
	// * 811 - HAZMAT Class 1 - Toy Propellant/Safety Fuse Package
	// * 812 - HAZMAT Class 3 – Flammable Liquid Package
	// * 813 - HAZMAT Class 7 - Radioactive Materials Package
	// * 814 - HAZMAT Class 8 - Corrosive Materials Package
	// * 815 - HAZMAT Class 8 - Nonspillable Wet Battery Package
	// * 816 - HAZMAT Class 9 - Lithium Battery Marked - Ground Only Package
	// * 817 - HAZMAT Class 9 - Lithium Battery - Returns Package
	// * 818 - HAZMAT Class 9 - Lithium batteries, marked package
	// * 819 - HAZMAT Class 9 - Dry Ice Package
	// * 820 - HAZMAT Class 9 - Lithium batteries, unmarked package
	// * 821 - HAZMAT Class 9 - Magnetized Materials Package
	// * 822 - HAZMAT Division 4.1 – Flammable Solids or Safety Matches Package
	// * 823 - HAZMAT Division 5.1 - Oxidizers Package
	// * 824 - HAZMAT Division 5.2 - Organic Peroxides Package
	// * 825 - HAZMAT Division 6.1 – Toxic Materials Package
	// * 826 - HAZMAT Division 6.2 – Infectious Substances Package
	// * 827 - HAZMAT Excepted Quantity Provision Package
	// * 828 - HAZMAT Ground Only
	// * 829 - HAZMAT ID8000 Consumer Commodity Package
	// * 830 - HAZMAT Lighters Package
	// * 831 - HAZMAT LTD QTY Ground Package
	// * 832 - HAZMAT Small Quantity Provision Package
	// * 857 - Hazardous Material
	// * 910 - Certified Mail
	// * 911 - Certified Mail Restricted Delivery
	// * 912 - Certified Mail Adult Signature Required
	// * 913 - Certified Mail Adult Signature Restricted Delivery
	// * 920 - USPS Tracking
	// * 921 - Signature Confirmation
	// * 922 - Adult Signature Required 21 or Over
	// * 923 - Adult Signature Restricted Delivery 21 or Over
	// * 924 - Signature Confirmation Restricted Delivery
	// * 925 - Priority Mail Express Merchandise Insurance
	// * 930 - Insurance <= $500
	// * 931 - Insurance > $500
	// * 934 - Insurance Restricted Delivery
	// * 955 - Return Receipt
	// * 957 - Return Receipt Electronic
	// * 981 - Signature Requested (PRIORITY_MAIL_EXPRESS only)
	// * 986 - PO to Addressee (PRIORITY_MAIL_EXPRESS only)
	// * 991 - Sunday Delivery
	//
	// Note:
	//  * When the extra service code "930" is provided in the request, if the item value is over $500, "930" will automatically be replaced with "931" - Insurance (Greater than $500).
	//  * USPS Label Delivery (Extra Service Code "415"): When requesting this service, no images will be returned in the API response. The label and receipt will be printed and mailed to the `fromAddress` provided. The mailed label will always include a receipt on the page. This service is not available at all locations.
	//  * Some service codes require a combination with extra services such as "955" and "957". For all valid combinations, visit [https://postalpro.usps.com/IMPB_Service_Type_Codes](https://postalpro.usps.com/IMPB_Service_Type_Codes).
	ExtraServices *[]ExtraService `json:"extraServices,omitempty"`

	// Girth The girth of the container, in dimensionsUOM. If partial dimensions are provided, an error response will return. Length, Width, Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. In addition, Girth is required only for a non- rectangular package in addition to Length, Width, Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non- rectangular packages.
	Girth *float32 `json:"girth,omitempty"`

	// HasNonstandardCharacteristics Package is nonstandard. Nonstandard packages include cylindrical tubes and rolls, certain high-density items, cartons containing more than 24 ounces of liquids in one or more glass containers, cartons containing 1 gallon or more of liquid in metal or plastic containers, and items in [201.7.6.2](https://pe.usps.com/text/dmm300/201.htm#7.6.2).
	HasNonstandardCharacteristics *bool `json:"hasNonstandardCharacteristics,omitempty"`

	// Height The height of the container, in dimensionsUOM. If partial dimensions are provided, an error response will return. Length, Width, and Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. Girth is required only for a non-rectangular package in addition to Length, Width, and Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non-rectangular packages.
	Height float32 `json:"height"`

	// InductionZIPCode The 5-Digit ZIP Code representing the location where the package is being inducted (i.e. dropped off) into the mailstream.  When provided, this ZIP Code will be used for pricing instead of `fromAddress.ZIPCode`.
	InductionZIPCode *InductionZIPCode `json:"inductionZIPCode,omitempty"`

	// Length The length of the container, in dimensionsUOM. If partial dimensions are provided, an error response will return. Length, Width, and Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. Girth is required only for a non-rectangular package in addition to Length, Width, and Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non-rectangular packages.
	Length float32 `json:"length"`

	// MailClass The mail service requested.
	//
	// Note:
	// - `FIRST-CLASS_PACKAGE_RETURN_SERVICE` is deprecated and will convert to `USPS_GROUND_ADVANTAGE_RETURN_SERVICE`
	// - `GROUND_RETURN_SERVICE` is deprecated and will convert to `USPS_GROUND_ADVANTAGE_RETURN_SERVICE`
	MailClass BaseReturnsPackageDescriptionMailClass `json:"mailClass"`

	// PackageOptions Options added to packages that are less frequently used
	PackageOptions *DomesticPackageReturnOptions `json:"packageOptions,omitempty"`

	// ProcessingCategory Value designates if the shipment is `MACHINABLE`, `NONSTANDARD`, `LETTERS`, or `FLATS`.
	//
	// Note:
	// * The processing category `LETTERS` is only valid when the mail class is `PRIORITY_MAIL_RETURN_SERVICE` or `PRIORITY_MAIL_EXPRESS_RETURN_SERVICE` for returns shipments.
	// * The processing category `FLATS` is not valid for mail class `USPS_GROUND_ADVANTAGE_RETURN_SERVICE`.
	// * `IRREGULAR` is deprecated and will convert to `NONSTANDARD` as of 01/19/2025.
	// * `NON_MACHINABLE` is deprecated and will convert to `NONSTANDARD` as of 01/19/2025.
	ProcessingCategory BaseReturnsPackageDescriptionProcessingCategory `json:"processingCategory"`

	// ShipperVisibilityMethod When generating labels for a third party shipper the label provider must capture and provide contact details of the individual or entity to whom they provide the label. For return labels, there is one method for reporting shipper information to USPS:
	//
	// 1. An alternative method allows for the label provider to assign a unique alphanumeric value known as a `platformUserId` to each shipper and to report the `platformUserId` together with the required shipper contact details. When using this method the shipper contact details are required in the `senderAddress` object (including `streetAddress`, `city`, `state`, `ZIPCode`, `phone`, `email`, `platformUserId` & `firstName`/`lastName` or `firm`) and this field should be populated with 'SENDER_INFORMATION'.
	ShipperVisibilityMethod *BaseReturnsPackageDescriptionShipperVisibilityMethod `json:"shipperVisibilityMethod,omitempty"`

	// Weight The package weight, in weightUOM (Unit Of Measure). Items must weigh 70 pounds (1120 ounces) or less.
	Weight float32 `json:"weight"`

	// WeightUOM Weight Unit of Measurement
	//   * lb - Pounds
	WeightUOM *BaseReturnsPackageDescriptionWeightUOM `json:"weightUOM,omitempty"`

	// Width The width of the container, in dimensionsUOM. If partial dimensions are provided, an error response will return. Length, Width, and Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. Girth is required only for a non-rectangular package in addition to Length, Width, and Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non- rectangular packages.
	Width                float32                `json:"width"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

BaseReturnsPackageDescription defines model for BaseReturnsPackageDescription.

func (BaseReturnsPackageDescription) Get

func (a BaseReturnsPackageDescription) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for BaseReturnsPackageDescription. Returns the specified element and whether it was found

func (BaseReturnsPackageDescription) MarshalJSON

func (a BaseReturnsPackageDescription) MarshalJSON() ([]byte, error)

Override default JSON handling for BaseReturnsPackageDescription to handle AdditionalProperties

func (*BaseReturnsPackageDescription) Set

func (a *BaseReturnsPackageDescription) Set(fieldName string, value interface{})

Setter for additional properties for BaseReturnsPackageDescription

func (*BaseReturnsPackageDescription) UnmarshalJSON

func (a *BaseReturnsPackageDescription) UnmarshalJSON(b []byte) error

Override default JSON handling for BaseReturnsPackageDescription to handle AdditionalProperties

type BaseReturnsPackageDescriptionDimensionsUOM

type BaseReturnsPackageDescriptionDimensionsUOM string

BaseReturnsPackageDescriptionDimensionsUOM Dimensions unit of measure * in - Inches

const (
	BaseReturnsPackageDescriptionDimensionsUOMIn BaseReturnsPackageDescriptionDimensionsUOM = "in"
)

Defines values for BaseReturnsPackageDescriptionDimensionsUOM.

type BaseReturnsPackageDescriptionMailClass

type BaseReturnsPackageDescriptionMailClass string

BaseReturnsPackageDescriptionMailClass The mail service requested.

Note: - `FIRST-CLASS_PACKAGE_RETURN_SERVICE` is deprecated and will convert to `USPS_GROUND_ADVANTAGE_RETURN_SERVICE` - `GROUND_RETURN_SERVICE` is deprecated and will convert to `USPS_GROUND_ADVANTAGE_RETURN_SERVICE`

const (
	BaseReturnsPackageDescriptionMailClassFIRSTCLASSPACKAGERETURNSERVICE   BaseReturnsPackageDescriptionMailClass = "FIRST-CLASS_PACKAGE_RETURN_SERVICE"
	BaseReturnsPackageDescriptionMailClassGROUNDRETURNSERVICE              BaseReturnsPackageDescriptionMailClass = "GROUND_RETURN_SERVICE"
	BaseReturnsPackageDescriptionMailClassPRIORITYMAILEXPRESSRETURNSERVICE BaseReturnsPackageDescriptionMailClass = "PRIORITY_MAIL_EXPRESS_RETURN_SERVICE"
	BaseReturnsPackageDescriptionMailClassPRIORITYMAILRETURNSERVICE        BaseReturnsPackageDescriptionMailClass = "PRIORITY_MAIL_RETURN_SERVICE"
	BaseReturnsPackageDescriptionMailClassUSPSGROUNDADVANTAGERETURNSERVICE BaseReturnsPackageDescriptionMailClass = "USPS_GROUND_ADVANTAGE_RETURN_SERVICE"
)

Defines values for BaseReturnsPackageDescriptionMailClass.

type BaseReturnsPackageDescriptionProcessingCategory

type BaseReturnsPackageDescriptionProcessingCategory string

BaseReturnsPackageDescriptionProcessingCategory Value designates if the shipment is `MACHINABLE`, `NONSTANDARD`, `LETTERS`, or `FLATS`.

Note: * The processing category `LETTERS` is only valid when the mail class is `PRIORITY_MAIL_RETURN_SERVICE` or `PRIORITY_MAIL_EXPRESS_RETURN_SERVICE` for returns shipments. * The processing category `FLATS` is not valid for mail class `USPS_GROUND_ADVANTAGE_RETURN_SERVICE`. * `IRREGULAR` is deprecated and will convert to `NONSTANDARD` as of 01/19/2025. * `NON_MACHINABLE` is deprecated and will convert to `NONSTANDARD` as of 01/19/2025.

const (
	BaseReturnsPackageDescriptionProcessingCategoryFLATS         BaseReturnsPackageDescriptionProcessingCategory = "FLATS"
	BaseReturnsPackageDescriptionProcessingCategoryIRREGULAR     BaseReturnsPackageDescriptionProcessingCategory = "IRREGULAR"
	BaseReturnsPackageDescriptionProcessingCategoryLETTERS       BaseReturnsPackageDescriptionProcessingCategory = "LETTERS"
	BaseReturnsPackageDescriptionProcessingCategoryMACHINABLE    BaseReturnsPackageDescriptionProcessingCategory = "MACHINABLE"
	BaseReturnsPackageDescriptionProcessingCategoryNONMACHINABLE BaseReturnsPackageDescriptionProcessingCategory = "NON_MACHINABLE"
	BaseReturnsPackageDescriptionProcessingCategoryNONSTANDARD   BaseReturnsPackageDescriptionProcessingCategory = "NONSTANDARD"
)

Defines values for BaseReturnsPackageDescriptionProcessingCategory.

type BaseReturnsPackageDescriptionShipperVisibilityMethod

type BaseReturnsPackageDescriptionShipperVisibilityMethod string

BaseReturnsPackageDescriptionShipperVisibilityMethod When generating labels for a third party shipper the label provider must capture and provide contact details of the individual or entity to whom they provide the label. For return labels, there is one method for reporting shipper information to USPS:

1. An alternative method allows for the label provider to assign a unique alphanumeric value known as a `platformUserId` to each shipper and to report the `platformUserId` together with the required shipper contact details. When using this method the shipper contact details are required in the `senderAddress` object (including `streetAddress`, `city`, `state`, `ZIPCode`, `phone`, `email`, `platformUserId` & `firstName`/`lastName` or `firm`) and this field should be populated with 'SENDER_INFORMATION'.

const (
	BaseReturnsPackageDescriptionShipperVisibilityMethodSENDERINFORMATION BaseReturnsPackageDescriptionShipperVisibilityMethod = "SENDER_INFORMATION"
)

Defines values for BaseReturnsPackageDescriptionShipperVisibilityMethod.

type BaseReturnsPackageDescriptionWeightUOM

type BaseReturnsPackageDescriptionWeightUOM string

BaseReturnsPackageDescriptionWeightUOM Weight Unit of Measurement

  • lb - Pounds
const (
	BaseReturnsPackageDescriptionWeightUOMLb BaseReturnsPackageDescriptionWeightUOM = "lb"
)

Defines values for BaseReturnsPackageDescriptionWeightUOM.

type BrandingPatchRequest

type BrandingPatchRequest = []struct {
	// Op The operation to perform on the resource.
	Op BrandingPatchRequestOp `json:"op"`

	// Path The object or array location to perform the update to the resource. Must be a JSON pointer value.
	Path BrandingPatchRequestPath `json:"path"`

	// Value value of a branding patch request
	Value *string `json:"value,omitempty"`
}

BrandingPatchRequest Request to update branding information for labels using JSON Patch. Refer to the IETF JSON PATCH specification at https://datatracker.ietf.org/doc/html/rfc6902 for detailed guidelines.

type BrandingPatchRequestOp

type BrandingPatchRequestOp string

BrandingPatchRequestOp The operation to perform on the resource.

const (
	BrandingPatchRequestOpReplace BrandingPatchRequestOp = "replace"
)

Defines values for BrandingPatchRequestOp.

type BrandingPatchRequestPath

type BrandingPatchRequestPath string

BrandingPatchRequestPath The object or array location to perform the update to the resource. Must be a JSON pointer value.

const (
	BrandingPatchRequestPathImageName BrandingPatchRequestPath = "/imageName"
)

Defines values for BrandingPatchRequestPath.

type CancelResponse

type CancelResponse struct {
	// DisputeId The Id of the submitted refund request.
	DisputeId *string `json:"disputeId,omitempty"`

	// Status * `CANCELED` indicates that the label has been successfully canceled.
	// * `DISPUTED` indicates that a refund request has been submitted.
	Status *CancelResponseStatus `json:"status,omitempty"`

	// TrackingNumber The tracking number associated with the label that has been canceled or for which a refund request has been submitted.
	TrackingNumber *string `json:"trackingNumber,omitempty"`
}

CancelResponse defines model for CancelResponse.

type CancelResponseStatus

type CancelResponseStatus string

CancelResponseStatus * `CANCELED` indicates that the label has been successfully canceled. * `DISPUTED` indicates that a refund request has been submitted.

const (
	CancelResponseStatusCANCELED CancelResponseStatus = "CANCELED"
	CancelResponseStatusDISPUTED CancelResponseStatus = "DISPUTED"
)

Defines values for CancelResponseStatus.

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) DeleteIndiciaImb

func (c *Client) DeleteIndiciaImb(ctx context.Context, imb IMB, params *DeleteIndiciaImbParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteLabelBranding

func (c *Client) DeleteLabelBranding(ctx context.Context, imageUUID LabelBrandingImageUUID, params *DeleteLabelBrandingParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteLabelByIdempotency

func (c *Client) DeleteLabelByIdempotency(ctx context.Context, params *DeleteLabelByIdempotencyParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteLabelByTracking

func (c *Client) DeleteLabelByTracking(ctx context.Context, trackingNumber TrackingNumber, params *DeleteLabelByTrackingParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetListLabelBranding

func (c *Client) GetListLabelBranding(ctx context.Context, params *GetListLabelBrandingParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetSingleLabelBranding

func (c *Client) GetSingleLabelBranding(ctx context.Context, imageUUID LabelBrandingImageUUID, params *GetSingleLabelBrandingParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PatchLabelBranding

func (c *Client) PatchLabelBranding(ctx context.Context, imageUUID LabelBrandingImageUUID, params *PatchLabelBrandingParams, body PatchLabelBrandingJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PatchLabelBrandingWithBody

func (c *Client) PatchLabelBrandingWithBody(ctx context.Context, imageUUID LabelBrandingImageUUID, params *PatchLabelBrandingParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PatchLabelEdit

func (c *Client) PatchLabelEdit(ctx context.Context, trackingNumber TrackingNumber, params *PatchLabelEditParams, body PatchLabelEditJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PatchLabelEditWithBody

func (c *Client) PatchLabelEditWithBody(ctx context.Context, trackingNumber TrackingNumber, params *PatchLabelEditParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostIndiciaImb

func (c *Client) PostIndiciaImb(ctx context.Context, params *PostIndiciaImbParams, body PostIndiciaImbJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostIndiciaImbWithBody

func (c *Client) PostIndiciaImbWithBody(ctx context.Context, params *PostIndiciaImbParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostLabel

func (c *Client) PostLabel(ctx context.Context, params *PostLabelParams, body PostLabelJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostLabelBranding

func (c *Client) PostLabelBranding(ctx context.Context, params *PostLabelBrandingParams, body PostLabelBrandingJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostLabelBrandingWithBody

func (c *Client) PostLabelBrandingWithBody(ctx context.Context, params *PostLabelBrandingParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostLabelIndicia

func (c *Client) PostLabelIndicia(ctx context.Context, params *PostLabelIndiciaParams, body PostLabelIndiciaJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostLabelIndiciaWithBody

func (c *Client) PostLabelIndiciaWithBody(ctx context.Context, params *PostLabelIndiciaParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostLabelReprintByIdempotencyWithBody

func (c *Client) PostLabelReprintByIdempotencyWithBody(ctx context.Context, params *PostLabelReprintByIdempotencyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostLabelReprintByTracking

func (c *Client) PostLabelReprintByTracking(ctx context.Context, trackingNumber TrackingNumber, params *PostLabelReprintByTrackingParams, body PostLabelReprintByTrackingJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostLabelReprintByTrackingWithBody

func (c *Client) PostLabelReprintByTrackingWithBody(ctx context.Context, trackingNumber TrackingNumber, params *PostLabelReprintByTrackingParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostLabelWithBody

func (c *Client) PostLabelWithBody(ctx context.Context, params *PostLabelParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostReturnLabel

func (c *Client) PostReturnLabel(ctx context.Context, params *PostReturnLabelParams, body PostReturnLabelJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostReturnLabelWithBody

func (c *Client) PostReturnLabelWithBody(ctx context.Context, params *PostReturnLabelParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// GetListLabelBranding request
	GetListLabelBranding(ctx context.Context, params *GetListLabelBrandingParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostLabelBrandingWithBody request with any body
	PostLabelBrandingWithBody(ctx context.Context, params *PostLabelBrandingParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PostLabelBranding(ctx context.Context, params *PostLabelBrandingParams, body PostLabelBrandingJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteLabelBranding request
	DeleteLabelBranding(ctx context.Context, imageUUID LabelBrandingImageUUID, params *DeleteLabelBrandingParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetSingleLabelBranding request
	GetSingleLabelBranding(ctx context.Context, imageUUID LabelBrandingImageUUID, params *GetSingleLabelBrandingParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PatchLabelBrandingWithBody request with any body
	PatchLabelBrandingWithBody(ctx context.Context, imageUUID LabelBrandingImageUUID, params *PatchLabelBrandingParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PatchLabelBranding(ctx context.Context, imageUUID LabelBrandingImageUUID, params *PatchLabelBrandingParams, body PatchLabelBrandingJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostLabelIndiciaWithBody request with any body
	PostLabelIndiciaWithBody(ctx context.Context, params *PostLabelIndiciaParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PostLabelIndicia(ctx context.Context, params *PostLabelIndiciaParams, body PostLabelIndiciaJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostIndiciaImbWithBody request with any body
	PostIndiciaImbWithBody(ctx context.Context, params *PostIndiciaImbParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PostIndiciaImb(ctx context.Context, params *PostIndiciaImbParams, body PostIndiciaImbJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteIndiciaImb request
	DeleteIndiciaImb(ctx context.Context, imb IMB, params *DeleteIndiciaImbParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteLabelByIdempotency request
	DeleteLabelByIdempotency(ctx context.Context, params *DeleteLabelByIdempotencyParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostLabelWithBody request with any body
	PostLabelWithBody(ctx context.Context, params *PostLabelParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PostLabel(ctx context.Context, params *PostLabelParams, body PostLabelJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostLabelReprintByIdempotencyWithBody request with any body
	PostLabelReprintByIdempotencyWithBody(ctx context.Context, params *PostLabelReprintByIdempotencyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PostLabelReprintByIdempotency(ctx context.Context, params *PostLabelReprintByIdempotencyParams, body PostLabelReprintByIdempotencyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostLabelReprintByTrackingWithBody request with any body
	PostLabelReprintByTrackingWithBody(ctx context.Context, trackingNumber TrackingNumber, params *PostLabelReprintByTrackingParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PostLabelReprintByTracking(ctx context.Context, trackingNumber TrackingNumber, params *PostLabelReprintByTrackingParams, body PostLabelReprintByTrackingJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteLabelByTracking request
	DeleteLabelByTracking(ctx context.Context, trackingNumber TrackingNumber, params *DeleteLabelByTrackingParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PatchLabelEditWithBody request with any body
	PatchLabelEditWithBody(ctx context.Context, trackingNumber TrackingNumber, params *PatchLabelEditParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PatchLabelEdit(ctx context.Context, trackingNumber TrackingNumber, params *PatchLabelEditParams, body PatchLabelEditJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostReturnLabelWithBody request with any body
	PostReturnLabelWithBody(ctx context.Context, params *PostReturnLabelParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PostReturnLabel(ctx context.Context, params *PostReturnLabelParams, body PostReturnLabelJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) DeleteIndiciaImbWithResponse

func (c *ClientWithResponses) DeleteIndiciaImbWithResponse(ctx context.Context, imb IMB, params *DeleteIndiciaImbParams, reqEditors ...RequestEditorFn) (*DeleteIndiciaImbResponse, error)

DeleteIndiciaImbWithResponse request returning *DeleteIndiciaImbResponse

func (*ClientWithResponses) DeleteLabelBrandingWithResponse

func (c *ClientWithResponses) DeleteLabelBrandingWithResponse(ctx context.Context, imageUUID LabelBrandingImageUUID, params *DeleteLabelBrandingParams, reqEditors ...RequestEditorFn) (*DeleteLabelBrandingResponse, error)

DeleteLabelBrandingWithResponse request returning *DeleteLabelBrandingResponse

func (*ClientWithResponses) DeleteLabelByIdempotencyWithResponse

func (c *ClientWithResponses) DeleteLabelByIdempotencyWithResponse(ctx context.Context, params *DeleteLabelByIdempotencyParams, reqEditors ...RequestEditorFn) (*DeleteLabelByIdempotencyResponse, error)

DeleteLabelByIdempotencyWithResponse request returning *DeleteLabelByIdempotencyResponse

func (*ClientWithResponses) DeleteLabelByTrackingWithResponse

func (c *ClientWithResponses) DeleteLabelByTrackingWithResponse(ctx context.Context, trackingNumber TrackingNumber, params *DeleteLabelByTrackingParams, reqEditors ...RequestEditorFn) (*DeleteLabelByTrackingResponse, error)

DeleteLabelByTrackingWithResponse request returning *DeleteLabelByTrackingResponse

func (*ClientWithResponses) GetListLabelBrandingWithResponse

func (c *ClientWithResponses) GetListLabelBrandingWithResponse(ctx context.Context, params *GetListLabelBrandingParams, reqEditors ...RequestEditorFn) (*GetListLabelBrandingResponse, error)

GetListLabelBrandingWithResponse request returning *GetListLabelBrandingResponse

func (*ClientWithResponses) GetSingleLabelBrandingWithResponse

func (c *ClientWithResponses) GetSingleLabelBrandingWithResponse(ctx context.Context, imageUUID LabelBrandingImageUUID, params *GetSingleLabelBrandingParams, reqEditors ...RequestEditorFn) (*GetSingleLabelBrandingResponse, error)

GetSingleLabelBrandingWithResponse request returning *GetSingleLabelBrandingResponse

func (*ClientWithResponses) PatchLabelBrandingWithBodyWithResponse

func (c *ClientWithResponses) PatchLabelBrandingWithBodyWithResponse(ctx context.Context, imageUUID LabelBrandingImageUUID, params *PatchLabelBrandingParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchLabelBrandingResponse, error)

PatchLabelBrandingWithBodyWithResponse request with arbitrary body returning *PatchLabelBrandingResponse

func (*ClientWithResponses) PatchLabelBrandingWithResponse

func (*ClientWithResponses) PatchLabelEditWithBodyWithResponse

func (c *ClientWithResponses) PatchLabelEditWithBodyWithResponse(ctx context.Context, trackingNumber TrackingNumber, params *PatchLabelEditParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchLabelEditResponse, error)

PatchLabelEditWithBodyWithResponse request with arbitrary body returning *PatchLabelEditResponse

func (*ClientWithResponses) PatchLabelEditWithResponse

func (c *ClientWithResponses) PatchLabelEditWithResponse(ctx context.Context, trackingNumber TrackingNumber, params *PatchLabelEditParams, body PatchLabelEditJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchLabelEditResponse, error)

func (*ClientWithResponses) PostIndiciaImbWithBodyWithResponse

func (c *ClientWithResponses) PostIndiciaImbWithBodyWithResponse(ctx context.Context, params *PostIndiciaImbParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostIndiciaImbResponse, error)

PostIndiciaImbWithBodyWithResponse request with arbitrary body returning *PostIndiciaImbResponse

func (*ClientWithResponses) PostIndiciaImbWithResponse

func (c *ClientWithResponses) PostIndiciaImbWithResponse(ctx context.Context, params *PostIndiciaImbParams, body PostIndiciaImbJSONRequestBody, reqEditors ...RequestEditorFn) (*PostIndiciaImbResponse, error)

func (*ClientWithResponses) PostLabelBrandingWithBodyWithResponse

func (c *ClientWithResponses) PostLabelBrandingWithBodyWithResponse(ctx context.Context, params *PostLabelBrandingParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostLabelBrandingResponse, error)

PostLabelBrandingWithBodyWithResponse request with arbitrary body returning *PostLabelBrandingResponse

func (*ClientWithResponses) PostLabelBrandingWithResponse

func (*ClientWithResponses) PostLabelIndiciaWithBodyWithResponse

func (c *ClientWithResponses) PostLabelIndiciaWithBodyWithResponse(ctx context.Context, params *PostLabelIndiciaParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostLabelIndiciaResponse, error)

PostLabelIndiciaWithBodyWithResponse request with arbitrary body returning *PostLabelIndiciaResponse

func (*ClientWithResponses) PostLabelIndiciaWithResponse

func (c *ClientWithResponses) PostLabelIndiciaWithResponse(ctx context.Context, params *PostLabelIndiciaParams, body PostLabelIndiciaJSONRequestBody, reqEditors ...RequestEditorFn) (*PostLabelIndiciaResponse, error)

func (*ClientWithResponses) PostLabelReprintByIdempotencyWithBodyWithResponse

func (c *ClientWithResponses) PostLabelReprintByIdempotencyWithBodyWithResponse(ctx context.Context, params *PostLabelReprintByIdempotencyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostLabelReprintByIdempotencyResponse, error)

PostLabelReprintByIdempotencyWithBodyWithResponse request with arbitrary body returning *PostLabelReprintByIdempotencyResponse

func (*ClientWithResponses) PostLabelReprintByTrackingWithBodyWithResponse

func (c *ClientWithResponses) PostLabelReprintByTrackingWithBodyWithResponse(ctx context.Context, trackingNumber TrackingNumber, params *PostLabelReprintByTrackingParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostLabelReprintByTrackingResponse, error)

PostLabelReprintByTrackingWithBodyWithResponse request with arbitrary body returning *PostLabelReprintByTrackingResponse

func (*ClientWithResponses) PostLabelReprintByTrackingWithResponse

func (*ClientWithResponses) PostLabelWithBodyWithResponse

func (c *ClientWithResponses) PostLabelWithBodyWithResponse(ctx context.Context, params *PostLabelParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostLabelResponse, error)

PostLabelWithBodyWithResponse request with arbitrary body returning *PostLabelResponse

func (*ClientWithResponses) PostLabelWithResponse

func (c *ClientWithResponses) PostLabelWithResponse(ctx context.Context, params *PostLabelParams, body PostLabelJSONRequestBody, reqEditors ...RequestEditorFn) (*PostLabelResponse, error)

func (*ClientWithResponses) PostReturnLabelWithBodyWithResponse

func (c *ClientWithResponses) PostReturnLabelWithBodyWithResponse(ctx context.Context, params *PostReturnLabelParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostReturnLabelResponse, error)

PostReturnLabelWithBodyWithResponse request with arbitrary body returning *PostReturnLabelResponse

func (*ClientWithResponses) PostReturnLabelWithResponse

func (c *ClientWithResponses) PostReturnLabelWithResponse(ctx context.Context, params *PostReturnLabelParams, body PostReturnLabelJSONRequestBody, reqEditors ...RequestEditorFn) (*PostReturnLabelResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// GetListLabelBrandingWithResponse request
	GetListLabelBrandingWithResponse(ctx context.Context, params *GetListLabelBrandingParams, reqEditors ...RequestEditorFn) (*GetListLabelBrandingResponse, error)

	// PostLabelBrandingWithBodyWithResponse request with any body
	PostLabelBrandingWithBodyWithResponse(ctx context.Context, params *PostLabelBrandingParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostLabelBrandingResponse, error)

	PostLabelBrandingWithResponse(ctx context.Context, params *PostLabelBrandingParams, body PostLabelBrandingJSONRequestBody, reqEditors ...RequestEditorFn) (*PostLabelBrandingResponse, error)

	// DeleteLabelBrandingWithResponse request
	DeleteLabelBrandingWithResponse(ctx context.Context, imageUUID LabelBrandingImageUUID, params *DeleteLabelBrandingParams, reqEditors ...RequestEditorFn) (*DeleteLabelBrandingResponse, error)

	// GetSingleLabelBrandingWithResponse request
	GetSingleLabelBrandingWithResponse(ctx context.Context, imageUUID LabelBrandingImageUUID, params *GetSingleLabelBrandingParams, reqEditors ...RequestEditorFn) (*GetSingleLabelBrandingResponse, error)

	// PatchLabelBrandingWithBodyWithResponse request with any body
	PatchLabelBrandingWithBodyWithResponse(ctx context.Context, imageUUID LabelBrandingImageUUID, params *PatchLabelBrandingParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchLabelBrandingResponse, error)

	PatchLabelBrandingWithResponse(ctx context.Context, imageUUID LabelBrandingImageUUID, params *PatchLabelBrandingParams, body PatchLabelBrandingJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchLabelBrandingResponse, error)

	// PostLabelIndiciaWithBodyWithResponse request with any body
	PostLabelIndiciaWithBodyWithResponse(ctx context.Context, params *PostLabelIndiciaParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostLabelIndiciaResponse, error)

	PostLabelIndiciaWithResponse(ctx context.Context, params *PostLabelIndiciaParams, body PostLabelIndiciaJSONRequestBody, reqEditors ...RequestEditorFn) (*PostLabelIndiciaResponse, error)

	// PostIndiciaImbWithBodyWithResponse request with any body
	PostIndiciaImbWithBodyWithResponse(ctx context.Context, params *PostIndiciaImbParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostIndiciaImbResponse, error)

	PostIndiciaImbWithResponse(ctx context.Context, params *PostIndiciaImbParams, body PostIndiciaImbJSONRequestBody, reqEditors ...RequestEditorFn) (*PostIndiciaImbResponse, error)

	// DeleteIndiciaImbWithResponse request
	DeleteIndiciaImbWithResponse(ctx context.Context, imb IMB, params *DeleteIndiciaImbParams, reqEditors ...RequestEditorFn) (*DeleteIndiciaImbResponse, error)

	// DeleteLabelByIdempotencyWithResponse request
	DeleteLabelByIdempotencyWithResponse(ctx context.Context, params *DeleteLabelByIdempotencyParams, reqEditors ...RequestEditorFn) (*DeleteLabelByIdempotencyResponse, error)

	// PostLabelWithBodyWithResponse request with any body
	PostLabelWithBodyWithResponse(ctx context.Context, params *PostLabelParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostLabelResponse, error)

	PostLabelWithResponse(ctx context.Context, params *PostLabelParams, body PostLabelJSONRequestBody, reqEditors ...RequestEditorFn) (*PostLabelResponse, error)

	// PostLabelReprintByIdempotencyWithBodyWithResponse request with any body
	PostLabelReprintByIdempotencyWithBodyWithResponse(ctx context.Context, params *PostLabelReprintByIdempotencyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostLabelReprintByIdempotencyResponse, error)

	PostLabelReprintByIdempotencyWithResponse(ctx context.Context, params *PostLabelReprintByIdempotencyParams, body PostLabelReprintByIdempotencyJSONRequestBody, reqEditors ...RequestEditorFn) (*PostLabelReprintByIdempotencyResponse, error)

	// PostLabelReprintByTrackingWithBodyWithResponse request with any body
	PostLabelReprintByTrackingWithBodyWithResponse(ctx context.Context, trackingNumber TrackingNumber, params *PostLabelReprintByTrackingParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostLabelReprintByTrackingResponse, error)

	PostLabelReprintByTrackingWithResponse(ctx context.Context, trackingNumber TrackingNumber, params *PostLabelReprintByTrackingParams, body PostLabelReprintByTrackingJSONRequestBody, reqEditors ...RequestEditorFn) (*PostLabelReprintByTrackingResponse, error)

	// DeleteLabelByTrackingWithResponse request
	DeleteLabelByTrackingWithResponse(ctx context.Context, trackingNumber TrackingNumber, params *DeleteLabelByTrackingParams, reqEditors ...RequestEditorFn) (*DeleteLabelByTrackingResponse, error)

	// PatchLabelEditWithBodyWithResponse request with any body
	PatchLabelEditWithBodyWithResponse(ctx context.Context, trackingNumber TrackingNumber, params *PatchLabelEditParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchLabelEditResponse, error)

	PatchLabelEditWithResponse(ctx context.Context, trackingNumber TrackingNumber, params *PatchLabelEditParams, body PatchLabelEditJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchLabelEditResponse, error)

	// PostReturnLabelWithBodyWithResponse request with any body
	PostReturnLabelWithBodyWithResponse(ctx context.Context, params *PostReturnLabelParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostReturnLabelResponse, error)

	PostReturnLabelWithResponse(ctx context.Context, params *PostReturnLabelParams, body PostReturnLabelJSONRequestBody, reqEditors ...RequestEditorFn) (*PostReturnLabelResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type Commitment

type Commitment struct {
	// ExpectedDeliveryDate Date in the YYYY-MM-DD format.
	ExpectedDeliveryDate *string `json:"expectedDeliveryDate,omitempty"`

	// IsPriorityMailNextDay Indicates if the commitment is for Priority Mail Next Day service.
	IsPriorityMailNextDay *bool `json:"isPriorityMailNextDay,omitempty"`

	// Name Commitment name such as 1-day, 2-day, 3-day, Military, DPO.
	Name *string `json:"name,omitempty"`

	// ScheduleDeliveryDate Date in the `YYYY-MM-DD` format. Date USPS expects that the package or mailpiece will be delivered based on the origin, destination, and drop-off time and date in the request. Actual delivery date may vary based on when the package or mailpiece is entered or other conditions.
	//
	// Note: This field has been deprecated in favor of `expectedDeliveryDate` and will be removed in a future release. Please transition to using `expectedDeliveryDate`.
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	ScheduleDeliveryDate *string                `json:"scheduleDeliveryDate,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

Commitment The commitment and scheduled delivery date of the package.

func (Commitment) Get

func (a Commitment) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for Commitment. Returns the specified element and whether it was found

func (Commitment) MarshalJSON

func (a Commitment) MarshalJSON() ([]byte, error)

Override default JSON handling for Commitment to handle AdditionalProperties

func (*Commitment) Set

func (a *Commitment) Set(fieldName string, value interface{})

Setter for additional properties for Commitment

func (*Commitment) UnmarshalJSON

func (a *Commitment) UnmarshalJSON(b []byte) error

Override default JSON handling for Commitment to handle AdditionalProperties

type Container

type Container struct {
	// ContainerID Unique identifier for a container.
	ContainerID string `json:"containerID"`

	// SortType Sort Types requested.
	SortType ContainerSortType `json:"sortType"`
}

Container containers

type ContainerSortType

type ContainerSortType string

ContainerSortType Sort Types requested.

const (
	OPENDISTRIBUTEEMMTRAYBOX       ContainerSortType = "OPEN_DISTRIBUTE_EMM_TRAY_BOX"
	OPENDISTRIBUTEFLATTUBTRAYBOX   ContainerSortType = "OPEN_DISTRIBUTE_FLAT_TUB_TRAY_BOX"
	OPENDISTRIBUTEFULLTRAYBOX      ContainerSortType = "OPEN_DISTRIBUTE_FULL_TRAY_BOX"
	OPENDISTRIBUTEHALFPOSTALPAKS   ContainerSortType = "OPEN_DISTRIBUTE_HALF_POSTAL_PAKS"
	OPENDISTRIBUTEHALFTRAYBOX      ContainerSortType = "OPEN_DISTRIBUTE_HALF_TRAY_BOX"
	OPENDISTRIBUTEPALLET           ContainerSortType = "OPEN_DISTRIBUTE_PALLET"
	OPENDISTRIBUTIONFULLPOSTALPAKS ContainerSortType = "OPEN_DISTRIBUTION_FULL_POSTAL_PAKS"
	PALLET                         ContainerSortType = "PALLET"
	RECEPTACLE                     ContainerSortType = "RECEPTACLE"
	SACK                           ContainerSortType = "SACK"
	TRUCKBEDLOAD                   ContainerSortType = "TRUCK_BEDLOAD"
)

Defines values for ContainerSortType.

type CustomerReference

type CustomerReference struct {
	// ReferenceNumber A user-assigned number for internal use, such as Order, Invoice, Customer, or Return Merchandise Authorization Numbers.
	//
	// Note:
	// * Domestic outbound label and return label with `labelType` of `4X6LABEL`, `4X5LABEL`, and `6X4LABEL` will display the entire value.
	// * Return label with `labelType` of `4X6LABEL` with `brandingImageFormat` of `TWO_SQUARES` will show the first 25 characters.
	// * These values will also be included in the Shipping Services File.
	ReferenceNumber      *string                `json:"referenceNumber,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

CustomerReference Customer Reference

func (CustomerReference) Get

func (a CustomerReference) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for CustomerReference. Returns the specified element and whether it was found

func (CustomerReference) MarshalJSON

func (a CustomerReference) MarshalJSON() ([]byte, error)

Override default JSON handling for CustomerReference to handle AdditionalProperties

func (*CustomerReference) Set

func (a *CustomerReference) Set(fieldName string, value interface{})

Setter for additional properties for CustomerReference

func (*CustomerReference) UnmarshalJSON

func (a *CustomerReference) UnmarshalJSON(b []byte) error

Override default JSON handling for CustomerReference to handle AdditionalProperties

type CustomsForm

type CustomsForm struct {
	// AESITN AES/ITN Exemption should be populated with the electronic export internal transaction number (if required), or the appropriate Exemption/Exclusion Legend.
	//
	// * **AES - Automated Export System /   ITN - Internal Transaction Number**\
	//   The [internal transaction number (ITN)](https://pe.usps.com/text/imm/immc5_010.htm) is a 14-digit number that corresponds to an export transaction in the Automated Export System. It serves as proof that an exporter met his or her legal obligation to inform the U.S. government about the details of an export shipment.
	// * **EEL- Exemptions, Exclusions, Legend**\
	//   An [AES exemption](https://pe.usps.com/text/imm/immc5_012.htm) is an instance in which you would not have to file in AES to get the 14-digit ITN. Instead of the ITN, you would enter the exemption’s section in the U.S. Foreign Trade Regulations on the export documentation where you would otherwise put the ITN.
	//
	// Sample - `NO EEI 30.37(a)`: Shipments valued at $2,500 or less.
	AESITN *string `json:"AESITN,omitempty"`

	// CertificateNumber Certificate Number
	CertificateNumber *string `json:"certificateNumber,omitempty"`

	// ContentComments Required when customContentType is OTHER.
	ContentComments *string `json:"contentComments,omitempty"`

	// InvoiceNumber Invoice Number
	InvoiceNumber *string `json:"invoiceNumber,omitempty"`

	// LicenseNumber License Number
	LicenseNumber *string `json:"licenseNumber,omitempty"`

	// RestrictionComments Restriction Comments.  Required when `restrictionType`=`OTHER`.
	RestrictionComments *string `json:"restrictionComments,omitempty"`

	// RestrictionType Restriction Types
	//   * QUARANTINE
	//   * SANITARY_INSPECTION
	//   * PHYTOSANITARY_INSPECTION
	//   * OTHER
	RestrictionType      *CustomsFormRestrictionType `json:"restrictionType,omitempty"`
	AdditionalProperties map[string]interface{}      `json:"-"`
}

CustomsForm Additional details required when creating shipments originating from or destinating to MPOs, APOs, FPOs, or DPOs (Military, Army, Fleet, and Diplomatic Post Offices) and some Military and U.S. Possessions, Territories, and Freely Associated States (PTFAS). Required only if a customs form is required based on Customs Content Type and Weight.

Note:

  • Mail addressed to military and diplomatic post offices overseas is subject to certain conditions or restrictions of mailing regarding content, preparation, and handling. The APO/FPO/DPO table may be found on the most recent [postal bulletin](https://about.usps.com/resources/postal-bulletin.htm) found under `Pull-Out information` -> `Other Information` -> `Overseas Military/Diplomatic Mail`

func (CustomsForm) Get

func (a CustomsForm) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for CustomsForm. Returns the specified element and whether it was found

func (CustomsForm) MarshalJSON

func (a CustomsForm) MarshalJSON() ([]byte, error)

Override default JSON handling for CustomsForm to handle AdditionalProperties

func (*CustomsForm) Set

func (a *CustomsForm) Set(fieldName string, value interface{})

Setter for additional properties for CustomsForm

func (*CustomsForm) UnmarshalJSON

func (a *CustomsForm) UnmarshalJSON(b []byte) error

Override default JSON handling for CustomsForm to handle AdditionalProperties

type CustomsFormRestrictionType

type CustomsFormRestrictionType string

CustomsFormRestrictionType Restriction Types

  • QUARANTINE
  • SANITARY_INSPECTION
  • PHYTOSANITARY_INSPECTION
  • OTHER
const (
	CustomsFormRestrictionTypeOTHER                   CustomsFormRestrictionType = "OTHER"
	CustomsFormRestrictionTypePHYTOSANITARYINSPECTION CustomsFormRestrictionType = "PHYTOSANITARY_INSPECTION"
	CustomsFormRestrictionTypeQUARANTINE              CustomsFormRestrictionType = "QUARANTINE"
	CustomsFormRestrictionTypeSANITARYINSPECTION      CustomsFormRestrictionType = "SANITARY_INSPECTION"
)

Defines values for CustomsFormRestrictionType.

type DeleteIndiciaImbParams

type DeleteIndiciaImbParams struct {
	// XPaymentAuthorizationToken Payment Authorization Token from the payments API Call.
	XPaymentAuthorizationToken XPaymentAuthorizationToken `json:"X-Payment-Authorization-Token"`
}

DeleteIndiciaImbParams defines parameters for DeleteIndiciaImb.

type DeleteIndiciaImbResponse

type DeleteIndiciaImbResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *IMBCancelResponse
	XML200       *IMBCancelResponse
	JSON400      *ErrorMessage
	XML400       *ErrorMessage
	JSON401      *ErrorMessage
	XML401       *ErrorMessage
	JSON403      *ErrorMessage
	XML403       *ErrorMessage
	JSON429      *ErrorMessage
	XML429       *ErrorMessage
	JSON503      *ErrorMessage
	XML503       *ErrorMessage
}

func ParseDeleteIndiciaImbResponse

func ParseDeleteIndiciaImbResponse(rsp *http.Response) (*DeleteIndiciaImbResponse, error)

ParseDeleteIndiciaImbResponse parses an HTTP response from a DeleteIndiciaImbWithResponse call

func (DeleteIndiciaImbResponse) Status

func (r DeleteIndiciaImbResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteIndiciaImbResponse) StatusCode

func (r DeleteIndiciaImbResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteLabelBrandingParams

type DeleteLabelBrandingParams struct {
	// XPaymentAuthorizationToken Payment Authorization Token from the payments API Call.
	XPaymentAuthorizationToken XPaymentAuthorizationToken `json:"X-Payment-Authorization-Token"`
}

DeleteLabelBrandingParams defines parameters for DeleteLabelBranding.

type DeleteLabelBrandingResponse

type DeleteLabelBrandingResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *LabelBrandingDeleteResponse
	XML200       *LabelBrandingDeleteResponse
	JSON400      *ErrorMessage
	XML400       *ErrorMessage
	JSON401      *ErrorMessage
	XML401       *ErrorMessage
	JSON403      *ErrorMessage
	XML403       *ErrorMessage
	JSON429      *ErrorMessage
	XML429       *ErrorMessage
	JSON503      *ErrorMessage
	XML503       *ErrorMessage
}

func ParseDeleteLabelBrandingResponse

func ParseDeleteLabelBrandingResponse(rsp *http.Response) (*DeleteLabelBrandingResponse, error)

ParseDeleteLabelBrandingResponse parses an HTTP response from a DeleteLabelBrandingWithResponse call

func (DeleteLabelBrandingResponse) Status

Status returns HTTPResponse.Status

func (DeleteLabelBrandingResponse) StatusCode

func (r DeleteLabelBrandingResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteLabelByIdempotencyParams

type DeleteLabelByIdempotencyParams struct {
	// XPaymentAuthorizationToken Payment Authorization Token from the payments API Call.
	XPaymentAuthorizationToken XPaymentAuthorizationToken `json:"X-Payment-Authorization-Token"`

	// XIdempotencyKey A client-created, randomly generated UUID that uniquely identifies a label request. The value must be unique across all label requests for each customer (CRID) and serves as the idempotency key for downstream reprint and cancellation operations.
	//
	// **Usage**:
	// - *Reprint requests*: Submitting the idempotency key to the reprint endpoint returns the original label image and metadata.
	// - *Cancellation requests*: Submitting the idempotency key to the cancel endpoint cancels an unused label or initiates a refund.
	// - *Label endpoint*: Not idempotent. Resubmission of a previously used UUID will generate a new label and may result in multiple labels bound to the same UUID.  If a previously used UUID is resubmitted, the reprint and cancellation requests will reference the most recent instance of the UUID.
	//
	// The UUID is included in the electronic manifest data (Shipping Services File, D5 record) transmitted to Postal systems.  This will be reflected in the Package Transaction Details Report through IV-MTR as the `External Reference ID`.
	XIdempotencyKey *XIdempotencyKey `json:"X-Idempotency-Key,omitempty"`
}

DeleteLabelByIdempotencyParams defines parameters for DeleteLabelByIdempotency.

type DeleteLabelByIdempotencyResponse

type DeleteLabelByIdempotencyResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *CancelResponse
	XML200       *CancelResponse
	JSON400      *ErrorMessage
	XML400       *ErrorMessage
	JSON401      *ErrorMessage
	XML401       *ErrorMessage
	JSON403      *ErrorMessage
	XML403       *ErrorMessage
	JSON429      *ErrorMessage
	XML429       *ErrorMessage
	JSON503      *ErrorMessage
	XML503       *ErrorMessage
}

func ParseDeleteLabelByIdempotencyResponse

func ParseDeleteLabelByIdempotencyResponse(rsp *http.Response) (*DeleteLabelByIdempotencyResponse, error)

ParseDeleteLabelByIdempotencyResponse parses an HTTP response from a DeleteLabelByIdempotencyWithResponse call

func (DeleteLabelByIdempotencyResponse) Status

Status returns HTTPResponse.Status

func (DeleteLabelByIdempotencyResponse) StatusCode

func (r DeleteLabelByIdempotencyResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteLabelByTrackingParams

type DeleteLabelByTrackingParams struct {
	// XPaymentAuthorizationToken Payment Authorization Token from the payments API Call.
	XPaymentAuthorizationToken XPaymentAuthorizationToken `json:"X-Payment-Authorization-Token"`
}

DeleteLabelByTrackingParams defines parameters for DeleteLabelByTracking.

type DeleteLabelByTrackingResponse

type DeleteLabelByTrackingResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *CancelResponse
	XML200       *CancelResponse
	JSON400      *ErrorMessage
	XML400       *ErrorMessage
	JSON401      *ErrorMessage
	XML401       *ErrorMessage
	JSON403      *ErrorMessage
	XML403       *ErrorMessage
	JSON429      *ErrorMessage
	XML429       *ErrorMessage
	JSON503      *ErrorMessage
	XML503       *ErrorMessage
}

func ParseDeleteLabelByTrackingResponse

func ParseDeleteLabelByTrackingResponse(rsp *http.Response) (*DeleteLabelByTrackingResponse, error)

ParseDeleteLabelByTrackingResponse parses an HTTP response from a DeleteLabelByTrackingWithResponse call

func (DeleteLabelByTrackingResponse) Status

Status returns HTTPResponse.Status

func (DeleteLabelByTrackingResponse) StatusCode

func (r DeleteLabelByTrackingResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DomesticAddress

type DomesticAddress struct {
	// ZIPCode This is the 5-digit ZIP code.
	ZIPCode *string `json:"ZIPCode,omitempty"`

	// ZIPPlus4 This is the 4-digit component of the ZIP+4 code. Using the correct Zip+4 reduces the number of times your mail is handled and can decrease the chance of a misdelivery or error.
	ZIPPlus4 *string `json:"ZIPPlus4"`

	// City This is the city name of the address.
	City *string `json:"city,omitempty"`

	// CityAbbreviation This is the abbreviation of city name for the address.
	CityAbbreviation *string `json:"cityAbbreviation,omitempty"`

	// SecondaryAddress The secondary unit designator, such as apartment(APT) or suite(STE) number, defining the exact location of the address within a building.  For more information please see [Postal Explorer](https://pe.usps.com/text/pub28/28c2_003.htm).
	SecondaryAddress *string `json:"secondaryAddress,omitempty"`

	// State This is the two-character state code of the address.
	State *State `json:"state,omitempty"`

	// StreetAddress The number of a building along with the name of the road or street on which it is located.
	StreetAddress *string `json:"streetAddress,omitempty"`

	// StreetAddressAbbreviation This is the abbreviation of street address line for the address.
	StreetAddressAbbreviation *string `json:"streetAddressAbbreviation,omitempty"`

	// Urbanization An area, sector, or residential development within a geographic area (typically used for addresses in Puerto Rico).
	Urbanization         *string                `json:"urbanization,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

DomesticAddress defines model for DomesticAddress.

func (DomesticAddress) Get

func (a DomesticAddress) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for DomesticAddress. Returns the specified element and whether it was found

func (DomesticAddress) MarshalJSON

func (a DomesticAddress) MarshalJSON() ([]byte, error)

Override default JSON handling for DomesticAddress to handle AdditionalProperties

func (*DomesticAddress) Set

func (a *DomesticAddress) Set(fieldName string, value interface{})

Setter for additional properties for DomesticAddress

func (*DomesticAddress) UnmarshalJSON

func (a *DomesticAddress) UnmarshalJSON(b []byte) error

Override default JSON handling for DomesticAddress to handle AdditionalProperties

type DomesticCustomerReference

type DomesticCustomerReference struct {
	// PrintReferenceNumber Indicates whether or not to print the customer reference number on the label in the Additional Information and User Segment.
	//
	// Note:
	// - Customer Reference numbers are not displayed on label types `2X7LABEL` or `4X4LABEL`.
	// - Customer Reference numbers are not displayed with Customs Forms.
	PrintReferenceNumber *bool `json:"printReferenceNumber,omitempty"`

	// ReferenceNumber A user-assigned number for internal use, such as Order, Invoice, Customer, or Return Merchandise Authorization Numbers.
	//
	// Note:
	// * Domestic outbound label and return label with `labelType` of `4X6LABEL`, `4X5LABEL`, and `6X4LABEL` will display the entire value.
	// * Return label with `labelType` of `4X6LABEL` with `brandingImageFormat` of `TWO_SQUARES` will show the first 25 characters.
	// * These values will also be included in the Shipping Services File.
	ReferenceNumber      *string                `json:"referenceNumber,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

DomesticCustomerReference defines model for DomesticCustomerReference.

func (DomesticCustomerReference) Get

func (a DomesticCustomerReference) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for DomesticCustomerReference. Returns the specified element and whether it was found

func (DomesticCustomerReference) MarshalJSON

func (a DomesticCustomerReference) MarshalJSON() ([]byte, error)

Override default JSON handling for DomesticCustomerReference to handle AdditionalProperties

func (*DomesticCustomerReference) Set

func (a *DomesticCustomerReference) Set(fieldName string, value interface{})

Setter for additional properties for DomesticCustomerReference

func (*DomesticCustomerReference) UnmarshalJSON

func (a *DomesticCustomerReference) UnmarshalJSON(b []byte) error

Override default JSON handling for DomesticCustomerReference to handle AdditionalProperties

type DomesticCustomsForm

type DomesticCustomsForm struct {
	// AESITN AES/ITN Exemption should be populated with the electronic export internal transaction number (if required), or the appropriate Exemption/Exclusion Legend.
	//
	// * **AES - Automated Export System /   ITN - Internal Transaction Number**\
	//   The [internal transaction number (ITN)](https://pe.usps.com/text/imm/immc5_010.htm) is a 14-digit number that corresponds to an export transaction in the Automated Export System. It serves as proof that an exporter met his or her legal obligation to inform the U.S. government about the details of an export shipment.
	// * **EEL- Exemptions, Exclusions, Legend**\
	//   An [AES exemption](https://pe.usps.com/text/imm/immc5_012.htm) is an instance in which you would not have to file in AES to get the 14-digit ITN. Instead of the ITN, you would enter the exemption’s section in the U.S. Foreign Trade Regulations on the export documentation where you would otherwise put the ITN.
	//
	// Sample - `NO EEI 30.37(a)`: Shipments valued at $2,500 or less.
	AESITN *string `json:"AESITN,omitempty"`

	// CertificateNumber Certificate Number
	CertificateNumber *string `json:"certificateNumber,omitempty"`

	// ContentComments Required when customContentType is OTHER.
	ContentComments *string `json:"contentComments,omitempty"`

	// Contents Details of the contents of the package. The first five items will print on the label of the customs form, and the rest will print on a separate continuation page.
	Contents []ShippingContents `json:"contents"`

	// CustomsContentType Specifies the content of the package or envelope.
	//  * MERCHANDISE
	//  * GIFT
	//  * DOCUMENT
	//  * COMMERCIAL_SAMPLE
	//  * RETURNED_GOODS
	//  * OTHER
	//  * HUMANITARIAN_DONATIONS
	//  * DANGEROUS_GOODS
	CustomsContentType DomesticCustomsFormCustomsContentType `json:"customsContentType"`

	// ExportersContact Exporters Contact. Enter, if known, the Exporter’s telephone number, fax number, or email address, as such information might facilitate customs clearance or delivery.
	ExportersContact *string `json:"exportersContact,omitempty"`

	// ExportersReference Exporters Reference. The Exporter’s Reference might be a tax code, importer code, or VAT number used for sales tax.
	ExportersReference *string `json:"exportersReference,omitempty"`

	// ImportersContact Importers Contact. Enter, if known, the Importer’s telephone number, fax number, or email address, as such information might facilitate customs clearance or delivery.
	ImportersContact *string `json:"importersContact,omitempty"`

	// ImportersReference Importers Reference. The Importer’s Reference might be a tax code, importer code, or VAT number used for sales tax.
	ImportersReference *string `json:"importersReference,omitempty"`

	// InvoiceNumber Invoice Number
	InvoiceNumber *string `json:"invoiceNumber,omitempty"`

	// LicenseNumber License Number
	LicenseNumber *string `json:"licenseNumber,omitempty"`

	// RestrictionComments Restriction Comments.  Required when `restrictionType`=`OTHER`.
	RestrictionComments *string `json:"restrictionComments,omitempty"`

	// RestrictionType Restriction Types
	//   * QUARANTINE
	//   * SANITARY_INSPECTION
	//   * PHYTOSANITARY_INSPECTION
	//   * OTHER
	RestrictionType      *DomesticCustomsFormRestrictionType `json:"restrictionType,omitempty"`
	AdditionalProperties map[string]interface{}              `json:"-"`
}

DomesticCustomsForm defines model for DomesticCustomsForm.

func (DomesticCustomsForm) Get

func (a DomesticCustomsForm) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for DomesticCustomsForm. Returns the specified element and whether it was found

func (DomesticCustomsForm) MarshalJSON

func (a DomesticCustomsForm) MarshalJSON() ([]byte, error)

Override default JSON handling for DomesticCustomsForm to handle AdditionalProperties

func (*DomesticCustomsForm) Set

func (a *DomesticCustomsForm) Set(fieldName string, value interface{})

Setter for additional properties for DomesticCustomsForm

func (*DomesticCustomsForm) UnmarshalJSON

func (a *DomesticCustomsForm) UnmarshalJSON(b []byte) error

Override default JSON handling for DomesticCustomsForm to handle AdditionalProperties

type DomesticCustomsFormCustomsContentType

type DomesticCustomsFormCustomsContentType string

DomesticCustomsFormCustomsContentType Specifies the content of the package or envelope.

  • MERCHANDISE
  • GIFT
  • DOCUMENT
  • COMMERCIAL_SAMPLE
  • RETURNED_GOODS
  • OTHER
  • HUMANITARIAN_DONATIONS
  • DANGEROUS_GOODS
const (
	DomesticCustomsFormCustomsContentTypeCOMMERCIALSAMPLE      DomesticCustomsFormCustomsContentType = "COMMERCIAL_SAMPLE"
	DomesticCustomsFormCustomsContentTypeDANGEROUSGOODS        DomesticCustomsFormCustomsContentType = "DANGEROUS_GOODS"
	DomesticCustomsFormCustomsContentTypeDOCUMENT              DomesticCustomsFormCustomsContentType = "DOCUMENT"
	DomesticCustomsFormCustomsContentTypeGIFT                  DomesticCustomsFormCustomsContentType = "GIFT"
	DomesticCustomsFormCustomsContentTypeHUMANITARIANDONATIONS DomesticCustomsFormCustomsContentType = "HUMANITARIAN_DONATIONS"
	DomesticCustomsFormCustomsContentTypeMERCHANDISE           DomesticCustomsFormCustomsContentType = "MERCHANDISE"
	DomesticCustomsFormCustomsContentTypeOTHER                 DomesticCustomsFormCustomsContentType = "OTHER"
	DomesticCustomsFormCustomsContentTypeRETURNEDGOODS         DomesticCustomsFormCustomsContentType = "RETURNED_GOODS"
)

Defines values for DomesticCustomsFormCustomsContentType.

type DomesticCustomsFormRestrictionType

type DomesticCustomsFormRestrictionType string

DomesticCustomsFormRestrictionType Restriction Types

  • QUARANTINE
  • SANITARY_INSPECTION
  • PHYTOSANITARY_INSPECTION
  • OTHER
const (
	DomesticCustomsFormRestrictionTypeOTHER                   DomesticCustomsFormRestrictionType = "OTHER"
	DomesticCustomsFormRestrictionTypePHYTOSANITARYINSPECTION DomesticCustomsFormRestrictionType = "PHYTOSANITARY_INSPECTION"
	DomesticCustomsFormRestrictionTypeQUARANTINE              DomesticCustomsFormRestrictionType = "QUARANTINE"
	DomesticCustomsFormRestrictionTypeSANITARYINSPECTION      DomesticCustomsFormRestrictionType = "SANITARY_INSPECTION"
)

Defines values for DomesticCustomsFormRestrictionType.

type DomesticLabelAddress

type DomesticLabelAddress struct {
	// ZIPCode This is the 5-digit ZIP code.
	ZIPCode *string `json:"ZIPCode,omitempty"`

	// ZIPPlus4 This is the 4-digit component of the ZIP+4 code. Using the correct Zip+4 reduces the number of times your mail is handled and can decrease the chance of a misdelivery or error.
	ZIPPlus4 *string `json:"ZIPPlus4"`

	// City This is the city name of the address.
	City *string `json:"city,omitempty"`

	// CityAbbreviation This is the abbreviation of city name for the address.
	CityAbbreviation *string `json:"cityAbbreviation,omitempty"`

	// Email Email address used for redirect notification via email.
	Email *Email `json:"email,omitempty"`

	// Firm Firm/business name corresponding to the address.
	Firm *string `json:"firm,omitempty"`

	// FirstName First Name corresponding to the address.
	FirstName *string `json:"firstName,omitempty"`

	// IgnoreBadAddress Allows Non-Validated Origin Street Address. Enter `true` to bypass street address validation failures/errors or `false` if only validated addresses should be allowed.
	//
	// Note: Integrators are recommended to always use `false` to ensure no delivery issues. In the event USPS cannot validate the street address, this tag will “bypass” address validation error when `true` is indicated to allow label creation which could impact delivery.
	IgnoreBadAddress *bool `json:"ignoreBadAddress,omitempty"`

	// LastName Last Name corresponding to the address.
	LastName *string `json:"lastName,omitempty"`

	// Phone The phone number, including the country extension and area code or the local national format, with no punctuation.
	Phone *Phone `json:"phone,omitempty"`

	// SecondaryAddress The secondary unit designator, such as apartment(APT) or suite(STE) number, defining the exact location of the address within a building.  For more information please see [Postal Explorer](https://pe.usps.com/text/pub28/28c2_003.htm).
	SecondaryAddress *string `json:"secondaryAddress,omitempty"`

	// State This is the two-character state code of the address.
	State *State `json:"state,omitempty"`

	// StreetAddress The number of a building along with the name of the road or street on which it is located.
	StreetAddress *string `json:"streetAddress,omitempty"`

	// StreetAddressAbbreviation This is the abbreviation of street address line for the address.
	StreetAddressAbbreviation *string `json:"streetAddressAbbreviation,omitempty"`

	// Urbanization An area, sector, or residential development within a geographic area (typically used for addresses in Puerto Rico).
	Urbanization         *string                `json:"urbanization,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

DomesticLabelAddress defines model for DomesticLabelAddress.

func (DomesticLabelAddress) Get

func (a DomesticLabelAddress) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for DomesticLabelAddress. Returns the specified element and whether it was found

func (DomesticLabelAddress) MarshalJSON

func (a DomesticLabelAddress) MarshalJSON() ([]byte, error)

Override default JSON handling for DomesticLabelAddress to handle AdditionalProperties

func (*DomesticLabelAddress) Set

func (a *DomesticLabelAddress) Set(fieldName string, value interface{})

Setter for additional properties for DomesticLabelAddress

func (*DomesticLabelAddress) UnmarshalJSON

func (a *DomesticLabelAddress) UnmarshalJSON(b []byte) error

Override default JSON handling for DomesticLabelAddress to handle AdditionalProperties

type DomesticLabelSenderAddress

type DomesticLabelSenderAddress struct {
	// ZIPCode This is the 5-digit ZIP code.
	ZIPCode *string `json:"ZIPCode,omitempty"`

	// ZIPPlus4 This is the 4-digit component of the ZIP+4 code. Using the correct Zip+4 reduces the number of times your mail is handled and can decrease the chance of a misdelivery or error.
	ZIPPlus4 *string `json:"ZIPPlus4"`

	// City This is the city name of the address.
	City *string `json:"city,omitempty"`

	// CityAbbreviation This is the abbreviation of city name for the address.
	CityAbbreviation *string `json:"cityAbbreviation,omitempty"`

	// Email Email address used for redirect notification via email.
	Email *Email `json:"email,omitempty"`

	// Firm Firm/business name corresponding to the address.
	Firm *string `json:"firm,omitempty"`

	// FirstName First Name corresponding to the address.
	FirstName *string `json:"firstName,omitempty"`

	// IgnoreBadAddress Allows Non-Validated Origin Street Address. Enter `true` to bypass street address validation failures/errors or `false` if only validated addresses should be allowed.
	//
	// Note: Integrators are recommended to always use `false` to ensure no delivery issues. In the event USPS cannot validate the street address, this tag will “bypass” address validation error when `true` is indicated to allow label creation which could impact delivery.
	IgnoreBadAddress *bool `json:"ignoreBadAddress,omitempty"`

	// LastName Last Name corresponding to the address.
	LastName *string `json:"lastName,omitempty"`

	// Phone The phone number, including the country extension and area code or the local national format, with no punctuation.
	Phone *Phone `json:"phone,omitempty"`

	// PlatformUserId This is a third-party unique identifier for the sender used for correlation purposes.
	PlatformUserId *string `json:"platformUserId,omitempty"`

	// SecondaryAddress The secondary unit designator, such as apartment(APT) or suite(STE) number, defining the exact location of the address within a building.  For more information please see [Postal Explorer](https://pe.usps.com/text/pub28/28c2_003.htm).
	SecondaryAddress *string `json:"secondaryAddress,omitempty"`

	// State This is the two-character state code of the address.
	State *State `json:"state,omitempty"`

	// StreetAddress The number of a building along with the name of the road or street on which it is located.
	StreetAddress *string `json:"streetAddress,omitempty"`

	// StreetAddressAbbreviation This is the abbreviation of street address line for the address.
	StreetAddressAbbreviation *string `json:"streetAddressAbbreviation,omitempty"`

	// Urbanization An area, sector, or residential development within a geographic area (typically used for addresses in Puerto Rico).
	Urbanization         *string                `json:"urbanization,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

DomesticLabelSenderAddress defines model for DomesticLabelSenderAddress.

func (DomesticLabelSenderAddress) Get

func (a DomesticLabelSenderAddress) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for DomesticLabelSenderAddress. Returns the specified element and whether it was found

func (DomesticLabelSenderAddress) MarshalJSON

func (a DomesticLabelSenderAddress) MarshalJSON() ([]byte, error)

Override default JSON handling for DomesticLabelSenderAddress to handle AdditionalProperties

func (*DomesticLabelSenderAddress) Set

func (a *DomesticLabelSenderAddress) Set(fieldName string, value interface{})

Setter for additional properties for DomesticLabelSenderAddress

func (*DomesticLabelSenderAddress) UnmarshalJSON

func (a *DomesticLabelSenderAddress) UnmarshalJSON(b []byte) error

Override default JSON handling for DomesticLabelSenderAddress to handle AdditionalProperties

type DomesticLabelToAddress

type DomesticLabelToAddress struct {
	// ZIPCode This is the 5-digit ZIP code.
	ZIPCode *string `json:"ZIPCode,omitempty"`

	// ZIPPlus4 This is the 4-digit component of the ZIP+4 code. Using the correct Zip+4 reduces the number of times your mail is handled and can decrease the chance of a misdelivery or error.
	ZIPPlus4 *string `json:"ZIPPlus4"`

	// City This is the city name of the address.
	City *string `json:"city,omitempty"`

	// CityAbbreviation This is the abbreviation of city name for the address.
	CityAbbreviation *string `json:"cityAbbreviation,omitempty"`

	// Email Email address used for redirect notification via email.
	Email *Email `json:"email,omitempty"`

	// FacilityId Facility ID is required when generating a label for Parcel Locker delivery or Hold for Pickup. Facility ID can be retrieved through the Locations API (v3).
	//
	// Notes:
	// * For Hold for Pickup services, the Facility ID is obtained from the `GET /post-office-locations` endpoint.
	// * For Parcel Locker delivery, the Facility ID is obtained from the `GET /parcel-locker-locations` endpoint.
	FacilityId *string `json:"facilityId,omitempty"`

	// Firm Firm/business name corresponding to the address.
	Firm *string `json:"firm,omitempty"`

	// FirstName First Name corresponding to the address.
	FirstName *string `json:"firstName,omitempty"`

	// HoldForPickup Indicator to request Hold for Pickup at a Post Office Facility. If this field is set as true then the `toAddress` object: 'facilityID', 'email', and 'phone' as well as the `fromAddress` object: 'firstName',  'lastName', 'email', and 'phone' fields are required.
	HoldForPickup *bool `json:"holdForPickup,omitempty"`

	// IgnoreBadAddress Allows Non-Validated Destination Street Address. Enter `true` to bypass street address validation failures/errors or `false` if only validated addresses should be allowed.
	//
	// Note: Integrators are recommended to always use `false` to ensure no delivery issues.
	//
	// In the event USPS cannot validate the street address, this tag will “bypass” address validation error when `true` is indicated to allow label creation which could impact delivery.
	//
	// This will automatically be set to `false` if extra service code `415 - USPS Label Delivery` is requested.
	IgnoreBadAddress *bool `json:"ignoreBadAddress,omitempty"`

	// LastName Last Name corresponding to the address.
	LastName *string `json:"lastName,omitempty"`

	// ParcelLockerDelivery Indicator to request delivery to a parcel locker instead of the recipient's address. If this field is set as true then the facilityId, email, and firstName/lastName or firm fields are required.
	//
	// Note:
	// * Packages that require customs forms are not eligible to be shipped to a Smart Locker. Parcel lockers are not eligible for Hold for Pickup shipments.
	ParcelLockerDelivery *bool `json:"parcelLockerDelivery,omitempty"`

	// Phone The phone number, including the country extension and area code or the local national format, with no punctuation.
	Phone *Phone `json:"phone,omitempty"`

	// SecondaryAddress The secondary unit designator, such as apartment(APT) or suite(STE) number, defining the exact location of the address within a building.  For more information please see [Postal Explorer](https://pe.usps.com/text/pub28/28c2_003.htm).
	SecondaryAddress *string `json:"secondaryAddress,omitempty"`

	// State This is the two-character state code of the address.
	State *State `json:"state,omitempty"`

	// StreetAddress The number of a building along with the name of the road or street on which it is located.
	StreetAddress *string `json:"streetAddress,omitempty"`

	// StreetAddressAbbreviation This is the abbreviation of street address line for the address.
	StreetAddressAbbreviation *string `json:"streetAddressAbbreviation,omitempty"`

	// Urbanization An area, sector, or residential development within a geographic area (typically used for addresses in Puerto Rico).
	Urbanization         *string                `json:"urbanization,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

DomesticLabelToAddress defines model for DomesticLabelToAddress.

func (DomesticLabelToAddress) Get

func (a DomesticLabelToAddress) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for DomesticLabelToAddress. Returns the specified element and whether it was found

func (DomesticLabelToAddress) MarshalJSON

func (a DomesticLabelToAddress) MarshalJSON() ([]byte, error)

Override default JSON handling for DomesticLabelToAddress to handle AdditionalProperties

func (*DomesticLabelToAddress) Set

func (a *DomesticLabelToAddress) Set(fieldName string, value interface{})

Setter for additional properties for DomesticLabelToAddress

func (*DomesticLabelToAddress) UnmarshalJSON

func (a *DomesticLabelToAddress) UnmarshalJSON(b []byte) error

Override default JSON handling for DomesticLabelToAddress to handle AdditionalProperties

type DomesticPackageDescription

type DomesticPackageDescription struct {
	// CarrierRelease Indicates whether recipients authorize a carrier to leave a shipment if no one is available to receive it at the time of delivery. Priority Mail Express&#174; shipments or items requiring a signature at delivery are not eligible (e.g. Signature Confirmation, Insurance > $500).
	//
	// Note:
	//  * Carrier Release is currently not supported when `holdForPickup` is set to `true`.
	//  * Carrier Release is currently not supported with mail class values of `PRIORITY_MAIL`, `PRIORITY_MAIL_EXPRESS`, or `USPS_GROUND_ADVANTAGE`.
	//  * Carrier Release is currently not supported with `extraServices` `910`, `911`, `912`, `913`, `921`, `922`, `923`, `924`, `925`, `930`, `931`, `934`, `955`, or `981`.
	CarrierRelease *bool `json:"carrierRelease,omitempty"`

	// CustomerReference Used for shippers to print a value on a label and included in the Shipping Services File (SSF).
	//
	// Note:
	//  * Customer Reference #3-4 are only supported with label types `4X5LABEL`, `4X6LABEL`, and `6X4LABEL`.
	//  * Customer Reference #3-4 cannot be used with a customs form.
	//  * Customer Reference #3-4 will not be added to the SSF.
	//  * Customer Reference will not display with `imageInfo.brandingImageFormat` value of `RECTANGLE`.
	//  * When Customer Reference #4 is provided with a Destination Entry Facility, the Drop-Off Location will not be displayed on the label.
	CustomerReference *[]DomesticCustomerReference `json:"customerReference,omitempty"`

	// DestinationEntryFacilityAddress Address fields for US locations
	DestinationEntryFacilityAddress *DomesticAddress `json:"destinationEntryFacilityAddress,omitempty"`

	// DestinationEntryFacilityType Types of Facilities:
	// * `NONE` - Translate to Destination Rate Indicator N
	// * `DESTINATION_NETWORK_DISTRIBUTION_CENTER` - Translate to Destination Rate Indicator B
	// * `DESTINATION_SECTIONAL_CENTER_FACILITY` - Translate to Destination Rate Indicator S
	// * `DESTINATION_DELIVERY_UNIT` - Translate to Destination Rate Indicator D
	// * `DESTINATION_SERVICE_HUB` - Translate to Destination Rate Indicator H
	// * `DESTINATION_REGIONAL_PROCESSING_DISTRIBUTION_CENTER` - Translate to Destination Rate Indicator B
	//
	// Note:
	// * If any value other than `NONE` is selected, a destinationEntryFacilityAddress is required.
	// * The destinationEntryFacilityAddress must be a valid facility to drop your package
	// * The destination entry facility type must be set to `NONE` when there is a value provided for the 'inductionZipCode' field
	// * Effective 01/19/2025: `DESTINATION_DELIVERY_UNIT` is the only valid enumeration when using the 'USPS_CONNECT_MAIL' mail class
	// * Effective 01/18/2026: `DESTINATION_NETWORK_DISTRIBUTION_CENTER` with `PARCEL_SELECT` is no longer eligible.
	// * Effective 01/18/2026: (NSA Only) `DESTINATION_REGIONAL_PROCESSING_DISTRIBUTION_CENTER` with `PARCEL_SELECT` is available as an option.
	DestinationEntryFacilityType DomesticPackageDescriptionDestinationEntryFacilityType `json:"destinationEntryFacilityType"`

	// DimensionsUOM Dimensions unit of measure
	// * in - Inches
	DimensionsUOM *DomesticPackageDescriptionDimensionsUOM `json:"dimensionsUOM,omitempty"`

	// ExtraServices Extra Service Code requested.
	// * 365 - Global Direct Entry
	// * 415 - USPS Label Delivery
	// * 480 - Tracking Plus 6 Months
	// * 481 - Tracking Plus 1 Year
	// * 482 - Tracking Plus 3 Years
	// * 483 - Tracking Plus 5 Years
	// * 484 - Tracking Plus 7 Years
	// * 485 - Tracking Plus 10 Years
	// * 486 - Tracking Plus Signature 3 Years
	// * 487 - Tracking Plus Signature 5 Years
	// * 488 - Tracking Plus Signature 7 Years
	// * 489 - Tracking Plus Signature 10 Years
	// * 810 - HAZMAT Air Eligible Ethanol Package
	// * 811 - HAZMAT Class 1 - Toy Propellant/Safety Fuse Package
	// * 812 - HAZMAT Class 3 – Flammable Liquid Package
	// * 813 - HAZMAT Class 7 - Radioactive Materials Package
	// * 814 - HAZMAT Class 8 - Corrosive Materials Package
	// * 815 - HAZMAT Class 8 - Nonspillable Wet Battery Package
	// * 816 - HAZMAT Class 9 - Lithium Battery Marked - Ground Only Package
	// * 817 - HAZMAT Class 9 - Lithium Battery - Returns Package
	// * 818 - HAZMAT Class 9 - Lithium batteries, marked package
	// * 819 - HAZMAT Class 9 - Dry Ice Package
	// * 820 - HAZMAT Class 9 - Lithium batteries, unmarked package
	// * 821 - HAZMAT Class 9 - Magnetized Materials Package
	// * 822 - HAZMAT Division 4.1 – Flammable Solids or Safety Matches Package
	// * 823 - HAZMAT Division 5.1 - Oxidizers Package
	// * 824 - HAZMAT Division 5.2 - Organic Peroxides Package
	// * 825 - HAZMAT Division 6.1 – Toxic Materials Package
	// * 826 - HAZMAT Division 6.2 – Infectious Substances Package
	// * 827 - HAZMAT Excepted Quantity Provision Package
	// * 828 - HAZMAT Ground Only
	// * 829 - HAZMAT ID8000 Consumer Commodity Package
	// * 830 - HAZMAT Lighters Package
	// * 831 - HAZMAT LTD QTY Ground Package
	// * 832 - HAZMAT Small Quantity Provision Package
	// * 857 - Hazardous Material
	// * 910 - Certified Mail
	// * 911 - Certified Mail Restricted Delivery
	// * 912 - Certified Mail Adult Signature Required
	// * 913 - Certified Mail Adult Signature Restricted Delivery
	// * 920 - USPS Tracking
	// * 921 - Signature Confirmation
	// * 922 - Adult Signature Required 21 or Over
	// * 923 - Adult Signature Restricted Delivery 21 or Over
	// * 924 - Signature Confirmation Restricted Delivery
	// * 925 - Priority Mail Express Merchandise Insurance
	// * 930 - Insurance <= $500
	// * 931 - Insurance > $500
	// * 934 - Insurance Restricted Delivery
	// * 955 - Return Receipt
	// * 957 - Return Receipt Electronic
	// * 981 - Signature Requested (PRIORITY_MAIL_EXPRESS only)
	// * 986 - PO to Addressee (PRIORITY_MAIL_EXPRESS only)
	// * 991 - Sunday Delivery
	//
	// Note:
	// * When the extra service code "930" is provided in the request, if the item value is over $500, "930" will automatically be replaced with "931" - Insurance (Greater than $500).
	// * USPS Label Delivery (Print and Deliver, extra service code "415"): When requesting this service, no images will be returned in the API response. The label and receipt will be printed and mailed to the `fromAddress` provided. The mailed label will always include a receipt on the page. This service is not available at all locations.
	// * Some service codes require a combination with extra services such as "955" and "957". For all valid combinations, visit [https://postalpro.usps.com/IMPB_Service_Type_Codes](https://postalpro.usps.com/IMPB_Service_Type_Codes).
	ExtraServices *[]ExtraService `json:"extraServices,omitempty"`

	// Girth The girth of the container, in dimensionsUOM. If partial dimensions are provided, an error response will return. Length, Width, Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. In addition, Girth is required only for a non- rectangular package in addition to Length, Width, Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non- rectangular packages.
	Girth *float32 `json:"girth,omitempty"`

	// HasNonstandardCharacteristics Package is nonstandard. Nonstandard packages include cylindrical tubes and rolls, certain high-density items, cartons containing more than 24 ounces of liquids in one or more glass containers, cartons containing 1 gallon or more of liquid in metal or plastic containers, and items in [201.7.6.2](https://pe.usps.com/text/dmm300/201.htm#7.6.2).
	HasNonstandardCharacteristics *bool `json:"hasNonstandardCharacteristics,omitempty"`

	// Height The height of the container, in dimensionsUOM. If partial dimensions are provided, an error response will return. Length, Width, and Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. Girth is required only for a non-rectangular package in addition to Length, Width, and Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non-rectangular packages.
	Height float32 `json:"height"`

	// InductionZIPCode The 5-Digit ZIP Code representing the location where the package is being inducted (i.e. dropped off) into the mailstream.  When provided, this ZIP Code will be used for pricing instead of `fromAddress.ZIPCode`.
	InductionZIPCode *InductionZIPCode `json:"inductionZIPCode,omitempty"`

	// Length The length of the container, in dimensionsUOM. If partial dimensions are provided, an error response will return. Length, Width, and Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. Girth is required only for a non-rectangular package in addition to Length, Width, and Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non-rectangular packages.
	Length float32 `json:"length"`

	// LogisticsManagerMID This is the mailer ID associated with the logistics manager for this label This provides an additional copy of the scan extract file to the MID's outbound folder.
	LogisticsManagerMID *string `json:"logisticsManagerMID,omitempty"`

	// MailClass The mail service requested.
	//
	// Note:
	// - `PARCEL_SELECT` with a `destinationEntryFacilityType` of `NONE` will convert to `USPS_GROUND_ADVANTAGE`.
	// - `PARCEL_SELECT_LIGHTWEIGHT` is deprecated and will convert to `PARCEL_SELECT`.
	// - `FIRST-CLASS_PACKAGE_SERVICE` is deprecated and will convert to `USPS_GROUND_ADVANTAGE`.
	// - Certain mail classes, such as `MEDIA_MAIL`, `BOUND_PRINTED_MATTER`, and `LIBRARY_MAIL`, have eligibility rules on what can be mailed using that service.  For more details on these mail classes, please visit [What are Package Services?](https://faq.usps.com/s/article/What-are-Package-Services).
	// - The Heavy Printed Matter product is supported with `MARKETING_MAIL_PARCELS`. To create Heavy Printed Matter labels, the `rateIndicator` should be set to `PR` or `NP` for Presorted or Nonpresorted USPS Marketing Mail Parcels Heavy Printed Matter or to `PN` or `NN` for Nonprofit Presorted or Nonpresorted USPS Marketing Mail Parcels Heavy Printed Matter respectively.
	MailClass DomesticPackageDescriptionMailClass `json:"mailClass"`

	// MailOwnerMID This is the mailer ID associated with the mail owner for this label This provides an additional copy of the scan extract file to the MID's outbound folder.
	MailOwnerMID *string `json:"mailOwnerMID,omitempty"`

	// MailingDate The local date on which the package will be mailed. If the time is not provided, it will be defaulted to 10:00 p.m. local time.  Local time will be based on the `destinationEntryFacilityAddress.ZIPCode` or `inductionZIPCode` when provided, otherwise `fromAddress.ZIPCode` will be used as the origin ZIP Code.
	MailingDate string `json:"mailingDate"`

	// Nonprofit Used to specify if the shipment is a nonprofit mailing.  Shippers must be authorized for nonprofit mailings to qualify for nonprofit pricing.  All nonprofit mailings must not be used for product fulfillment.  For more details on Nonprofit Mailers, visit [Nonprofit Mailers](https://pe.usps.com/BusinessMail101?ViewName=NonprofitPrices).
	//
	// When `nonprofit` is `true` and `mailClass` is `MARKETING_MAIL_PARCELS`, nonprofit rates will be applied.  When using `rateIndicator` values, the `rateIndicator` must also be `NN` or `PN`.
	//
	// When `nonprofit` is `false` and `mailClass` is `MARKETING_MAIL_PARCELS`, standard rates will be applied.
	//
	// `nonprofit` is not supported for any other mail class.
	Nonprofit      *Nonprofit                                 `json:"nonprofit,omitempty"`
	PackageOptions *DomesticPackageDescription_PackageOptions `json:"packageOptions,omitempty"`

	// PhysicalSignatureRequired Indicates the method for the signature that will be used when signing for the package.  Required when requesting signature `extraServices` including `910`, `911`, `912`, `913`, `921`, `922`, `923`, `924`, `925`, `931`, `934`, `955`, and `981`.  Additionally required when requesting `extraServices` code `930` with a `packageValue` greater than $500.
	//
	// When `physicalSignatureRequired` is `false`, a USPS Electronic Signature Online (USPS eSOL) may be used to sign for the item.  For more information on USPS eSOL, please visit the [USPS eSOL FAQ](https://faq.usps.com/s/article/USPS-Electronic-Signature-Online).
	//
	// When `physicalSignatureRequired` is `true`, the recipient will be required to physically sign for the item.  A USPS eSOL on record will not be accepted as a valid signature for the item.
	//
	// Notes:
	//  * Regardless of the boolean, the printed label will still display "SIGNATURE REQUIRED" if a signature service is included with the label.
	//  * `carrierRelease` is not eligible to be used with `physicalSignatureRequired`.
	PhysicalSignatureRequired *bool `json:"physicalSignatureRequired,omitempty"`

	// ProcessingCategory Value designates if shipment is `MACHINABLE`, `NONSTANDARD`, `LETTERS`, or `FLATS`.
	//
	// Note:
	// * When requesting the mail class `USPS_CONNECT_MAIL`, users are required to use a processing category of `FLATS`.
	// * The processing category `LETTERS` is only valid for mail classes `PRIORITY_MAIL` and `PRIORITY_MAIL_EXPRESS` for outbound shipments.
	// * The processing category `FLATS` is not valid for mail class `USPS_GROUND_ADVANTAGE`.
	// * `IRREGULAR` is deprecated and will convert to `NONSTANDARD` as of 01/19/2025.
	// * `NON_MACHINABLE` is deprecated and will convert to `NONSTANDARD` as of 01/19/2025.
	ProcessingCategory DomesticPackageDescriptionProcessingCategory `json:"processingCategory"`

	// RateIndicator Use to specify USPS&#174; containers/packaging or container attributes that may affect postage.
	//
	// Note:
	//   * Effective 07/12/2026:  Rate indicators `Q6`, `Q7`, `Q8`, `Q9`, and `Q0` are no longer supported.  The dimensions for Cubic Soft Pack tiers `P5`, `P6`, `P7`, `P8`, and `P9` will be updated to include the dimensions for Tiers 6-10.  For updated tiers and more information, please view the [Postal Bulletin](https://about.usps.com/postal-bulletin/2026/pb22705/html/updt_001.htm).
	//
	// Rate indicator list:
	//   * 3D - 3-Digit
	//   * 3N - 3-Digit Dimensional Rectangular
	//   * 3R - 3-Digit Dimensional Nonrectangular
	//   * 5D - 5-Digit
	//   * BA - Basic
	//   * BB - Mixed NDC
	//   * CP - Cubic Parcel
	//   * CM - USPS Connect&#174; Local Mail
	//   * DC - NDC
	//   * DE - SCF
	//   * DF - 5-Digit
	//   * DN - Dimensional Nonrectangular
	//   * DR - Dimensional Rectangular
	//   * E4 - Priority Mail Express Flat Rate Envelope - Post Office To Addressee
	//   * E6 - Priority Mail Express Legal Flat Rate Envelope
	//   * FA - Legal Flat Rate Envelope
	//   * FB - Medium Flat Rate Box/Large Flat Rate Bag
	//   * FE - Flat Rate Envelope
	//   * FP - Padded Flat Rate Envelope
	//   * FS - Small Flat Rate Box
	//   * LC - USPS Connect&#174; Local Single Piece
	//   * LF - USPS Connect&#174; Local Flat Rate Box
	//   * LL - USPS Connect&#174; Local Large Flat Rate Bag
	//   * LO - USPS Connect&#174; Local Oversized
	//   * LS - USPS Connect&#174; Local Small Flat Rate Bag
	//   * NN - Non-Presorted Nonprofit
	//   * NP - Non-Presorted
	//   * OS - Oversized
	//   * PN - Presorted Nonprofit
	//   * P5 - Cubic Soft Pack Tier 1
	//   * P6 - Cubic Soft Pack Tier 2
	//   * P7 - Cubic Soft Pack Tier 3
	//   * P8 - Cubic Soft Pack Tier 4
	//   * P9 - Cubic Soft Pack Tier 5
	//   * Q6 - Cubic Soft Pack Tier 6
	//   * Q7 - Cubic Soft Pack Tier 7
	//   * Q8 - Cubic Soft Pack Tier 8
	//   * Q9 - Cubic Soft Pack Tier 9
	//   * Q0 - Cubic Soft Pack Tier 10
	//   * PA - Priority Mail Express Single Piece
	//   * PL - Large Flat Rate Box
	//   * PM - Large Flat Rate Box APO/FPO/DPO
	//   * PR - Presorted
	//   * SN - SCF Dimensional Nonrectangular
	//   * SP - Single Piece
	//   * SR - SCF Dimensional Rectangular
	RateIndicator DomesticPackageDescriptionRateIndicator `json:"rateIndicator"`

	// SerialNumberFormat Used to specify the barcode construct used for the generated tracking number.  For details on barcode constructs, reference Appendix J in [Pub 199](https://postalpro.usps.com/pub199).
	//
	// `STANDARD` - Will generate a `C01`, `C03`, `C05`, or `C07` barcode construct, based on the Label Owner's `MID` in the Payment Authorization Token.
	//
	// `EXTENDED` - Will generate a `C02` or `C06` barcode construct, based on the Label Owner's `MID` in the Payment Authorization Token.
	SerialNumberFormat *SerialNumberFormat `json:"serialNumberFormat,omitempty"`

	// ShipperVisibilityMethod When generating labels for a third party shipper the label provider must capture and provide contact details of the individual or entity to whom they provide the label. There are two methods for reporting shipper information to USPS:
	//
	// 1. The label provider creates a unique USPS Mailer ID (MID) using the name, validated address, phone, and email contact information of each shipper. When using this method the Mailer ID should be submitted in the MID field in the LABEL_OWNER role when generating the payment authorization token and this field should be populated with 'MID_INFORMATION'
	//
	// 2. An alternative method allows for the label provider to assign a unique alphanumeric value known as a platformUserId to each shipper and to report the platformUserId together with the required shipper contact details. When using this method the shipper contact details are required in the `senderAddress` object (including `streetAddress`, `city`, `state`, `ZIPCode`, `phone`, `email`, `platformUserId` & `firstName`/`lastName` or `firm`) and this field should be populated with 'SENDER_INFORMATION'.
	ShipperVisibilityMethod *DomesticPackageDescriptionShipperVisibilityMethod `json:"shipperVisibilityMethod,omitempty"`

	// Weight The package weight, in weightUOM (Unit Of Measure). Items must weigh 70 pounds (1120 ounces) or less.
	Weight float32 `json:"weight"`

	// WeightUOM Weight Unit of Measurement
	//   * lb - Pounds
	WeightUOM *DomesticPackageDescriptionWeightUOM `json:"weightUOM,omitempty"`

	// Width The width of the container, in dimensionsUOM. If partial dimensions are provided, an error response will return. Length, Width, and Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. Girth is required only for a non-rectangular package in addition to Length, Width, and Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non- rectangular packages.
	Width                float32                `json:"width"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

DomesticPackageDescription defines model for DomesticPackageDescription.

func (DomesticPackageDescription) Get

func (a DomesticPackageDescription) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for DomesticPackageDescription. Returns the specified element and whether it was found

func (DomesticPackageDescription) MarshalJSON

func (a DomesticPackageDescription) MarshalJSON() ([]byte, error)

Override default JSON handling for DomesticPackageDescription to handle AdditionalProperties

func (*DomesticPackageDescription) Set

func (a *DomesticPackageDescription) Set(fieldName string, value interface{})

Setter for additional properties for DomesticPackageDescription

func (*DomesticPackageDescription) UnmarshalJSON

func (a *DomesticPackageDescription) UnmarshalJSON(b []byte) error

Override default JSON handling for DomesticPackageDescription to handle AdditionalProperties

type DomesticPackageDescriptionDestinationEntryFacilityType

type DomesticPackageDescriptionDestinationEntryFacilityType string

DomesticPackageDescriptionDestinationEntryFacilityType Types of Facilities: * `NONE` - Translate to Destination Rate Indicator N * `DESTINATION_NETWORK_DISTRIBUTION_CENTER` - Translate to Destination Rate Indicator B * `DESTINATION_SECTIONAL_CENTER_FACILITY` - Translate to Destination Rate Indicator S * `DESTINATION_DELIVERY_UNIT` - Translate to Destination Rate Indicator D * `DESTINATION_SERVICE_HUB` - Translate to Destination Rate Indicator H * `DESTINATION_REGIONAL_PROCESSING_DISTRIBUTION_CENTER` - Translate to Destination Rate Indicator B

Note: * If any value other than `NONE` is selected, a destinationEntryFacilityAddress is required. * The destinationEntryFacilityAddress must be a valid facility to drop your package * The destination entry facility type must be set to `NONE` when there is a value provided for the 'inductionZipCode' field * Effective 01/19/2025: `DESTINATION_DELIVERY_UNIT` is the only valid enumeration when using the 'USPS_CONNECT_MAIL' mail class * Effective 01/18/2026: `DESTINATION_NETWORK_DISTRIBUTION_CENTER` with `PARCEL_SELECT` is no longer eligible. * Effective 01/18/2026: (NSA Only) `DESTINATION_REGIONAL_PROCESSING_DISTRIBUTION_CENTER` with `PARCEL_SELECT` is available as an option.

const (
	DomesticPackageDescriptionDestinationEntryFacilityTypeDESTINATIONDELIVERYUNIT                         DomesticPackageDescriptionDestinationEntryFacilityType = "DESTINATION_DELIVERY_UNIT"
	DomesticPackageDescriptionDestinationEntryFacilityTypeDESTINATIONNETWORKDISTRIBUTIONCENTER            DomesticPackageDescriptionDestinationEntryFacilityType = "DESTINATION_NETWORK_DISTRIBUTION_CENTER"
	DomesticPackageDescriptionDestinationEntryFacilityTypeDESTINATIONREGIONALPROCESSINGDISTRIBUTIONCENTER DomesticPackageDescriptionDestinationEntryFacilityType = "DESTINATION_REGIONAL_PROCESSING_DISTRIBUTION_CENTER"
	DomesticPackageDescriptionDestinationEntryFacilityTypeDESTINATIONSECTIONALCENTERFACILITY              DomesticPackageDescriptionDestinationEntryFacilityType = "DESTINATION_SECTIONAL_CENTER_FACILITY"
	DomesticPackageDescriptionDestinationEntryFacilityTypeDESTINATIONSERVICEHUB                           DomesticPackageDescriptionDestinationEntryFacilityType = "DESTINATION_SERVICE_HUB"
	DomesticPackageDescriptionDestinationEntryFacilityTypeNONE                                            DomesticPackageDescriptionDestinationEntryFacilityType = "NONE"
)

Defines values for DomesticPackageDescriptionDestinationEntryFacilityType.

type DomesticPackageDescriptionDimensionsUOM

type DomesticPackageDescriptionDimensionsUOM string

DomesticPackageDescriptionDimensionsUOM Dimensions unit of measure * in - Inches

const (
	DomesticPackageDescriptionDimensionsUOMIn DomesticPackageDescriptionDimensionsUOM = "in"
)

Defines values for DomesticPackageDescriptionDimensionsUOM.

type DomesticPackageDescriptionMailClass

type DomesticPackageDescriptionMailClass string

DomesticPackageDescriptionMailClass The mail service requested.

Note: - `PARCEL_SELECT` with a `destinationEntryFacilityType` of `NONE` will convert to `USPS_GROUND_ADVANTAGE`. - `PARCEL_SELECT_LIGHTWEIGHT` is deprecated and will convert to `PARCEL_SELECT`. - `FIRST-CLASS_PACKAGE_SERVICE` is deprecated and will convert to `USPS_GROUND_ADVANTAGE`. - Certain mail classes, such as `MEDIA_MAIL`, `BOUND_PRINTED_MATTER`, and `LIBRARY_MAIL`, have eligibility rules on what can be mailed using that service. For more details on these mail classes, please visit [What are Package Services?](https://faq.usps.com/s/article/What-are-Package-Services). - The Heavy Printed Matter product is supported with `MARKETING_MAIL_PARCELS`. To create Heavy Printed Matter labels, the `rateIndicator` should be set to `PR` or `NP` for Presorted or Nonpresorted USPS Marketing Mail Parcels Heavy Printed Matter or to `PN` or `NN` for Nonprofit Presorted or Nonpresorted USPS Marketing Mail Parcels Heavy Printed Matter respectively.

const (
	DomesticPackageDescriptionMailClassBOUNDPRINTEDMATTER       DomesticPackageDescriptionMailClass = "BOUND_PRINTED_MATTER"
	DomesticPackageDescriptionMailClassFIRSTCLASSPACKAGESERVICE DomesticPackageDescriptionMailClass = "FIRST-CLASS_PACKAGE_SERVICE"
	DomesticPackageDescriptionMailClassLIBRARYMAIL              DomesticPackageDescriptionMailClass = "LIBRARY_MAIL"
	DomesticPackageDescriptionMailClassMARKETINGMAILPARCELS     DomesticPackageDescriptionMailClass = "MARKETING_MAIL_PARCELS"
	DomesticPackageDescriptionMailClassMEDIAMAIL                DomesticPackageDescriptionMailClass = "MEDIA_MAIL"
	DomesticPackageDescriptionMailClassPARCELSELECT             DomesticPackageDescriptionMailClass = "PARCEL_SELECT"
	DomesticPackageDescriptionMailClassPARCELSELECTLIGHTWEIGHT  DomesticPackageDescriptionMailClass = "PARCEL_SELECT_LIGHTWEIGHT"
	DomesticPackageDescriptionMailClassPRIORITYMAIL             DomesticPackageDescriptionMailClass = "PRIORITY_MAIL"
	DomesticPackageDescriptionMailClassPRIORITYMAILEXPRESS      DomesticPackageDescriptionMailClass = "PRIORITY_MAIL_EXPRESS"
	DomesticPackageDescriptionMailClassUSPSCONNECTLOCAL         DomesticPackageDescriptionMailClass = "USPS_CONNECT_LOCAL"
	DomesticPackageDescriptionMailClassUSPSCONNECTMAIL          DomesticPackageDescriptionMailClass = "USPS_CONNECT_MAIL"
	DomesticPackageDescriptionMailClassUSPSCONNECTREGIONAL      DomesticPackageDescriptionMailClass = "USPS_CONNECT_REGIONAL"
	DomesticPackageDescriptionMailClassUSPSGROUNDADVANTAGE      DomesticPackageDescriptionMailClass = "USPS_GROUND_ADVANTAGE"
)

Defines values for DomesticPackageDescriptionMailClass.

type DomesticPackageDescriptionPackageOptionsAncillaryServiceEndorsements

type DomesticPackageDescriptionPackageOptionsAncillaryServiceEndorsements string

DomesticPackageDescriptionPackageOptionsAncillaryServiceEndorsements Endorsements allow the sender to obtain the addressee's new (forwarding) address (provided the appropriate endorsement is used and if the addressee filed a Change-of-Address Order with the Postal Service) or the reason for non-delivery. For more information see [PostalPro](https://postalpro.usps.com/address-quality/ancillary-service-endorsements).

Note:

  • Ancillary Service Endorsements are currently not supported when 'holdForPickup' is set to 'true'.
  • 'CHANGE_SERVICE_REQUESTED' with a mail class value of 'PRIORITY_MAIL' currently only supports a contentType of 'PERISHABLE'.
  • 'CHANGE_SERVICE_REQUESTED' cannot be requested with a 'contentType' of 'HAZMAT' or any hazmat shipments.
  • 'CHANGE_SERVICE_REQUESTED' with mail classes 'PARCEL_SELECT', 'USPS_GROUND_ADVANTAGE', and 'PRIORITY_MAIL' can only be used with extraServices '920' and '921'.
  • Ancillary Service Endorsements are currently only supported with mail class values 'PARCEL_SELECT', 'USPS_GROUND_ADVANTAGE', 'PRIORITY_MAIL', and 'PRIORITY_MAIL_EXPRESS'.
  • 'ELECTRONIC_SERVICE_REQUESTED' with a mail class value of 'PARCEL_SELECT' cannot be requested with a 'contentType' of 'HAZMAT' or any hazmat shipments.
const (
	DomesticPackageDescriptionPackageOptionsAncillaryServiceEndorsementsADDRESSSERVICEREQUESTED    DomesticPackageDescriptionPackageOptionsAncillaryServiceEndorsements = "ADDRESS_SERVICE_REQUESTED"
	DomesticPackageDescriptionPackageOptionsAncillaryServiceEndorsementsCHANGESERVICEREQUESTED     DomesticPackageDescriptionPackageOptionsAncillaryServiceEndorsements = "CHANGE_SERVICE_REQUESTED"
	DomesticPackageDescriptionPackageOptionsAncillaryServiceEndorsementsELECTRONICSERVICEREQUESTED DomesticPackageDescriptionPackageOptionsAncillaryServiceEndorsements = "ELECTRONIC_SERVICE_REQUESTED"
	DomesticPackageDescriptionPackageOptionsAncillaryServiceEndorsementsFORWARDINGSERVICEREQUESTED DomesticPackageDescriptionPackageOptionsAncillaryServiceEndorsements = "FORWARDING_SERVICE_REQUESTED"
	DomesticPackageDescriptionPackageOptionsAncillaryServiceEndorsementsRETURNSERVICEREQUESTED     DomesticPackageDescriptionPackageOptionsAncillaryServiceEndorsements = "RETURN_SERVICE_REQUESTED"
	DomesticPackageDescriptionPackageOptionsAncillaryServiceEndorsementsTEMPRETURNSERVICEREQUESTED DomesticPackageDescriptionPackageOptionsAncillaryServiceEndorsements = "TEMP_RETURN_SERVICE_REQUESTED"
)

Defines values for DomesticPackageDescriptionPackageOptionsAncillaryServiceEndorsements.

type DomesticPackageDescriptionPackageOptionsContentType

type DomesticPackageDescriptionPackageOptionsContentType string

DomesticPackageDescriptionPackageOptionsContentType The type of contents in the package.

Note: * `CREMATED_REMAINS` is currently only eligible for the `PRIORITY_MAIL_EXPRESS` mail class and is not eligible for Hold for Pickup shipments. Please refer to [Publication 139](https://about.usps.com/publications/pub139/welcome.htm) for guidelines on how to package and ship `CREMATED_REMAINS`. * `DAY_OLD_POULTRY` is currently only eligible with mail class values of `USPS_GROUND_ADVANTAGE`, `PRIORITY_MAIL` and `PRIORITY_MAIL_EXPRESS`. * Shipments that contain Live Animals or Perishables will incur a Live Animal and Perishables Handling Fee per mail piece. Content types `HAZMAT`, `CREMATED_REMAINS`, and `MEDICAL_SUPPLIES` do not apply and will not incur a fee. For `DAY_OLD_POULTRY` shipments only, an additional Live Animal Transport Fee per pound is applied. For more information, please visit [Live Animals Transportation Fee FAQ](https://faq.usps.com/s/article/Live-Animal-Transportation-Fee#:~:text=The%20Live%20Animal%20Transportation%20fee%20is%20charged%20%240.20%20per%20pound,prices%20to%20Zones%205%2D9) * `HAZMAT` domestic labels with destination addresses to APO/FPO/DPO and PTFAS (except Puerto Rico) will not contain any Hazmat markings/indicators, including service type codes in the IMpb. When users indicate a shipment contains hazmat materials in the API request (via content type and/or extra services), that information will still be captured and sent in the shipping services file. For more information, please review the [USPS APIs release notes](https://postalpro.usps.gov/usps-apis-releases) * For guidelines on shipping Perishable and Hazardous Material, please refer to [Publication 52](https://pe.usps.com/text/pub52/welcome.htm). * For ZIP codes with restrictions:

  • Please refer to the most recent [Postal Bulletin](https://about.usps.com/resources/postal-bulletin.htm) ZIP restriction table for more information. You can find this data under `Pull-Out information` -> `Other Information` -> `Overseas Military/Diplomatic Mail`.
  • When restriction `M` applies, then `BEES`, `DAY_OLD_POULTRY`, `ADULT_BIRDS`, `OTHER_LIVES`, `FRUITS`, `VEGETABLES`, and `LIVE_PLANTS` are not allowed.
  • When restriction `X` applies, then `CREMATED_REMAINS` are not allowed.
const (
	DomesticPackageDescriptionPackageOptionsContentTypeADULTBIRDS      DomesticPackageDescriptionPackageOptionsContentType = "ADULT_BIRDS"
	DomesticPackageDescriptionPackageOptionsContentTypeBEES            DomesticPackageDescriptionPackageOptionsContentType = "BEES"
	DomesticPackageDescriptionPackageOptionsContentTypeCREMATEDREMAINS DomesticPackageDescriptionPackageOptionsContentType = "CREMATED_REMAINS"
	DomesticPackageDescriptionPackageOptionsContentTypeDAYOLDPOULTRY   DomesticPackageDescriptionPackageOptionsContentType = "DAY_OLD_POULTRY"
	DomesticPackageDescriptionPackageOptionsContentTypeFRUITS          DomesticPackageDescriptionPackageOptionsContentType = "FRUITS"
	DomesticPackageDescriptionPackageOptionsContentTypeHAZMAT          DomesticPackageDescriptionPackageOptionsContentType = "HAZMAT"
	DomesticPackageDescriptionPackageOptionsContentTypeLIVEPLANTS      DomesticPackageDescriptionPackageOptionsContentType = "LIVE_PLANTS"
	DomesticPackageDescriptionPackageOptionsContentTypeMEDICALSUPPLIES DomesticPackageDescriptionPackageOptionsContentType = "MEDICAL_SUPPLIES"
	DomesticPackageDescriptionPackageOptionsContentTypeOTHERLIVES      DomesticPackageDescriptionPackageOptionsContentType = "OTHER_LIVES"
	DomesticPackageDescriptionPackageOptionsContentTypePERISHABLE      DomesticPackageDescriptionPackageOptionsContentType = "PERISHABLE"
	DomesticPackageDescriptionPackageOptionsContentTypePHARMACEUTICALS DomesticPackageDescriptionPackageOptionsContentType = "PHARMACEUTICALS"
	DomesticPackageDescriptionPackageOptionsContentTypeVEGETABLES      DomesticPackageDescriptionPackageOptionsContentType = "VEGETABLES"
)

Defines values for DomesticPackageDescriptionPackageOptionsContentType.

type DomesticPackageDescriptionPackageOptionsNonDeliveryOption

type DomesticPackageDescriptionPackageOptionsNonDeliveryOption string

DomesticPackageDescriptionPackageOptionsNonDeliveryOption Requested action in the case a package is undeliverable:

  • `RETURN` for package to be returned to `fromAddress`.
  • `REDIRECT` to return package to address specified in the `redirectAddress`.
  • `ABANDON` to dispose of undeliverable package

Note:

  • `REDIRECT` and `ABANDON` will not impact the domestic package endpoint. Please use ancillary service endorsements instead.
  • An address must be provided in `redirectAddress` when a value of `REDIRECT` is provided.
const (
	DomesticPackageDescriptionPackageOptionsNonDeliveryOptionABANDON  DomesticPackageDescriptionPackageOptionsNonDeliveryOption = "ABANDON"
	DomesticPackageDescriptionPackageOptionsNonDeliveryOptionREDIRECT DomesticPackageDescriptionPackageOptionsNonDeliveryOption = "REDIRECT"
	DomesticPackageDescriptionPackageOptionsNonDeliveryOptionRETURN   DomesticPackageDescriptionPackageOptionsNonDeliveryOption = "RETURN"
)

Defines values for DomesticPackageDescriptionPackageOptionsNonDeliveryOption.

type DomesticPackageDescriptionProcessingCategory

type DomesticPackageDescriptionProcessingCategory string

DomesticPackageDescriptionProcessingCategory Value designates if shipment is `MACHINABLE`, `NONSTANDARD`, `LETTERS`, or `FLATS`.

Note: * When requesting the mail class `USPS_CONNECT_MAIL`, users are required to use a processing category of `FLATS`. * The processing category `LETTERS` is only valid for mail classes `PRIORITY_MAIL` and `PRIORITY_MAIL_EXPRESS` for outbound shipments. * The processing category `FLATS` is not valid for mail class `USPS_GROUND_ADVANTAGE`. * `IRREGULAR` is deprecated and will convert to `NONSTANDARD` as of 01/19/2025. * `NON_MACHINABLE` is deprecated and will convert to `NONSTANDARD` as of 01/19/2025.

const (
	DomesticPackageDescriptionProcessingCategoryFLATS         DomesticPackageDescriptionProcessingCategory = "FLATS"
	DomesticPackageDescriptionProcessingCategoryIRREGULAR     DomesticPackageDescriptionProcessingCategory = "IRREGULAR"
	DomesticPackageDescriptionProcessingCategoryLETTERS       DomesticPackageDescriptionProcessingCategory = "LETTERS"
	DomesticPackageDescriptionProcessingCategoryMACHINABLE    DomesticPackageDescriptionProcessingCategory = "MACHINABLE"
	DomesticPackageDescriptionProcessingCategoryNONMACHINABLE DomesticPackageDescriptionProcessingCategory = "NON_MACHINABLE"
	DomesticPackageDescriptionProcessingCategoryNONSTANDARD   DomesticPackageDescriptionProcessingCategory = "NONSTANDARD"
)

Defines values for DomesticPackageDescriptionProcessingCategory.

type DomesticPackageDescriptionRateIndicator

type DomesticPackageDescriptionRateIndicator string

DomesticPackageDescriptionRateIndicator Use to specify USPS&#174; containers/packaging or container attributes that may affect postage.

Note:

  • Effective 07/12/2026: Rate indicators `Q6`, `Q7`, `Q8`, `Q9`, and `Q0` are no longer supported. The dimensions for Cubic Soft Pack tiers `P5`, `P6`, `P7`, `P8`, and `P9` will be updated to include the dimensions for Tiers 6-10. For updated tiers and more information, please view the [Postal Bulletin](https://about.usps.com/postal-bulletin/2026/pb22705/html/updt_001.htm).

Rate indicator list:

  • 3D - 3-Digit
  • 3N - 3-Digit Dimensional Rectangular
  • 3R - 3-Digit Dimensional Nonrectangular
  • 5D - 5-Digit
  • BA - Basic
  • BB - Mixed NDC
  • CP - Cubic Parcel
  • CM - USPS Connect&#174; Local Mail
  • DC - NDC
  • DE - SCF
  • DF - 5-Digit
  • DN - Dimensional Nonrectangular
  • DR - Dimensional Rectangular
  • E4 - Priority Mail Express Flat Rate Envelope - Post Office To Addressee
  • E6 - Priority Mail Express Legal Flat Rate Envelope
  • FA - Legal Flat Rate Envelope
  • FB - Medium Flat Rate Box/Large Flat Rate Bag
  • FE - Flat Rate Envelope
  • FP - Padded Flat Rate Envelope
  • FS - Small Flat Rate Box
  • LC - USPS Connect&#174; Local Single Piece
  • LF - USPS Connect&#174; Local Flat Rate Box
  • LL - USPS Connect&#174; Local Large Flat Rate Bag
  • LO - USPS Connect&#174; Local Oversized
  • LS - USPS Connect&#174; Local Small Flat Rate Bag
  • NN - Non-Presorted Nonprofit
  • NP - Non-Presorted
  • OS - Oversized
  • PN - Presorted Nonprofit
  • P5 - Cubic Soft Pack Tier 1
  • P6 - Cubic Soft Pack Tier 2
  • P7 - Cubic Soft Pack Tier 3
  • P8 - Cubic Soft Pack Tier 4
  • P9 - Cubic Soft Pack Tier 5
  • Q6 - Cubic Soft Pack Tier 6
  • Q7 - Cubic Soft Pack Tier 7
  • Q8 - Cubic Soft Pack Tier 8
  • Q9 - Cubic Soft Pack Tier 9
  • Q0 - Cubic Soft Pack Tier 10
  • PA - Priority Mail Express Single Piece
  • PL - Large Flat Rate Box
  • PM - Large Flat Rate Box APO/FPO/DPO
  • PR - Presorted
  • SN - SCF Dimensional Nonrectangular
  • SP - Single Piece
  • SR - SCF Dimensional Rectangular
const (
	DomesticPackageDescriptionRateIndicatorBA  DomesticPackageDescriptionRateIndicator = "BA"
	DomesticPackageDescriptionRateIndicatorBB  DomesticPackageDescriptionRateIndicator = "BB"
	DomesticPackageDescriptionRateIndicatorCM  DomesticPackageDescriptionRateIndicator = "CM"
	DomesticPackageDescriptionRateIndicatorCP  DomesticPackageDescriptionRateIndicator = "CP"
	DomesticPackageDescriptionRateIndicatorDC  DomesticPackageDescriptionRateIndicator = "DC"
	DomesticPackageDescriptionRateIndicatorDE  DomesticPackageDescriptionRateIndicator = "DE"
	DomesticPackageDescriptionRateIndicatorDF  DomesticPackageDescriptionRateIndicator = "DF"
	DomesticPackageDescriptionRateIndicatorDN  DomesticPackageDescriptionRateIndicator = "DN"
	DomesticPackageDescriptionRateIndicatorDR  DomesticPackageDescriptionRateIndicator = "DR"
	DomesticPackageDescriptionRateIndicatorE4  DomesticPackageDescriptionRateIndicator = "E4"
	DomesticPackageDescriptionRateIndicatorE6  DomesticPackageDescriptionRateIndicator = "E6"
	DomesticPackageDescriptionRateIndicatorFA  DomesticPackageDescriptionRateIndicator = "FA"
	DomesticPackageDescriptionRateIndicatorFB  DomesticPackageDescriptionRateIndicator = "FB"
	DomesticPackageDescriptionRateIndicatorFE  DomesticPackageDescriptionRateIndicator = "FE"
	DomesticPackageDescriptionRateIndicatorFP  DomesticPackageDescriptionRateIndicator = "FP"
	DomesticPackageDescriptionRateIndicatorFS  DomesticPackageDescriptionRateIndicator = "FS"
	DomesticPackageDescriptionRateIndicatorLC  DomesticPackageDescriptionRateIndicator = "LC"
	DomesticPackageDescriptionRateIndicatorLF  DomesticPackageDescriptionRateIndicator = "LF"
	DomesticPackageDescriptionRateIndicatorLL  DomesticPackageDescriptionRateIndicator = "LL"
	DomesticPackageDescriptionRateIndicatorLO  DomesticPackageDescriptionRateIndicator = "LO"
	DomesticPackageDescriptionRateIndicatorLS  DomesticPackageDescriptionRateIndicator = "LS"
	DomesticPackageDescriptionRateIndicatorN3D DomesticPackageDescriptionRateIndicator = "3D"
	DomesticPackageDescriptionRateIndicatorN3N DomesticPackageDescriptionRateIndicator = "3N"
	DomesticPackageDescriptionRateIndicatorN3R DomesticPackageDescriptionRateIndicator = "3R"
	DomesticPackageDescriptionRateIndicatorN5D DomesticPackageDescriptionRateIndicator = "5D"
	DomesticPackageDescriptionRateIndicatorNN  DomesticPackageDescriptionRateIndicator = "NN"
	DomesticPackageDescriptionRateIndicatorNP  DomesticPackageDescriptionRateIndicator = "NP"
	DomesticPackageDescriptionRateIndicatorOS  DomesticPackageDescriptionRateIndicator = "OS"
	DomesticPackageDescriptionRateIndicatorP5  DomesticPackageDescriptionRateIndicator = "P5"
	DomesticPackageDescriptionRateIndicatorP6  DomesticPackageDescriptionRateIndicator = "P6"
	DomesticPackageDescriptionRateIndicatorP7  DomesticPackageDescriptionRateIndicator = "P7"
	DomesticPackageDescriptionRateIndicatorP8  DomesticPackageDescriptionRateIndicator = "P8"
	DomesticPackageDescriptionRateIndicatorP9  DomesticPackageDescriptionRateIndicator = "P9"
	DomesticPackageDescriptionRateIndicatorPA  DomesticPackageDescriptionRateIndicator = "PA"
	DomesticPackageDescriptionRateIndicatorPL  DomesticPackageDescriptionRateIndicator = "PL"
	DomesticPackageDescriptionRateIndicatorPM  DomesticPackageDescriptionRateIndicator = "PM"
	DomesticPackageDescriptionRateIndicatorPN  DomesticPackageDescriptionRateIndicator = "PN"
	DomesticPackageDescriptionRateIndicatorPR  DomesticPackageDescriptionRateIndicator = "PR"
	DomesticPackageDescriptionRateIndicatorQ0  DomesticPackageDescriptionRateIndicator = "Q0"
	DomesticPackageDescriptionRateIndicatorQ6  DomesticPackageDescriptionRateIndicator = "Q6"
	DomesticPackageDescriptionRateIndicatorQ7  DomesticPackageDescriptionRateIndicator = "Q7"
	DomesticPackageDescriptionRateIndicatorQ8  DomesticPackageDescriptionRateIndicator = "Q8"
	DomesticPackageDescriptionRateIndicatorQ9  DomesticPackageDescriptionRateIndicator = "Q9"
	DomesticPackageDescriptionRateIndicatorSN  DomesticPackageDescriptionRateIndicator = "SN"
	DomesticPackageDescriptionRateIndicatorSP  DomesticPackageDescriptionRateIndicator = "SP"
	DomesticPackageDescriptionRateIndicatorSR  DomesticPackageDescriptionRateIndicator = "SR"
)

Defines values for DomesticPackageDescriptionRateIndicator.

type DomesticPackageDescriptionShipperVisibilityMethod

type DomesticPackageDescriptionShipperVisibilityMethod string

DomesticPackageDescriptionShipperVisibilityMethod When generating labels for a third party shipper the label provider must capture and provide contact details of the individual or entity to whom they provide the label. There are two methods for reporting shipper information to USPS:

1. The label provider creates a unique USPS Mailer ID (MID) using the name, validated address, phone, and email contact information of each shipper. When using this method the Mailer ID should be submitted in the MID field in the LABEL_OWNER role when generating the payment authorization token and this field should be populated with 'MID_INFORMATION'

2. An alternative method allows for the label provider to assign a unique alphanumeric value known as a platformUserId to each shipper and to report the platformUserId together with the required shipper contact details. When using this method the shipper contact details are required in the `senderAddress` object (including `streetAddress`, `city`, `state`, `ZIPCode`, `phone`, `email`, `platformUserId` & `firstName`/`lastName` or `firm`) and this field should be populated with 'SENDER_INFORMATION'.

const (
	DomesticPackageDescriptionShipperVisibilityMethodMIDINFORMATION    DomesticPackageDescriptionShipperVisibilityMethod = "MID_INFORMATION"
	DomesticPackageDescriptionShipperVisibilityMethodSENDERINFORMATION DomesticPackageDescriptionShipperVisibilityMethod = "SENDER_INFORMATION"
)

Defines values for DomesticPackageDescriptionShipperVisibilityMethod.

type DomesticPackageDescriptionWeightUOM

type DomesticPackageDescriptionWeightUOM string

DomesticPackageDescriptionWeightUOM Weight Unit of Measurement

  • lb - Pounds
const (
	DomesticPackageDescriptionWeightUOMLb DomesticPackageDescriptionWeightUOM = "lb"
)

Defines values for DomesticPackageDescriptionWeightUOM.

type DomesticPackageDescriptionWithoutRateIndicator

type DomesticPackageDescriptionWithoutRateIndicator struct {
	// CarrierRelease Indicates whether recipients authorize a carrier to leave a shipment if no one is available to receive it at the time of delivery. Priority Mail Express&#174; shipments or items requiring a signature at delivery are not eligible (e.g. Signature Confirmation, Insurance > $500).
	//
	// Note:
	//  * Carrier Release is currently not supported when `holdForPickup` is set to `true`.
	//  * Carrier Release is currently not supported with mail class values of `PRIORITY_MAIL`, `PRIORITY_MAIL_EXPRESS`, or `USPS_GROUND_ADVANTAGE`.
	//  * Carrier Release is currently not supported with `extraServices` `910`, `911`, `912`, `913`, `921`, `922`, `923`, `924`, `925`, `930`, `931`, `934`, `955`, or `981`.
	CarrierRelease *bool `json:"carrierRelease,omitempty"`

	// CustomerReference Used for shippers to print a value on a label and included in the Shipping Services File (SSF).
	//
	// Note:
	//  * Customer Reference #3-4 are only supported with label types `4X5LABEL`, `4X6LABEL`, and `6X4LABEL`.
	//  * Customer Reference #3-4 cannot be used with a customs form.
	//  * Customer Reference #3-4 will not be added to the SSF.
	//  * Customer Reference will not display with `imageInfo.brandingImageFormat` value of `RECTANGLE`.
	//  * When Customer Reference #4 is provided with a Destination Entry Facility, the Drop-Off Location will not be displayed on the label.
	CustomerReference *[]DomesticCustomerReference `json:"customerReference,omitempty"`

	// DestinationEntryFacilityAddress Address fields for US locations
	DestinationEntryFacilityAddress *DomesticAddress `json:"destinationEntryFacilityAddress,omitempty"`

	// DestinationEntryFacilityType Types of Facilities:
	// * `NONE` - Translate to Destination Rate Indicator N
	// * `DESTINATION_NETWORK_DISTRIBUTION_CENTER` - Translate to Destination Rate Indicator B
	// * `DESTINATION_SECTIONAL_CENTER_FACILITY` - Translate to Destination Rate Indicator S
	// * `DESTINATION_DELIVERY_UNIT` - Translate to Destination Rate Indicator D
	// * `DESTINATION_SERVICE_HUB` - Translate to Destination Rate Indicator H
	// * `DESTINATION_REGIONAL_PROCESSING_DISTRIBUTION_CENTER` - Translate to Destination Rate Indicator B
	//
	// Note:
	// * If any value other than `NONE` is selected, a destinationEntryFacilityAddress is required.
	// * The destinationEntryFacilityAddress must be a valid facility to drop your package
	// * The destination entry facility type must be set to `NONE` when there is a value provided for the 'inductionZipCode' field
	// * Effective 01/19/2025: `DESTINATION_DELIVERY_UNIT` is the only valid enumeration when using the 'USPS_CONNECT_MAIL' mail class
	// * Effective 01/18/2026: `DESTINATION_NETWORK_DISTRIBUTION_CENTER` with `PARCEL_SELECT` is no longer eligible.
	// * Effective 01/18/2026: (NSA Only) `DESTINATION_REGIONAL_PROCESSING_DISTRIBUTION_CENTER` with `PARCEL_SELECT` is available as an option.
	DestinationEntryFacilityType DomesticPackageDescriptionWithoutRateIndicatorDestinationEntryFacilityType `json:"destinationEntryFacilityType"`

	// DimensionsUOM Dimensions unit of measure
	// * in - Inches
	DimensionsUOM *DomesticPackageDescriptionWithoutRateIndicatorDimensionsUOM `json:"dimensionsUOM,omitempty"`

	// ExtraServices Extra Service Code requested.
	// * 365 - Global Direct Entry
	// * 415 - USPS Label Delivery
	// * 480 - Tracking Plus 6 Months
	// * 481 - Tracking Plus 1 Year
	// * 482 - Tracking Plus 3 Years
	// * 483 - Tracking Plus 5 Years
	// * 484 - Tracking Plus 7 Years
	// * 485 - Tracking Plus 10 Years
	// * 486 - Tracking Plus Signature 3 Years
	// * 487 - Tracking Plus Signature 5 Years
	// * 488 - Tracking Plus Signature 7 Years
	// * 489 - Tracking Plus Signature 10 Years
	// * 810 - HAZMAT Air Eligible Ethanol Package
	// * 811 - HAZMAT Class 1 - Toy Propellant/Safety Fuse Package
	// * 812 - HAZMAT Class 3 – Flammable Liquid Package
	// * 813 - HAZMAT Class 7 - Radioactive Materials Package
	// * 814 - HAZMAT Class 8 - Corrosive Materials Package
	// * 815 - HAZMAT Class 8 - Nonspillable Wet Battery Package
	// * 816 - HAZMAT Class 9 - Lithium Battery Marked - Ground Only Package
	// * 817 - HAZMAT Class 9 - Lithium Battery - Returns Package
	// * 818 - HAZMAT Class 9 - Lithium batteries, marked package
	// * 819 - HAZMAT Class 9 - Dry Ice Package
	// * 820 - HAZMAT Class 9 - Lithium batteries, unmarked package
	// * 821 - HAZMAT Class 9 - Magnetized Materials Package
	// * 822 - HAZMAT Division 4.1 – Flammable Solids or Safety Matches Package
	// * 823 - HAZMAT Division 5.1 - Oxidizers Package
	// * 824 - HAZMAT Division 5.2 - Organic Peroxides Package
	// * 825 - HAZMAT Division 6.1 – Toxic Materials Package
	// * 826 - HAZMAT Division 6.2 – Infectious Substances Package
	// * 827 - HAZMAT Excepted Quantity Provision Package
	// * 828 - HAZMAT Ground Only
	// * 829 - HAZMAT ID8000 Consumer Commodity Package
	// * 830 - HAZMAT Lighters Package
	// * 831 - HAZMAT LTD QTY Ground Package
	// * 832 - HAZMAT Small Quantity Provision Package
	// * 857 - Hazardous Material
	// * 910 - Certified Mail
	// * 911 - Certified Mail Restricted Delivery
	// * 912 - Certified Mail Adult Signature Required
	// * 913 - Certified Mail Adult Signature Restricted Delivery
	// * 920 - USPS Tracking
	// * 921 - Signature Confirmation
	// * 922 - Adult Signature Required 21 or Over
	// * 923 - Adult Signature Restricted Delivery 21 or Over
	// * 924 - Signature Confirmation Restricted Delivery
	// * 925 - Priority Mail Express Merchandise Insurance
	// * 930 - Insurance <= $500
	// * 931 - Insurance > $500
	// * 934 - Insurance Restricted Delivery
	// * 955 - Return Receipt
	// * 957 - Return Receipt Electronic
	// * 981 - Signature Requested (PRIORITY_MAIL_EXPRESS only)
	// * 986 - PO to Addressee (PRIORITY_MAIL_EXPRESS only)
	// * 991 - Sunday Delivery
	//
	// Note:
	// * When the extra service code "930" is provided in the request, if the item value is over $500, "930" will automatically be replaced with "931" - Insurance (Greater than $500).
	// * USPS Label Delivery (Print and Deliver, extra service code "415"): When requesting this service, no images will be returned in the API response. The label and receipt will be printed and mailed to the `fromAddress` provided. The mailed label will always include a receipt on the page. This service is not available at all locations.
	// * Some service codes require a combination with extra services such as "955" and "957". For all valid combinations, visit [https://postalpro.usps.com/IMPB_Service_Type_Codes](https://postalpro.usps.com/IMPB_Service_Type_Codes).
	ExtraServices *[]ExtraService `json:"extraServices,omitempty"`

	// Girth The girth of the container, in dimensionsUOM. If partial dimensions are provided, an error response will return. Length, Width, Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. In addition, Girth is required only for a non- rectangular package in addition to Length, Width, Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non- rectangular packages.
	Girth *float32 `json:"girth,omitempty"`

	// HasNonstandardCharacteristics Package is nonstandard. Nonstandard packages include cylindrical tubes and rolls, certain high-density items, cartons containing more than 24 ounces of liquids in one or more glass containers, cartons containing 1 gallon or more of liquid in metal or plastic containers, and items in [201.7.6.2](https://pe.usps.com/text/dmm300/201.htm#7.6.2).
	HasNonstandardCharacteristics *bool `json:"hasNonstandardCharacteristics,omitempty"`

	// Height The height of the container, in dimensionsUOM. If partial dimensions are provided, an error response will return. Length, Width, and Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. Girth is required only for a non-rectangular package in addition to Length, Width, and Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non-rectangular packages.
	Height float32 `json:"height"`

	// InductionZIPCode The 5-Digit ZIP Code representing the location where the package is being inducted (i.e. dropped off) into the mailstream.  When provided, this ZIP Code will be used for pricing instead of `fromAddress.ZIPCode`.
	InductionZIPCode *InductionZIPCode `json:"inductionZIPCode,omitempty"`

	// Length The length of the container, in dimensionsUOM. If partial dimensions are provided, an error response will return. Length, Width, and Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. Girth is required only for a non-rectangular package in addition to Length, Width, and Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non-rectangular packages.
	Length float32 `json:"length"`

	// LogisticsManagerMID This is the mailer ID associated with the logistics manager for this label This provides an additional copy of the scan extract file to the MID's outbound folder.
	LogisticsManagerMID *string `json:"logisticsManagerMID,omitempty"`

	// MailClass The mail service requested.
	//
	// Note:
	// - `PARCEL_SELECT` with a `destinationEntryFacilityType` of `NONE` will convert to `USPS_GROUND_ADVANTAGE`.
	// - `PARCEL_SELECT_LIGHTWEIGHT` is deprecated and will convert to `PARCEL_SELECT`.
	// - `FIRST-CLASS_PACKAGE_SERVICE` is deprecated and will convert to `USPS_GROUND_ADVANTAGE`.
	// - Certain mail classes, such as `MEDIA_MAIL`, `BOUND_PRINTED_MATTER`, and `LIBRARY_MAIL`, have eligibility rules on what can be mailed using that service.  For more details on these mail classes, please visit [What are Package Services?](https://faq.usps.com/s/article/What-are-Package-Services).
	// - The Heavy Printed Matter product is supported with `MARKETING_MAIL_PARCELS`. To create Heavy Printed Matter labels, the `rateIndicator` should be set to `PR` or `NP` for Presorted or Nonpresorted USPS Marketing Mail Parcels Heavy Printed Matter or to `PN` or `NN` for Nonprofit Presorted or Nonpresorted USPS Marketing Mail Parcels Heavy Printed Matter respectively.
	MailClass DomesticPackageDescriptionWithoutRateIndicatorMailClass `json:"mailClass"`

	// MailOwnerMID This is the mailer ID associated with the mail owner for this label This provides an additional copy of the scan extract file to the MID's outbound folder.
	MailOwnerMID *string `json:"mailOwnerMID,omitempty"`

	// MailingDate The local date on which the package will be mailed. If the time is not provided, it will be defaulted to 10:00 p.m. local time.  Local time will be based on the `destinationEntryFacilityAddress.ZIPCode` or `inductionZIPCode` when provided, otherwise `fromAddress.ZIPCode` will be used as the origin ZIP Code.
	MailingDate string `json:"mailingDate"`

	// Nonprofit Used to specify if the shipment is a nonprofit mailing.  Shippers must be authorized for nonprofit mailings to qualify for nonprofit pricing.  All nonprofit mailings must not be used for product fulfillment.  For more details on Nonprofit Mailers, visit [Nonprofit Mailers](https://pe.usps.com/BusinessMail101?ViewName=NonprofitPrices).
	//
	// When `nonprofit` is `true` and `mailClass` is `MARKETING_MAIL_PARCELS`, nonprofit rates will be applied.  When using `rateIndicator` values, the `rateIndicator` must also be `NN` or `PN`.
	//
	// When `nonprofit` is `false` and `mailClass` is `MARKETING_MAIL_PARCELS`, standard rates will be applied.
	//
	// `nonprofit` is not supported for any other mail class.
	Nonprofit      *Nonprofit                                                     `json:"nonprofit,omitempty"`
	PackageOptions *DomesticPackageDescriptionWithoutRateIndicator_PackageOptions `json:"packageOptions,omitempty"`

	// PackagingType USPS packaging or container attributes that may affect postage. If the packaging is customer provided, use `VARIABLE`.
	PackagingType DomesticPackageDescriptionWithoutRateIndicatorPackagingType `json:"packagingType"`

	// PhysicalSignatureRequired Indicates the method for the signature that will be used when signing for the package.  Required when requesting signature `extraServices` including `910`, `911`, `912`, `913`, `921`, `922`, `923`, `924`, `925`, `931`, `934`, `955`, and `981`.  Additionally required when requesting `extraServices` code `930` with a `packageValue` greater than $500.
	//
	// When `physicalSignatureRequired` is `false`, a USPS Electronic Signature Online (USPS eSOL) may be used to sign for the item.  For more information on USPS eSOL, please visit the [USPS eSOL FAQ](https://faq.usps.com/s/article/USPS-Electronic-Signature-Online).
	//
	// When `physicalSignatureRequired` is `true`, the recipient will be required to physically sign for the item.  A USPS eSOL on record will not be accepted as a valid signature for the item.
	//
	// Notes:
	//  * Regardless of the boolean, the printed label will still display "SIGNATURE REQUIRED" if a signature service is included with the label.
	//  * `carrierRelease` is not eligible to be used with `physicalSignatureRequired`.
	PhysicalSignatureRequired *bool `json:"physicalSignatureRequired,omitempty"`

	// ProcessingCategory Value designates if shipment is `MACHINABLE`, `NONSTANDARD`, `LETTERS`, or `FLATS`.
	//
	// Note:
	// * When requesting the mail class `USPS_CONNECT_MAIL`, users are required to use a processing category of `FLATS`.
	// * The processing category `LETTERS` is only valid for mail classes `PRIORITY_MAIL` and `PRIORITY_MAIL_EXPRESS` for outbound shipments.
	// * The processing category `FLATS` is not valid for mail class `USPS_GROUND_ADVANTAGE`.
	// * `IRREGULAR` is deprecated and will convert to `NONSTANDARD` as of 01/19/2025.
	// * `NON_MACHINABLE` is deprecated and will convert to `NONSTANDARD` as of 01/19/2025.
	ProcessingCategory DomesticPackageDescriptionWithoutRateIndicatorProcessingCategory `json:"processingCategory"`

	// SerialNumberFormat Used to specify the barcode construct used for the generated tracking number.  For details on barcode constructs, reference Appendix J in [Pub 199](https://postalpro.usps.com/pub199).
	//
	// `STANDARD` - Will generate a `C01`, `C03`, `C05`, or `C07` barcode construct, based on the Label Owner's `MID` in the Payment Authorization Token.
	//
	// `EXTENDED` - Will generate a `C02` or `C06` barcode construct, based on the Label Owner's `MID` in the Payment Authorization Token.
	SerialNumberFormat *SerialNumberFormat `json:"serialNumberFormat,omitempty"`

	// Shape The shape of the package
	Shape DomesticPackageDescriptionWithoutRateIndicatorShape `json:"shape"`

	// ShipperVisibilityMethod When generating labels for a third party shipper the label provider must capture and provide contact details of the individual or entity to whom they provide the label. There are two methods for reporting shipper information to USPS:
	//
	// 1. The label provider creates a unique USPS Mailer ID (MID) using the name, validated address, phone, and email contact information of each shipper. When using this method the Mailer ID should be submitted in the MID field in the LABEL_OWNER role when generating the payment authorization token and this field should be populated with 'MID_INFORMATION'
	//
	// 2. An alternative method allows for the label provider to assign a unique alphanumeric value known as a platformUserId to each shipper and to report the platformUserId together with the required shipper contact details. When using this method the shipper contact details are required in the `senderAddress` object (including `streetAddress`, `city`, `state`, `ZIPCode`, `phone`, `email`, `platformUserId` & `firstName`/`lastName` or `firm`) and this field should be populated with 'SENDER_INFORMATION'.
	ShipperVisibilityMethod *DomesticPackageDescriptionWithoutRateIndicatorShipperVisibilityMethod `json:"shipperVisibilityMethod,omitempty"`

	// Weight The package weight, in weightUOM (Unit Of Measure). Items must weigh 70 pounds (1120 ounces) or less.
	Weight float32 `json:"weight"`

	// WeightUOM Weight Unit of Measurement
	//   * lb - Pounds
	WeightUOM *DomesticPackageDescriptionWithoutRateIndicatorWeightUOM `json:"weightUOM,omitempty"`

	// Width The width of the container, in dimensionsUOM. If partial dimensions are provided, an error response will return. Length, Width, and Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. Girth is required only for a non-rectangular package in addition to Length, Width, and Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non- rectangular packages.
	Width                float32                `json:"width"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

DomesticPackageDescriptionWithoutRateIndicator defines model for DomesticPackageDescriptionWithoutRateIndicator.

func (DomesticPackageDescriptionWithoutRateIndicator) Get

func (a DomesticPackageDescriptionWithoutRateIndicator) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for DomesticPackageDescriptionWithoutRateIndicator. Returns the specified element and whether it was found

func (DomesticPackageDescriptionWithoutRateIndicator) MarshalJSON

Override default JSON handling for DomesticPackageDescriptionWithoutRateIndicator to handle AdditionalProperties

func (*DomesticPackageDescriptionWithoutRateIndicator) Set

func (a *DomesticPackageDescriptionWithoutRateIndicator) Set(fieldName string, value interface{})

Setter for additional properties for DomesticPackageDescriptionWithoutRateIndicator

func (*DomesticPackageDescriptionWithoutRateIndicator) UnmarshalJSON

Override default JSON handling for DomesticPackageDescriptionWithoutRateIndicator to handle AdditionalProperties

type DomesticPackageDescriptionWithoutRateIndicatorDestinationEntryFacilityType

type DomesticPackageDescriptionWithoutRateIndicatorDestinationEntryFacilityType string

DomesticPackageDescriptionWithoutRateIndicatorDestinationEntryFacilityType Types of Facilities: * `NONE` - Translate to Destination Rate Indicator N * `DESTINATION_NETWORK_DISTRIBUTION_CENTER` - Translate to Destination Rate Indicator B * `DESTINATION_SECTIONAL_CENTER_FACILITY` - Translate to Destination Rate Indicator S * `DESTINATION_DELIVERY_UNIT` - Translate to Destination Rate Indicator D * `DESTINATION_SERVICE_HUB` - Translate to Destination Rate Indicator H * `DESTINATION_REGIONAL_PROCESSING_DISTRIBUTION_CENTER` - Translate to Destination Rate Indicator B

Note: * If any value other than `NONE` is selected, a destinationEntryFacilityAddress is required. * The destinationEntryFacilityAddress must be a valid facility to drop your package * The destination entry facility type must be set to `NONE` when there is a value provided for the 'inductionZipCode' field * Effective 01/19/2025: `DESTINATION_DELIVERY_UNIT` is the only valid enumeration when using the 'USPS_CONNECT_MAIL' mail class * Effective 01/18/2026: `DESTINATION_NETWORK_DISTRIBUTION_CENTER` with `PARCEL_SELECT` is no longer eligible. * Effective 01/18/2026: (NSA Only) `DESTINATION_REGIONAL_PROCESSING_DISTRIBUTION_CENTER` with `PARCEL_SELECT` is available as an option.

const (
	DomesticPackageDescriptionWithoutRateIndicatorDestinationEntryFacilityTypeDESTINATIONDELIVERYUNIT                         DomesticPackageDescriptionWithoutRateIndicatorDestinationEntryFacilityType = "DESTINATION_DELIVERY_UNIT"
	DomesticPackageDescriptionWithoutRateIndicatorDestinationEntryFacilityTypeDESTINATIONNETWORKDISTRIBUTIONCENTER            DomesticPackageDescriptionWithoutRateIndicatorDestinationEntryFacilityType = "DESTINATION_NETWORK_DISTRIBUTION_CENTER"
	DomesticPackageDescriptionWithoutRateIndicatorDestinationEntryFacilityTypeDESTINATIONREGIONALPROCESSINGDISTRIBUTIONCENTER DomesticPackageDescriptionWithoutRateIndicatorDestinationEntryFacilityType = "DESTINATION_REGIONAL_PROCESSING_DISTRIBUTION_CENTER"
	DomesticPackageDescriptionWithoutRateIndicatorDestinationEntryFacilityTypeDESTINATIONSECTIONALCENTERFACILITY              DomesticPackageDescriptionWithoutRateIndicatorDestinationEntryFacilityType = "DESTINATION_SECTIONAL_CENTER_FACILITY"
	DomesticPackageDescriptionWithoutRateIndicatorDestinationEntryFacilityTypeDESTINATIONSERVICEHUB                           DomesticPackageDescriptionWithoutRateIndicatorDestinationEntryFacilityType = "DESTINATION_SERVICE_HUB"
	DomesticPackageDescriptionWithoutRateIndicatorDestinationEntryFacilityTypeNONE                                            DomesticPackageDescriptionWithoutRateIndicatorDestinationEntryFacilityType = "NONE"
)

Defines values for DomesticPackageDescriptionWithoutRateIndicatorDestinationEntryFacilityType.

type DomesticPackageDescriptionWithoutRateIndicatorDimensionsUOM

type DomesticPackageDescriptionWithoutRateIndicatorDimensionsUOM string

DomesticPackageDescriptionWithoutRateIndicatorDimensionsUOM Dimensions unit of measure * in - Inches

const (
	DomesticPackageDescriptionWithoutRateIndicatorDimensionsUOMIn DomesticPackageDescriptionWithoutRateIndicatorDimensionsUOM = "in"
)

Defines values for DomesticPackageDescriptionWithoutRateIndicatorDimensionsUOM.

type DomesticPackageDescriptionWithoutRateIndicatorMailClass

type DomesticPackageDescriptionWithoutRateIndicatorMailClass string

DomesticPackageDescriptionWithoutRateIndicatorMailClass The mail service requested.

Note: - `PARCEL_SELECT` with a `destinationEntryFacilityType` of `NONE` will convert to `USPS_GROUND_ADVANTAGE`. - `PARCEL_SELECT_LIGHTWEIGHT` is deprecated and will convert to `PARCEL_SELECT`. - `FIRST-CLASS_PACKAGE_SERVICE` is deprecated and will convert to `USPS_GROUND_ADVANTAGE`. - Certain mail classes, such as `MEDIA_MAIL`, `BOUND_PRINTED_MATTER`, and `LIBRARY_MAIL`, have eligibility rules on what can be mailed using that service. For more details on these mail classes, please visit [What are Package Services?](https://faq.usps.com/s/article/What-are-Package-Services). - The Heavy Printed Matter product is supported with `MARKETING_MAIL_PARCELS`. To create Heavy Printed Matter labels, the `rateIndicator` should be set to `PR` or `NP` for Presorted or Nonpresorted USPS Marketing Mail Parcels Heavy Printed Matter or to `PN` or `NN` for Nonprofit Presorted or Nonpresorted USPS Marketing Mail Parcels Heavy Printed Matter respectively.

const (
	BOUNDPRINTEDMATTER       DomesticPackageDescriptionWithoutRateIndicatorMailClass = "BOUND_PRINTED_MATTER"
	FIRSTCLASSPACKAGESERVICE DomesticPackageDescriptionWithoutRateIndicatorMailClass = "FIRST-CLASS_PACKAGE_SERVICE"
	LIBRARYMAIL              DomesticPackageDescriptionWithoutRateIndicatorMailClass = "LIBRARY_MAIL"
	MARKETINGMAILPARCELS     DomesticPackageDescriptionWithoutRateIndicatorMailClass = "MARKETING_MAIL_PARCELS"
	MEDIAMAIL                DomesticPackageDescriptionWithoutRateIndicatorMailClass = "MEDIA_MAIL"
	PARCELSELECT             DomesticPackageDescriptionWithoutRateIndicatorMailClass = "PARCEL_SELECT"
	PARCELSELECTLIGHTWEIGHT  DomesticPackageDescriptionWithoutRateIndicatorMailClass = "PARCEL_SELECT_LIGHTWEIGHT"
	PRIORITYMAIL             DomesticPackageDescriptionWithoutRateIndicatorMailClass = "PRIORITY_MAIL"
	PRIORITYMAILEXPRESS      DomesticPackageDescriptionWithoutRateIndicatorMailClass = "PRIORITY_MAIL_EXPRESS"
	USPSCONNECTLOCAL         DomesticPackageDescriptionWithoutRateIndicatorMailClass = "USPS_CONNECT_LOCAL"
	USPSCONNECTMAIL          DomesticPackageDescriptionWithoutRateIndicatorMailClass = "USPS_CONNECT_MAIL"
	USPSCONNECTREGIONAL      DomesticPackageDescriptionWithoutRateIndicatorMailClass = "USPS_CONNECT_REGIONAL"
	USPSGROUNDADVANTAGE      DomesticPackageDescriptionWithoutRateIndicatorMailClass = "USPS_GROUND_ADVANTAGE"
)

Defines values for DomesticPackageDescriptionWithoutRateIndicatorMailClass.

type DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsAncillaryServiceEndorsements

type DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsAncillaryServiceEndorsements string

DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsAncillaryServiceEndorsements Endorsements allow the sender to obtain the addressee's new (forwarding) address (provided the appropriate endorsement is used and if the addressee filed a Change-of-Address Order with the Postal Service) or the reason for non-delivery. For more information see [PostalPro](https://postalpro.usps.com/address-quality/ancillary-service-endorsements).

Note:

  • Ancillary Service Endorsements are currently not supported when 'holdForPickup' is set to 'true'.
  • 'CHANGE_SERVICE_REQUESTED' with a mail class value of 'PRIORITY_MAIL' currently only supports a contentType of 'PERISHABLE'.
  • 'CHANGE_SERVICE_REQUESTED' cannot be requested with a 'contentType' of 'HAZMAT' or any hazmat shipments.
  • 'CHANGE_SERVICE_REQUESTED' with mail classes 'PARCEL_SELECT', 'USPS_GROUND_ADVANTAGE', and 'PRIORITY_MAIL' can only be used with extraServices '920' and '921'.
  • Ancillary Service Endorsements are currently only supported with mail class values 'PARCEL_SELECT', 'USPS_GROUND_ADVANTAGE', 'PRIORITY_MAIL', and 'PRIORITY_MAIL_EXPRESS'.
  • 'ELECTRONIC_SERVICE_REQUESTED' with a mail class value of 'PARCEL_SELECT' cannot be requested with a 'contentType' of 'HAZMAT' or any hazmat shipments.
const (
	DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsAncillaryServiceEndorsementsADDRESSSERVICEREQUESTED    DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsAncillaryServiceEndorsements = "ADDRESS_SERVICE_REQUESTED"
	DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsAncillaryServiceEndorsementsCHANGESERVICEREQUESTED     DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsAncillaryServiceEndorsements = "CHANGE_SERVICE_REQUESTED"
	DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsAncillaryServiceEndorsementsELECTRONICSERVICEREQUESTED DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsAncillaryServiceEndorsements = "ELECTRONIC_SERVICE_REQUESTED"
	DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsAncillaryServiceEndorsementsFORWARDINGSERVICEREQUESTED DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsAncillaryServiceEndorsements = "FORWARDING_SERVICE_REQUESTED"
	DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsAncillaryServiceEndorsementsRETURNSERVICEREQUESTED     DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsAncillaryServiceEndorsements = "RETURN_SERVICE_REQUESTED"
	DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsAncillaryServiceEndorsementsTEMPRETURNSERVICEREQUESTED DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsAncillaryServiceEndorsements = "TEMP_RETURN_SERVICE_REQUESTED"
)

Defines values for DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsAncillaryServiceEndorsements.

type DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsContentType

type DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsContentType string

DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsContentType The type of contents in the package.

Note: * `CREMATED_REMAINS` is currently only eligible for the `PRIORITY_MAIL_EXPRESS` mail class and is not eligible for Hold for Pickup shipments. Please refer to [Publication 139](https://about.usps.com/publications/pub139/welcome.htm) for guidelines on how to package and ship `CREMATED_REMAINS`. * `DAY_OLD_POULTRY` is currently only eligible with mail class values of `USPS_GROUND_ADVANTAGE`, `PRIORITY_MAIL` and `PRIORITY_MAIL_EXPRESS`. * Shipments that contain Live Animals or Perishables will incur a Live Animal and Perishables Handling Fee per mail piece. Content types `HAZMAT`, `CREMATED_REMAINS`, and `MEDICAL_SUPPLIES` do not apply and will not incur a fee. For `DAY_OLD_POULTRY` shipments only, an additional Live Animal Transport Fee per pound is applied. For more information, please visit [Live Animals Transportation Fee FAQ](https://faq.usps.com/s/article/Live-Animal-Transportation-Fee#:~:text=The%20Live%20Animal%20Transportation%20fee%20is%20charged%20%240.20%20per%20pound,prices%20to%20Zones%205%2D9) * `HAZMAT` domestic labels with destination addresses to APO/FPO/DPO and PTFAS (except Puerto Rico) will not contain any Hazmat markings/indicators, including service type codes in the IMpb. When users indicate a shipment contains hazmat materials in the API request (via content type and/or extra services), that information will still be captured and sent in the shipping services file. For more information, please review the [USPS APIs release notes](https://postalpro.usps.gov/usps-apis-releases) * For guidelines on shipping Perishable and Hazardous Material, please refer to [Publication 52](https://pe.usps.com/text/pub52/welcome.htm). * For ZIP codes with restrictions:

  • Please refer to the most recent [Postal Bulletin](https://about.usps.com/resources/postal-bulletin.htm) ZIP restriction table for more information. You can find this data under `Pull-Out information` -> `Other Information` -> `Overseas Military/Diplomatic Mail`.
  • When restriction `M` applies, then `BEES`, `DAY_OLD_POULTRY`, `ADULT_BIRDS`, `OTHER_LIVES`, `FRUITS`, `VEGETABLES`, and `LIVE_PLANTS` are not allowed.
  • When restriction `X` applies, then `CREMATED_REMAINS` are not allowed.
const (
	DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsContentTypeADULTBIRDS      DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsContentType = "ADULT_BIRDS"
	DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsContentTypeBEES            DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsContentType = "BEES"
	DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsContentTypeCREMATEDREMAINS DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsContentType = "CREMATED_REMAINS"
	DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsContentTypeDAYOLDPOULTRY   DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsContentType = "DAY_OLD_POULTRY"
	DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsContentTypeFRUITS          DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsContentType = "FRUITS"
	DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsContentTypeHAZMAT          DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsContentType = "HAZMAT"
	DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsContentTypeLIVEPLANTS      DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsContentType = "LIVE_PLANTS"
	DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsContentTypeMEDICALSUPPLIES DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsContentType = "MEDICAL_SUPPLIES"
	DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsContentTypeOTHERLIVES      DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsContentType = "OTHER_LIVES"
	DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsContentTypePERISHABLE      DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsContentType = "PERISHABLE"
	DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsContentTypePHARMACEUTICALS DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsContentType = "PHARMACEUTICALS"
	DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsContentTypeVEGETABLES      DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsContentType = "VEGETABLES"
)

Defines values for DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsContentType.

type DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsNonDeliveryOption

type DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsNonDeliveryOption string

DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsNonDeliveryOption Requested action in the case a package is undeliverable:

  • `RETURN` for package to be returned to `fromAddress`.
  • `REDIRECT` to return package to address specified in the `redirectAddress`.
  • `ABANDON` to dispose of undeliverable package

Note:

  • `REDIRECT` and `ABANDON` will not impact the domestic package endpoint. Please use ancillary service endorsements instead.
  • An address must be provided in `redirectAddress` when a value of `REDIRECT` is provided.
const (
	DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsNonDeliveryOptionABANDON  DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsNonDeliveryOption = "ABANDON"
	DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsNonDeliveryOptionREDIRECT DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsNonDeliveryOption = "REDIRECT"
	DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsNonDeliveryOptionRETURN   DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsNonDeliveryOption = "RETURN"
)

Defines values for DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsNonDeliveryOption.

type DomesticPackageDescriptionWithoutRateIndicatorPackagingType

type DomesticPackageDescriptionWithoutRateIndicatorPackagingType string

DomesticPackageDescriptionWithoutRateIndicatorPackagingType USPS packaging or container attributes that may affect postage. If the packaging is customer provided, use `VARIABLE`.

const (
	DomesticPackageDescriptionWithoutRateIndicatorPackagingTypeBASICPRESORT                 DomesticPackageDescriptionWithoutRateIndicatorPackagingType = "BASIC_PRESORT"
	DomesticPackageDescriptionWithoutRateIndicatorPackagingTypeCONNECTLOCALFLATRATEBOX      DomesticPackageDescriptionWithoutRateIndicatorPackagingType = "CONNECT_LOCAL_FLAT_RATE_BOX"
	DomesticPackageDescriptionWithoutRateIndicatorPackagingTypeCONNECTLOCALLARGEFLATRATEBAG DomesticPackageDescriptionWithoutRateIndicatorPackagingType = "CONNECT_LOCAL_LARGE_FLAT_RATE_BAG"
	DomesticPackageDescriptionWithoutRateIndicatorPackagingTypeCONNECTLOCALSMALLFLATRATEBAG DomesticPackageDescriptionWithoutRateIndicatorPackagingType = "CONNECT_LOCAL_SMALL_FLAT_RATE_BAG"
	DomesticPackageDescriptionWithoutRateIndicatorPackagingTypeCUBICPARCELS                 DomesticPackageDescriptionWithoutRateIndicatorPackagingType = "CUBIC_PARCELS"
	DomesticPackageDescriptionWithoutRateIndicatorPackagingTypeCUBICSOFTPACK                DomesticPackageDescriptionWithoutRateIndicatorPackagingType = "CUBIC_SOFT_PACK"
	DomesticPackageDescriptionWithoutRateIndicatorPackagingTypeFLATRATEENVELOPE             DomesticPackageDescriptionWithoutRateIndicatorPackagingType = "FLAT_RATE_ENVELOPE"
	DomesticPackageDescriptionWithoutRateIndicatorPackagingTypeLEGALFLATRATEENVELOPE        DomesticPackageDescriptionWithoutRateIndicatorPackagingType = "LEGAL_FLAT_RATE_ENVELOPE"
	DomesticPackageDescriptionWithoutRateIndicatorPackagingTypeLGFLATRATEBOX                DomesticPackageDescriptionWithoutRateIndicatorPackagingType = "LG_FLAT_RATE_BOX"
	DomesticPackageDescriptionWithoutRateIndicatorPackagingTypeMDFLATRATEBOX                DomesticPackageDescriptionWithoutRateIndicatorPackagingType = "MD_FLAT_RATE_BOX"
	DomesticPackageDescriptionWithoutRateIndicatorPackagingTypeN5DIGITPRESORT               DomesticPackageDescriptionWithoutRateIndicatorPackagingType = "5-DIGIT_PRESORT"
	DomesticPackageDescriptionWithoutRateIndicatorPackagingTypePADDEDFLATRATEENVELOPE       DomesticPackageDescriptionWithoutRateIndicatorPackagingType = "PADDED_FLAT_RATE_ENVELOPE"
	DomesticPackageDescriptionWithoutRateIndicatorPackagingTypeSMFLATRATEBOX                DomesticPackageDescriptionWithoutRateIndicatorPackagingType = "SM_FLAT_RATE_BOX"
	DomesticPackageDescriptionWithoutRateIndicatorPackagingTypeVARIABLE                     DomesticPackageDescriptionWithoutRateIndicatorPackagingType = "VARIABLE"
)

Defines values for DomesticPackageDescriptionWithoutRateIndicatorPackagingType.

type DomesticPackageDescriptionWithoutRateIndicatorProcessingCategory

type DomesticPackageDescriptionWithoutRateIndicatorProcessingCategory string

DomesticPackageDescriptionWithoutRateIndicatorProcessingCategory Value designates if shipment is `MACHINABLE`, `NONSTANDARD`, `LETTERS`, or `FLATS`.

Note: * When requesting the mail class `USPS_CONNECT_MAIL`, users are required to use a processing category of `FLATS`. * The processing category `LETTERS` is only valid for mail classes `PRIORITY_MAIL` and `PRIORITY_MAIL_EXPRESS` for outbound shipments. * The processing category `FLATS` is not valid for mail class `USPS_GROUND_ADVANTAGE`. * `IRREGULAR` is deprecated and will convert to `NONSTANDARD` as of 01/19/2025. * `NON_MACHINABLE` is deprecated and will convert to `NONSTANDARD` as of 01/19/2025.

const (
	DomesticPackageDescriptionWithoutRateIndicatorProcessingCategoryFLATS         DomesticPackageDescriptionWithoutRateIndicatorProcessingCategory = "FLATS"
	DomesticPackageDescriptionWithoutRateIndicatorProcessingCategoryIRREGULAR     DomesticPackageDescriptionWithoutRateIndicatorProcessingCategory = "IRREGULAR"
	DomesticPackageDescriptionWithoutRateIndicatorProcessingCategoryLETTERS       DomesticPackageDescriptionWithoutRateIndicatorProcessingCategory = "LETTERS"
	DomesticPackageDescriptionWithoutRateIndicatorProcessingCategoryMACHINABLE    DomesticPackageDescriptionWithoutRateIndicatorProcessingCategory = "MACHINABLE"
	DomesticPackageDescriptionWithoutRateIndicatorProcessingCategoryNONMACHINABLE DomesticPackageDescriptionWithoutRateIndicatorProcessingCategory = "NON_MACHINABLE"
	DomesticPackageDescriptionWithoutRateIndicatorProcessingCategoryNONSTANDARD   DomesticPackageDescriptionWithoutRateIndicatorProcessingCategory = "NONSTANDARD"
)

Defines values for DomesticPackageDescriptionWithoutRateIndicatorProcessingCategory.

type DomesticPackageDescriptionWithoutRateIndicatorShape

type DomesticPackageDescriptionWithoutRateIndicatorShape string

DomesticPackageDescriptionWithoutRateIndicatorShape The shape of the package

const (
	DomesticPackageDescriptionWithoutRateIndicatorShapeNONRECTANGULAR DomesticPackageDescriptionWithoutRateIndicatorShape = "NON_RECTANGULAR"
	DomesticPackageDescriptionWithoutRateIndicatorShapeRECTANGULAR    DomesticPackageDescriptionWithoutRateIndicatorShape = "RECTANGULAR"
)

Defines values for DomesticPackageDescriptionWithoutRateIndicatorShape.

type DomesticPackageDescriptionWithoutRateIndicatorShipperVisibilityMethod

type DomesticPackageDescriptionWithoutRateIndicatorShipperVisibilityMethod string

DomesticPackageDescriptionWithoutRateIndicatorShipperVisibilityMethod When generating labels for a third party shipper the label provider must capture and provide contact details of the individual or entity to whom they provide the label. There are two methods for reporting shipper information to USPS:

1. The label provider creates a unique USPS Mailer ID (MID) using the name, validated address, phone, and email contact information of each shipper. When using this method the Mailer ID should be submitted in the MID field in the LABEL_OWNER role when generating the payment authorization token and this field should be populated with 'MID_INFORMATION'

2. An alternative method allows for the label provider to assign a unique alphanumeric value known as a platformUserId to each shipper and to report the platformUserId together with the required shipper contact details. When using this method the shipper contact details are required in the `senderAddress` object (including `streetAddress`, `city`, `state`, `ZIPCode`, `phone`, `email`, `platformUserId` & `firstName`/`lastName` or `firm`) and this field should be populated with 'SENDER_INFORMATION'.

const (
	DomesticPackageDescriptionWithoutRateIndicatorShipperVisibilityMethodMIDINFORMATION    DomesticPackageDescriptionWithoutRateIndicatorShipperVisibilityMethod = "MID_INFORMATION"
	DomesticPackageDescriptionWithoutRateIndicatorShipperVisibilityMethodSENDERINFORMATION DomesticPackageDescriptionWithoutRateIndicatorShipperVisibilityMethod = "SENDER_INFORMATION"
)

Defines values for DomesticPackageDescriptionWithoutRateIndicatorShipperVisibilityMethod.

type DomesticPackageDescriptionWithoutRateIndicatorWeightUOM

type DomesticPackageDescriptionWithoutRateIndicatorWeightUOM string

DomesticPackageDescriptionWithoutRateIndicatorWeightUOM Weight Unit of Measurement

  • lb - Pounds
const (
	DomesticPackageDescriptionWithoutRateIndicatorWeightUOMLb DomesticPackageDescriptionWithoutRateIndicatorWeightUOM = "lb"
)

Defines values for DomesticPackageDescriptionWithoutRateIndicatorWeightUOM.

type DomesticPackageDescriptionWithoutRateIndicator_PackageOptions

type DomesticPackageDescriptionWithoutRateIndicator_PackageOptions struct {
	// AncillaryServiceEndorsements Endorsements allow the sender to obtain the addressee's new (forwarding) address
	// (provided the appropriate endorsement is used and if the addressee filed a
	// Change-of-Address Order with the Postal Service) or the reason for non-delivery.
	// For more information see [PostalPro](https://postalpro.usps.com/address-quality/ancillary-service-endorsements).
	//
	// Note:
	//   * Ancillary Service Endorsements are currently not supported when 'holdForPickup' is set to 'true'.
	//   * 'CHANGE_SERVICE_REQUESTED' with a mail class value of 'PRIORITY_MAIL' currently only supports a contentType of 'PERISHABLE'.
	//   * 'CHANGE_SERVICE_REQUESTED' cannot be requested with a 'contentType' of 'HAZMAT' or any hazmat shipments.
	//   * 'CHANGE_SERVICE_REQUESTED' with mail classes 'PARCEL_SELECT', 'USPS_GROUND_ADVANTAGE', and 'PRIORITY_MAIL' can only be used with extraServices '920' and '921'.
	//   * Ancillary Service Endorsements are currently only supported with mail class values 'PARCEL_SELECT', 'USPS_GROUND_ADVANTAGE', 'PRIORITY_MAIL', and 'PRIORITY_MAIL_EXPRESS'.
	//   * 'ELECTRONIC_SERVICE_REQUESTED' with a mail class value of 'PARCEL_SELECT' cannot be requested with a 'contentType' of 'HAZMAT' or any hazmat shipments.
	AncillaryServiceEndorsements *DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsAncillaryServiceEndorsements `json:"ancillaryServiceEndorsements,omitempty"`

	// Containers containers
	Containers *[]Container `json:"containers,omitempty"`

	// ContentType The type of contents in the package.
	//
	// Note:
	// * `CREMATED_REMAINS` is currently only eligible for the `PRIORITY_MAIL_EXPRESS` mail class and is not eligible for Hold for Pickup shipments.  Please refer to [Publication 139](https://about.usps.com/publications/pub139/welcome.htm) for guidelines on how to package and ship `CREMATED_REMAINS`.
	// * `DAY_OLD_POULTRY` is currently only eligible with mail class values of `USPS_GROUND_ADVANTAGE`, `PRIORITY_MAIL` and `PRIORITY_MAIL_EXPRESS`.
	// * Shipments that contain Live Animals or Perishables will incur a Live Animal and Perishables Handling Fee per mail piece. Content types `HAZMAT`, `CREMATED_REMAINS`, and `MEDICAL_SUPPLIES` do not apply and will not incur a fee. For `DAY_OLD_POULTRY` shipments only, an additional Live Animal Transport Fee per pound is applied. For more information, please visit [Live Animals Transportation Fee FAQ](https://faq.usps.com/s/article/Live-Animal-Transportation-Fee#:~:text=The%20Live%20Animal%20Transportation%20fee%20is%20charged%20%240.20%20per%20pound,prices%20to%20Zones%205%2D9)
	// * `HAZMAT` domestic labels with destination addresses to APO/FPO/DPO and PTFAS (except Puerto Rico) will not contain any Hazmat markings/indicators, including service type codes in the IMpb. When users indicate a shipment contains hazmat materials in the API request (via content type and/or extra services), that information will still be captured and sent in the shipping services file. For more information, please review the [USPS APIs release notes](https://postalpro.usps.gov/usps-apis-releases)
	// * For guidelines on shipping Perishable and Hazardous Material, please refer to [Publication 52](https://pe.usps.com/text/pub52/welcome.htm).
	// * For ZIP codes with restrictions:
	//   * Please refer to the most recent [Postal Bulletin](https://about.usps.com/resources/postal-bulletin.htm) ZIP restriction table for more information. You can find this data under `Pull-Out information` -> `Other Information` -> `Overseas Military/Diplomatic Mail`.
	//   * When restriction `M` applies, then `BEES`, `DAY_OLD_POULTRY`, `ADULT_BIRDS`, `OTHER_LIVES`, `FRUITS`, `VEGETABLES`, and `LIVE_PLANTS` are not allowed.
	//   * When restriction `X` applies, then `CREMATED_REMAINS` are not allowed.
	ContentType *DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsContentType `json:"contentType,omitempty"`

	// GenerateGXEvent Provides the option for a user to not create a "GX" event for the package. By default, a GX event will be created.
	GenerateGXEvent *bool `json:"generateGXEvent,omitempty"`

	// ImmediateManifest Setting this field to `true` will send electronic data to Postal systems within 15 minutes of label creation.
	//
	// If invoked, this label <u><strong>cannot</strong></u> be canceled. Instead, one must request an unused label refund – which may be subject to an admin fee.
	//
	// Depending on time of label creation, your packages could be charged same day instead of next day.
	ImmediateManifest *bool `json:"immediateManifest,omitempty"`

	// NonDeliveryOption Requested action in the case a package is undeliverable:
	//   - `RETURN` for package to be returned to `fromAddress`.
	//   - `REDIRECT` to return package to address specified in the `redirectAddress`.
	//   - `ABANDON` to dispose of undeliverable package
	//
	// Note:
	//   * `REDIRECT` and `ABANDON` will not impact the domestic package endpoint. Please use ancillary service endorsements instead.
	//   * An address must be provided in `redirectAddress` when a value of `REDIRECT` is provided.
	NonDeliveryOption *DomesticPackageDescriptionWithoutRateIndicatorPackageOptionsNonDeliveryOption `json:"nonDeliveryOption,omitempty"`

	// Omas Fields specific to Official Mail Accounting System (OMAS).  Used for Federal Agencies.
	Omas *struct {
		// ChargebackCode Code used with OMAS transactions.
		ChargebackCode *string `json:"chargebackCode,omitempty"`
	} `json:"omas,omitempty"`

	// OriginalPackage * Note: packageOptions.originalPackage fields cannot be used in combination with packageOptions.returnReceiptTracking.
	OriginalPackage *struct {
		// OriginalConstructCode A 3-character code to identify the construct of the Original Label Tracking Number
		OriginalConstructCode string `json:"originalConstructCode"`

		// OriginalTrackingNumber The tracking number associated with the package before it was over labeled.
		// For accurate tracking, this field requires a concatenated string consisting of the routingInformation and trackingNumber from the original label response.
		OriginalTrackingNumber string `json:"originalTrackingNumber"`
	} `json:"originalPackage,omitempty"`

	// PackageValue The merchandise value of the package, in US dollars. Used as the declared value for Insurance and for fee calculation when provided.
	//
	//  Note:
	//   * `packageValue` is required when `extraServices` includes `930` or `931`.
	PackageValue *float32 `json:"packageValue,omitempty"`
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	RedirectAddress *DomesticLabelAddress `json:"redirectAddress,omitempty"`

	// ReturnReceiptTracking Indicates whether a return receipt tracking number should be generated for the package.
	// If set to `true`, the system will automatically add the Extra Service Code (ESC) `955`
	// if it is not already present. When enabled, the `returnReceiptTrackingNumber` field will be populated in the response.
	//
	// Note:
	//   * `returnReceiptTracking` cannot be used in combination with `packageOptions.originalPackage` fields.
	//   * Utilizing `returnReceiptTracking` will incur the `955` ESC associated fee.
	ReturnReceiptTracking *bool                  `json:"returnReceiptTracking,omitempty"`
	AdditionalProperties  map[string]interface{} `json:"-"`
}

DomesticPackageDescriptionWithoutRateIndicator_PackageOptions defines model for DomesticPackageDescriptionWithoutRateIndicator.PackageOptions.

func (DomesticPackageDescriptionWithoutRateIndicator_PackageOptions) Get

func (a DomesticPackageDescriptionWithoutRateIndicator_PackageOptions) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for DomesticPackageDescriptionWithoutRateIndicator_PackageOptions. Returns the specified element and whether it was found

func (DomesticPackageDescriptionWithoutRateIndicator_PackageOptions) MarshalJSON

Override default JSON handling for DomesticPackageDescriptionWithoutRateIndicator_PackageOptions to handle AdditionalProperties

func (*DomesticPackageDescriptionWithoutRateIndicator_PackageOptions) Set

func (a *DomesticPackageDescriptionWithoutRateIndicator_PackageOptions) Set(fieldName string, value interface{})

Setter for additional properties for DomesticPackageDescriptionWithoutRateIndicator_PackageOptions

func (*DomesticPackageDescriptionWithoutRateIndicator_PackageOptions) UnmarshalJSON

Override default JSON handling for DomesticPackageDescriptionWithoutRateIndicator_PackageOptions to handle AdditionalProperties

type DomesticPackageDescription_PackageOptions

type DomesticPackageDescription_PackageOptions struct {
	// AncillaryServiceEndorsements Endorsements allow the sender to obtain the addressee's new (forwarding) address
	// (provided the appropriate endorsement is used and if the addressee filed a
	// Change-of-Address Order with the Postal Service) or the reason for non-delivery.
	// For more information see [PostalPro](https://postalpro.usps.com/address-quality/ancillary-service-endorsements).
	//
	// Note:
	//   * Ancillary Service Endorsements are currently not supported when 'holdForPickup' is set to 'true'.
	//   * 'CHANGE_SERVICE_REQUESTED' with a mail class value of 'PRIORITY_MAIL' currently only supports a contentType of 'PERISHABLE'.
	//   * 'CHANGE_SERVICE_REQUESTED' cannot be requested with a 'contentType' of 'HAZMAT' or any hazmat shipments.
	//   * 'CHANGE_SERVICE_REQUESTED' with mail classes 'PARCEL_SELECT', 'USPS_GROUND_ADVANTAGE', and 'PRIORITY_MAIL' can only be used with extraServices '920' and '921'.
	//   * Ancillary Service Endorsements are currently only supported with mail class values 'PARCEL_SELECT', 'USPS_GROUND_ADVANTAGE', 'PRIORITY_MAIL', and 'PRIORITY_MAIL_EXPRESS'.
	//   * 'ELECTRONIC_SERVICE_REQUESTED' with a mail class value of 'PARCEL_SELECT' cannot be requested with a 'contentType' of 'HAZMAT' or any hazmat shipments.
	AncillaryServiceEndorsements *DomesticPackageDescriptionPackageOptionsAncillaryServiceEndorsements `json:"ancillaryServiceEndorsements,omitempty"`

	// Containers containers
	Containers *[]Container `json:"containers,omitempty"`

	// ContentType The type of contents in the package.
	//
	// Note:
	// * `CREMATED_REMAINS` is currently only eligible for the `PRIORITY_MAIL_EXPRESS` mail class and is not eligible for Hold for Pickup shipments.  Please refer to [Publication 139](https://about.usps.com/publications/pub139/welcome.htm) for guidelines on how to package and ship `CREMATED_REMAINS`.
	// * `DAY_OLD_POULTRY` is currently only eligible with mail class values of `USPS_GROUND_ADVANTAGE`, `PRIORITY_MAIL` and `PRIORITY_MAIL_EXPRESS`.
	// * Shipments that contain Live Animals or Perishables will incur a Live Animal and Perishables Handling Fee per mail piece. Content types `HAZMAT`, `CREMATED_REMAINS`, and `MEDICAL_SUPPLIES` do not apply and will not incur a fee. For `DAY_OLD_POULTRY` shipments only, an additional Live Animal Transport Fee per pound is applied. For more information, please visit [Live Animals Transportation Fee FAQ](https://faq.usps.com/s/article/Live-Animal-Transportation-Fee#:~:text=The%20Live%20Animal%20Transportation%20fee%20is%20charged%20%240.20%20per%20pound,prices%20to%20Zones%205%2D9)
	// * `HAZMAT` domestic labels with destination addresses to APO/FPO/DPO and PTFAS (except Puerto Rico) will not contain any Hazmat markings/indicators, including service type codes in the IMpb. When users indicate a shipment contains hazmat materials in the API request (via content type and/or extra services), that information will still be captured and sent in the shipping services file. For more information, please review the [USPS APIs release notes](https://postalpro.usps.gov/usps-apis-releases)
	// * For guidelines on shipping Perishable and Hazardous Material, please refer to [Publication 52](https://pe.usps.com/text/pub52/welcome.htm).
	// * For ZIP codes with restrictions:
	//   * Please refer to the most recent [Postal Bulletin](https://about.usps.com/resources/postal-bulletin.htm) ZIP restriction table for more information. You can find this data under `Pull-Out information` -> `Other Information` -> `Overseas Military/Diplomatic Mail`.
	//   * When restriction `M` applies, then `BEES`, `DAY_OLD_POULTRY`, `ADULT_BIRDS`, `OTHER_LIVES`, `FRUITS`, `VEGETABLES`, and `LIVE_PLANTS` are not allowed.
	//   * When restriction `X` applies, then `CREMATED_REMAINS` are not allowed.
	ContentType *DomesticPackageDescriptionPackageOptionsContentType `json:"contentType,omitempty"`

	// GenerateGXEvent Provides the option for a user to not create a "GX" event for the package. By default, a GX event will be created.
	GenerateGXEvent *bool `json:"generateGXEvent,omitempty"`

	// ImmediateManifest Setting this field to `true` will send electronic data to Postal systems within 15 minutes of label creation.
	//
	// If invoked, this label <u><strong>cannot</strong></u> be canceled. Instead, one must request an unused label refund – which may be subject to an admin fee.
	//
	// Depending on time of label creation, your packages could be charged same day instead of next day.
	ImmediateManifest *bool `json:"immediateManifest,omitempty"`

	// NonDeliveryOption Requested action in the case a package is undeliverable:
	//   - `RETURN` for package to be returned to `fromAddress`.
	//   - `REDIRECT` to return package to address specified in the `redirectAddress`.
	//   - `ABANDON` to dispose of undeliverable package
	//
	// Note:
	//   * `REDIRECT` and `ABANDON` will not impact the domestic package endpoint. Please use ancillary service endorsements instead.
	//   * An address must be provided in `redirectAddress` when a value of `REDIRECT` is provided.
	NonDeliveryOption *DomesticPackageDescriptionPackageOptionsNonDeliveryOption `json:"nonDeliveryOption,omitempty"`

	// Omas Fields specific to Official Mail Accounting System (OMAS).  Used for Federal Agencies.
	Omas *struct {
		// ChargebackCode Code used with OMAS transactions.
		ChargebackCode *string `json:"chargebackCode,omitempty"`
	} `json:"omas,omitempty"`

	// OriginalPackage * Note: packageOptions.originalPackage fields cannot be used in combination with packageOptions.returnReceiptTracking.
	OriginalPackage *struct {
		// OriginalConstructCode A 3-character code to identify the construct of the Original Label Tracking Number
		OriginalConstructCode string `json:"originalConstructCode"`

		// OriginalTrackingNumber The tracking number associated with the package before it was over labeled.
		// For accurate tracking, this field requires a concatenated string consisting of the routingInformation and trackingNumber from the original label response.
		OriginalTrackingNumber string `json:"originalTrackingNumber"`
	} `json:"originalPackage,omitempty"`

	// PackageValue The merchandise value of the package, in US dollars. Used as the declared value for Insurance and for fee calculation when provided.
	//
	//  Note:
	//   * `packageValue` is required when `extraServices` includes `930` or `931`.
	PackageValue *float32 `json:"packageValue,omitempty"`
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	RedirectAddress *DomesticLabelAddress `json:"redirectAddress,omitempty"`

	// ReturnReceiptTracking Indicates whether a return receipt tracking number should be generated for the package.
	// If set to `true`, the system will automatically add the Extra Service Code (ESC) `955`
	// if it is not already present. When enabled, the `returnReceiptTrackingNumber` field will be populated in the response.
	//
	// Note:
	//   * `returnReceiptTracking` cannot be used in combination with `packageOptions.originalPackage` fields.
	//   * Utilizing `returnReceiptTracking` will incur the `955` ESC associated fee.
	ReturnReceiptTracking *bool                  `json:"returnReceiptTracking,omitempty"`
	AdditionalProperties  map[string]interface{} `json:"-"`
}

DomesticPackageDescription_PackageOptions defines model for DomesticPackageDescription.PackageOptions.

func (DomesticPackageDescription_PackageOptions) Get

func (a DomesticPackageDescription_PackageOptions) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for DomesticPackageDescription_PackageOptions. Returns the specified element and whether it was found

func (DomesticPackageDescription_PackageOptions) MarshalJSON

Override default JSON handling for DomesticPackageDescription_PackageOptions to handle AdditionalProperties

func (*DomesticPackageDescription_PackageOptions) Set

func (a *DomesticPackageDescription_PackageOptions) Set(fieldName string, value interface{})

Setter for additional properties for DomesticPackageDescription_PackageOptions

func (*DomesticPackageDescription_PackageOptions) UnmarshalJSON

Override default JSON handling for DomesticPackageDescription_PackageOptions to handle AdditionalProperties

type DomesticPackageOptions

type DomesticPackageOptions struct {
	// AncillaryServiceEndorsements Endorsements allow the sender to obtain the addressee's new (forwarding) address
	// (provided the appropriate endorsement is used and if the addressee filed a
	// Change-of-Address Order with the Postal Service) or the reason for non-delivery.
	// For more information see [PostalPro](https://postalpro.usps.com/address-quality/ancillary-service-endorsements).
	//
	// Note:
	//   * Ancillary Service Endorsements are currently not supported when 'holdForPickup' is set to 'true'.
	//   * 'CHANGE_SERVICE_REQUESTED' with a mail class value of 'PRIORITY_MAIL' currently only supports a contentType of 'PERISHABLE'.
	//   * 'CHANGE_SERVICE_REQUESTED' cannot be requested with a 'contentType' of 'HAZMAT' or any hazmat shipments.
	//   * 'CHANGE_SERVICE_REQUESTED' with mail classes 'PARCEL_SELECT', 'USPS_GROUND_ADVANTAGE', and 'PRIORITY_MAIL' can only be used with extraServices '920' and '921'.
	//   * Ancillary Service Endorsements are currently only supported with mail class values 'PARCEL_SELECT', 'USPS_GROUND_ADVANTAGE', 'PRIORITY_MAIL', and 'PRIORITY_MAIL_EXPRESS'.
	//   * 'ELECTRONIC_SERVICE_REQUESTED' with a mail class value of 'PARCEL_SELECT' cannot be requested with a 'contentType' of 'HAZMAT' or any hazmat shipments.
	AncillaryServiceEndorsements *DomesticPackageOptionsAncillaryServiceEndorsements `json:"ancillaryServiceEndorsements,omitempty"`

	// Containers containers
	Containers *[]Container `json:"containers,omitempty"`

	// ContentType The type of contents in the package.
	//
	// Note:
	// * `CREMATED_REMAINS` is currently only eligible for the `PRIORITY_MAIL_EXPRESS` mail class and is not eligible for Hold for Pickup shipments.  Please refer to [Publication 139](https://about.usps.com/publications/pub139/welcome.htm) for guidelines on how to package and ship `CREMATED_REMAINS`.
	// * `DAY_OLD_POULTRY` is currently only eligible with mail class values of `USPS_GROUND_ADVANTAGE`, `PRIORITY_MAIL` and `PRIORITY_MAIL_EXPRESS`.
	// * Shipments that contain Live Animals or Perishables will incur a Live Animal and Perishables Handling Fee per mail piece. Content types `HAZMAT`, `CREMATED_REMAINS`, and `MEDICAL_SUPPLIES` do not apply and will not incur a fee. For `DAY_OLD_POULTRY` shipments only, an additional Live Animal Transport Fee per pound is applied. For more information, please visit [Live Animals Transportation Fee FAQ](https://faq.usps.com/s/article/Live-Animal-Transportation-Fee#:~:text=The%20Live%20Animal%20Transportation%20fee%20is%20charged%20%240.20%20per%20pound,prices%20to%20Zones%205%2D9)
	// * `HAZMAT` domestic labels with destination addresses to APO/FPO/DPO and PTFAS (except Puerto Rico) will not contain any Hazmat markings/indicators, including service type codes in the IMpb. When users indicate a shipment contains hazmat materials in the API request (via content type and/or extra services), that information will still be captured and sent in the shipping services file. For more information, please review the [USPS APIs release notes](https://postalpro.usps.gov/usps-apis-releases)
	// * For guidelines on shipping Perishable and Hazardous Material, please refer to [Publication 52](https://pe.usps.com/text/pub52/welcome.htm).
	// * For ZIP codes with restrictions:
	//   * Please refer to the most recent [Postal Bulletin](https://about.usps.com/resources/postal-bulletin.htm) ZIP restriction table for more information. You can find this data under `Pull-Out information` -> `Other Information` -> `Overseas Military/Diplomatic Mail`.
	//   * When restriction `M` applies, then `BEES`, `DAY_OLD_POULTRY`, `ADULT_BIRDS`, `OTHER_LIVES`, `FRUITS`, `VEGETABLES`, and `LIVE_PLANTS` are not allowed.
	//   * When restriction `X` applies, then `CREMATED_REMAINS` are not allowed.
	ContentType *DomesticPackageOptionsContentType `json:"contentType,omitempty"`

	// GenerateGXEvent Provides the option for a user to not create a "GX" event for the package. By default, a GX event will be created.
	GenerateGXEvent *bool `json:"generateGXEvent,omitempty"`

	// NonDeliveryOption Requested action in the case a package is undeliverable:
	//   - `RETURN` for package to be returned to `fromAddress`.
	//   - `REDIRECT` to return package to address specified in the `redirectAddress`.
	//   - `ABANDON` to dispose of undeliverable package
	//
	// Note:
	//   * `REDIRECT` and `ABANDON` will not impact the domestic package endpoint. Please use ancillary service endorsements instead.
	//   * An address must be provided in `redirectAddress` when a value of `REDIRECT` is provided.
	NonDeliveryOption *DomesticPackageOptionsNonDeliveryOption `json:"nonDeliveryOption,omitempty"`

	// Omas Fields specific to Official Mail Accounting System (OMAS).  Used for Federal Agencies.
	Omas *struct {
		// ChargebackCode Code used with OMAS transactions.
		ChargebackCode *string `json:"chargebackCode,omitempty"`
	} `json:"omas,omitempty"`

	// PackageValue The merchandise value of the package, in US dollars. Used as the declared value for Insurance and for fee calculation when provided.
	//
	//  Note:
	//   * `packageValue` is required when `extraServices` includes `930` or `931`.
	PackageValue *float32 `json:"packageValue,omitempty"`
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	RedirectAddress *DomesticLabelAddress `json:"redirectAddress,omitempty"`

	// ReturnReceiptTracking Indicates whether a return receipt tracking number should be generated for the package.
	// If set to `true`, the system will automatically add the Extra Service Code (ESC) `955`
	// if it is not already present. When enabled, the `returnReceiptTrackingNumber` field will be populated in the response.
	//
	// Note:
	//   * `returnReceiptTracking` cannot be used in combination with `packageOptions.originalPackage` fields.
	//   * Utilizing `returnReceiptTracking` will incur the `955` ESC associated fee.
	ReturnReceiptTracking *bool                  `json:"returnReceiptTracking,omitempty"`
	AdditionalProperties  map[string]interface{} `json:"-"`
}

DomesticPackageOptions defines model for DomesticPackageOptions.

func (DomesticPackageOptions) Get

func (a DomesticPackageOptions) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for DomesticPackageOptions. Returns the specified element and whether it was found

func (DomesticPackageOptions) MarshalJSON

func (a DomesticPackageOptions) MarshalJSON() ([]byte, error)

Override default JSON handling for DomesticPackageOptions to handle AdditionalProperties

func (*DomesticPackageOptions) Set

func (a *DomesticPackageOptions) Set(fieldName string, value interface{})

Setter for additional properties for DomesticPackageOptions

func (*DomesticPackageOptions) UnmarshalJSON

func (a *DomesticPackageOptions) UnmarshalJSON(b []byte) error

Override default JSON handling for DomesticPackageOptions to handle AdditionalProperties

type DomesticPackageOptionsAncillaryServiceEndorsements

type DomesticPackageOptionsAncillaryServiceEndorsements string

DomesticPackageOptionsAncillaryServiceEndorsements Endorsements allow the sender to obtain the addressee's new (forwarding) address (provided the appropriate endorsement is used and if the addressee filed a Change-of-Address Order with the Postal Service) or the reason for non-delivery. For more information see [PostalPro](https://postalpro.usps.com/address-quality/ancillary-service-endorsements).

Note:

  • Ancillary Service Endorsements are currently not supported when 'holdForPickup' is set to 'true'.
  • 'CHANGE_SERVICE_REQUESTED' with a mail class value of 'PRIORITY_MAIL' currently only supports a contentType of 'PERISHABLE'.
  • 'CHANGE_SERVICE_REQUESTED' cannot be requested with a 'contentType' of 'HAZMAT' or any hazmat shipments.
  • 'CHANGE_SERVICE_REQUESTED' with mail classes 'PARCEL_SELECT', 'USPS_GROUND_ADVANTAGE', and 'PRIORITY_MAIL' can only be used with extraServices '920' and '921'.
  • Ancillary Service Endorsements are currently only supported with mail class values 'PARCEL_SELECT', 'USPS_GROUND_ADVANTAGE', 'PRIORITY_MAIL', and 'PRIORITY_MAIL_EXPRESS'.
  • 'ELECTRONIC_SERVICE_REQUESTED' with a mail class value of 'PARCEL_SELECT' cannot be requested with a 'contentType' of 'HAZMAT' or any hazmat shipments.
const (
	DomesticPackageOptionsAncillaryServiceEndorsementsADDRESSSERVICEREQUESTED    DomesticPackageOptionsAncillaryServiceEndorsements = "ADDRESS_SERVICE_REQUESTED"
	DomesticPackageOptionsAncillaryServiceEndorsementsCHANGESERVICEREQUESTED     DomesticPackageOptionsAncillaryServiceEndorsements = "CHANGE_SERVICE_REQUESTED"
	DomesticPackageOptionsAncillaryServiceEndorsementsELECTRONICSERVICEREQUESTED DomesticPackageOptionsAncillaryServiceEndorsements = "ELECTRONIC_SERVICE_REQUESTED"
	DomesticPackageOptionsAncillaryServiceEndorsementsFORWARDINGSERVICEREQUESTED DomesticPackageOptionsAncillaryServiceEndorsements = "FORWARDING_SERVICE_REQUESTED"
	DomesticPackageOptionsAncillaryServiceEndorsementsRETURNSERVICEREQUESTED     DomesticPackageOptionsAncillaryServiceEndorsements = "RETURN_SERVICE_REQUESTED"
	DomesticPackageOptionsAncillaryServiceEndorsementsTEMPRETURNSERVICEREQUESTED DomesticPackageOptionsAncillaryServiceEndorsements = "TEMP_RETURN_SERVICE_REQUESTED"
)

Defines values for DomesticPackageOptionsAncillaryServiceEndorsements.

type DomesticPackageOptionsContentType

type DomesticPackageOptionsContentType string

DomesticPackageOptionsContentType The type of contents in the package.

Note: * `CREMATED_REMAINS` is currently only eligible for the `PRIORITY_MAIL_EXPRESS` mail class and is not eligible for Hold for Pickup shipments. Please refer to [Publication 139](https://about.usps.com/publications/pub139/welcome.htm) for guidelines on how to package and ship `CREMATED_REMAINS`. * `DAY_OLD_POULTRY` is currently only eligible with mail class values of `USPS_GROUND_ADVANTAGE`, `PRIORITY_MAIL` and `PRIORITY_MAIL_EXPRESS`. * Shipments that contain Live Animals or Perishables will incur a Live Animal and Perishables Handling Fee per mail piece. Content types `HAZMAT`, `CREMATED_REMAINS`, and `MEDICAL_SUPPLIES` do not apply and will not incur a fee. For `DAY_OLD_POULTRY` shipments only, an additional Live Animal Transport Fee per pound is applied. For more information, please visit [Live Animals Transportation Fee FAQ](https://faq.usps.com/s/article/Live-Animal-Transportation-Fee#:~:text=The%20Live%20Animal%20Transportation%20fee%20is%20charged%20%240.20%20per%20pound,prices%20to%20Zones%205%2D9) * `HAZMAT` domestic labels with destination addresses to APO/FPO/DPO and PTFAS (except Puerto Rico) will not contain any Hazmat markings/indicators, including service type codes in the IMpb. When users indicate a shipment contains hazmat materials in the API request (via content type and/or extra services), that information will still be captured and sent in the shipping services file. For more information, please review the [USPS APIs release notes](https://postalpro.usps.gov/usps-apis-releases) * For guidelines on shipping Perishable and Hazardous Material, please refer to [Publication 52](https://pe.usps.com/text/pub52/welcome.htm). * For ZIP codes with restrictions:

  • Please refer to the most recent [Postal Bulletin](https://about.usps.com/resources/postal-bulletin.htm) ZIP restriction table for more information. You can find this data under `Pull-Out information` -> `Other Information` -> `Overseas Military/Diplomatic Mail`.
  • When restriction `M` applies, then `BEES`, `DAY_OLD_POULTRY`, `ADULT_BIRDS`, `OTHER_LIVES`, `FRUITS`, `VEGETABLES`, and `LIVE_PLANTS` are not allowed.
  • When restriction `X` applies, then `CREMATED_REMAINS` are not allowed.
const (
	DomesticPackageOptionsContentTypeADULTBIRDS      DomesticPackageOptionsContentType = "ADULT_BIRDS"
	DomesticPackageOptionsContentTypeBEES            DomesticPackageOptionsContentType = "BEES"
	DomesticPackageOptionsContentTypeCREMATEDREMAINS DomesticPackageOptionsContentType = "CREMATED_REMAINS"
	DomesticPackageOptionsContentTypeDAYOLDPOULTRY   DomesticPackageOptionsContentType = "DAY_OLD_POULTRY"
	DomesticPackageOptionsContentTypeFRUITS          DomesticPackageOptionsContentType = "FRUITS"
	DomesticPackageOptionsContentTypeHAZMAT          DomesticPackageOptionsContentType = "HAZMAT"
	DomesticPackageOptionsContentTypeLIVEPLANTS      DomesticPackageOptionsContentType = "LIVE_PLANTS"
	DomesticPackageOptionsContentTypeMEDICALSUPPLIES DomesticPackageOptionsContentType = "MEDICAL_SUPPLIES"
	DomesticPackageOptionsContentTypeOTHERLIVES      DomesticPackageOptionsContentType = "OTHER_LIVES"
	DomesticPackageOptionsContentTypePERISHABLE      DomesticPackageOptionsContentType = "PERISHABLE"
	DomesticPackageOptionsContentTypePHARMACEUTICALS DomesticPackageOptionsContentType = "PHARMACEUTICALS"
	DomesticPackageOptionsContentTypeVEGETABLES      DomesticPackageOptionsContentType = "VEGETABLES"
)

Defines values for DomesticPackageOptionsContentType.

type DomesticPackageOptionsNonDeliveryOption

type DomesticPackageOptionsNonDeliveryOption string

DomesticPackageOptionsNonDeliveryOption Requested action in the case a package is undeliverable:

  • `RETURN` for package to be returned to `fromAddress`.
  • `REDIRECT` to return package to address specified in the `redirectAddress`.
  • `ABANDON` to dispose of undeliverable package

Note:

  • `REDIRECT` and `ABANDON` will not impact the domestic package endpoint. Please use ancillary service endorsements instead.
  • An address must be provided in `redirectAddress` when a value of `REDIRECT` is provided.
const (
	DomesticPackageOptionsNonDeliveryOptionABANDON  DomesticPackageOptionsNonDeliveryOption = "ABANDON"
	DomesticPackageOptionsNonDeliveryOptionREDIRECT DomesticPackageOptionsNonDeliveryOption = "REDIRECT"
	DomesticPackageOptionsNonDeliveryOptionRETURN   DomesticPackageOptionsNonDeliveryOption = "RETURN"
)

Defines values for DomesticPackageOptionsNonDeliveryOption.

type DomesticPackageReturnOptions

type DomesticPackageReturnOptions struct {
	// AncillaryServiceEndorsements Endorsements allow the sender to obtain the addressee's new (forwarding) address (provided the appropriate endorsement is used
	// and if the addressee filed a Change-of-Address Order with the Postal Service) or the reason for non-delivery.
	// For more information see [PostalPro](https://postalpro.usps.com/address-quality/ancillary-service-endorsements)
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	AncillaryServiceEndorsements *DomesticPackageReturnOptionsAncillaryServiceEndorsements `json:"ancillaryServiceEndorsements,omitempty"`

	// Containers containers
	Containers *[]Container `json:"containers,omitempty"`

	// ContentType The type of contents in the package.
	// * HAZMAT
	// * CREMATED_REMAINS
	// * BEES
	// * DAY_OLD_POULTRY
	// * ADULT_BIRDS
	// * OTHER_LIVES
	// * PERISHABLE
	// * PHARMACEUTICALS
	// * MEDICAL_SUPPLIES
	// * FRUITS
	// * VEGETABLES
	// * LIVE_PLANTS
	//
	// Note:
	// * `CREMATED_REMAINS` is currently only eligible for the `PRIORITY_MAIL_EXPRESS_RETURN_SERVICE` mail class.  Please refer to [Publication 139](https://about.usps.com/publications/pub139/welcome.htm) for guidelines on how to package and ship `CREMATED_REMAINS`.
	// * `HAZMAT` domestic labels with destination addresses to APO/FPO/DPO and PTFAS (except Puerto Rico) will not contain any Hazmat markings/indicators, including service type codes in the IMpb. When users indicate a shipment contains hazmat materials in the API request (via content type and/or extra services), that information will still be captured and sent in the shipping services file. For more information, please review the [USPS APIs release notes](https://postalpro.usps.gov/usps-apis-releases)
	// * For guidelines on shipping Hazardous Material, please refer to [Publication 52](https://pe.usps.com/text/pub52/welcome.htm).
	ContentType *DomesticPackageReturnOptionsContentType `json:"contentType,omitempty"`

	// GenerateGXEvent Provides the option for a user to not create a "GX" event for the package. By default, a GX event will be created.
	GenerateGXEvent *bool `json:"generateGXEvent,omitempty"`

	// ImmediateManifest Setting this field to `true` will send electronic data to Postal systems within 15 minutes of label creation.
	ImmediateManifest *bool `json:"immediateManifest,omitempty"`

	// NonDeliveryOption Requested action in the case a package is undeliverable:
	//   - `RETURN` for package to be returned to `fromAddress`.
	//   - `REDIRECT` to return package to address specified in the `redirectAddress`.
	//   - `ABANDON` to dispose of undeliverable package
	//
	// Note:
	//   * `REDIRECT` and `ABANDON` will not impact the domestic package endpoint. Please use ancillary service endorsements instead.
	//   * An address must be provided in `redirectAddress` when a value of `REDIRECT` is provided.
	NonDeliveryOption *DomesticPackageReturnOptionsNonDeliveryOption `json:"nonDeliveryOption,omitempty"`

	// Omas Fields specific to Official Mail Accounting System (OMAS).  Used for Federal Agencies.
	Omas *struct {
		// ChargebackCode Code used with OMAS transactions.
		ChargebackCode *string `json:"chargebackCode,omitempty"`
	} `json:"omas,omitempty"`

	// PackageValue The merchandise value of the package, in US dollars. Used as the declared value for Insurance and for fee calculation when provided.
	//
	//  Note:
	//   * `packageValue` is required when `extraServices` includes `930` or `931`.
	PackageValue *float32 `json:"packageValue,omitempty"`

	// RedirectAddress **Deprecated**: Use the `ancillaryServiceEndorsements` field instead.
	//
	// Address to send the package to if it is not deliverable.
	//
	// Note:
	//   - Required when `nonDeliveryOption` is a value of `REDIRECT`.
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	RedirectAddress      *DomesticLabelAddress  `json:"redirectAddress,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

DomesticPackageReturnOptions defines model for DomesticPackageReturnOptions.

func (DomesticPackageReturnOptions) Get

func (a DomesticPackageReturnOptions) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for DomesticPackageReturnOptions. Returns the specified element and whether it was found

func (DomesticPackageReturnOptions) MarshalJSON

func (a DomesticPackageReturnOptions) MarshalJSON() ([]byte, error)

Override default JSON handling for DomesticPackageReturnOptions to handle AdditionalProperties

func (*DomesticPackageReturnOptions) Set

func (a *DomesticPackageReturnOptions) Set(fieldName string, value interface{})

Setter for additional properties for DomesticPackageReturnOptions

func (*DomesticPackageReturnOptions) UnmarshalJSON

func (a *DomesticPackageReturnOptions) UnmarshalJSON(b []byte) error

Override default JSON handling for DomesticPackageReturnOptions to handle AdditionalProperties

type DomesticPackageReturnOptionsAncillaryServiceEndorsements

type DomesticPackageReturnOptionsAncillaryServiceEndorsements string

DomesticPackageReturnOptionsAncillaryServiceEndorsements Endorsements allow the sender to obtain the addressee's new (forwarding) address (provided the appropriate endorsement is used and if the addressee filed a Change-of-Address Order with the Postal Service) or the reason for non-delivery. For more information see [PostalPro](https://postalpro.usps.com/address-quality/ancillary-service-endorsements)

const (
	ADDRESSSERVICEREQUESTED    DomesticPackageReturnOptionsAncillaryServiceEndorsements = "ADDRESS_SERVICE_REQUESTED"
	CHANGESERVICEREQUESTED     DomesticPackageReturnOptionsAncillaryServiceEndorsements = "CHANGE_SERVICE_REQUESTED"
	ELECTRONICSERVICEREQUESTED DomesticPackageReturnOptionsAncillaryServiceEndorsements = "ELECTRONIC_SERVICE_REQUESTED"
	FORWARDINGSERVICEREQUESTED DomesticPackageReturnOptionsAncillaryServiceEndorsements = "FORWARDING_SERVICE_REQUESTED"
	RETURNSERVICEREQUESTED     DomesticPackageReturnOptionsAncillaryServiceEndorsements = "RETURN_SERVICE_REQUESTED"
	TEMPRETURNSERVICEREQUESTED DomesticPackageReturnOptionsAncillaryServiceEndorsements = "TEMP_RETURN_SERVICE_REQUESTED"
)

Defines values for DomesticPackageReturnOptionsAncillaryServiceEndorsements.

type DomesticPackageReturnOptionsContentType

type DomesticPackageReturnOptionsContentType string

DomesticPackageReturnOptionsContentType The type of contents in the package. * HAZMAT * CREMATED_REMAINS * BEES * DAY_OLD_POULTRY * ADULT_BIRDS * OTHER_LIVES * PERISHABLE * PHARMACEUTICALS * MEDICAL_SUPPLIES * FRUITS * VEGETABLES * LIVE_PLANTS

Note: * `CREMATED_REMAINS` is currently only eligible for the `PRIORITY_MAIL_EXPRESS_RETURN_SERVICE` mail class. Please refer to [Publication 139](https://about.usps.com/publications/pub139/welcome.htm) for guidelines on how to package and ship `CREMATED_REMAINS`. * `HAZMAT` domestic labels with destination addresses to APO/FPO/DPO and PTFAS (except Puerto Rico) will not contain any Hazmat markings/indicators, including service type codes in the IMpb. When users indicate a shipment contains hazmat materials in the API request (via content type and/or extra services), that information will still be captured and sent in the shipping services file. For more information, please review the [USPS APIs release notes](https://postalpro.usps.gov/usps-apis-releases) * For guidelines on shipping Hazardous Material, please refer to [Publication 52](https://pe.usps.com/text/pub52/welcome.htm).

const (
	ADULTBIRDS      DomesticPackageReturnOptionsContentType = "ADULT_BIRDS"
	BEES            DomesticPackageReturnOptionsContentType = "BEES"
	CREMATEDREMAINS DomesticPackageReturnOptionsContentType = "CREMATED_REMAINS"
	DAYOLDPOULTRY   DomesticPackageReturnOptionsContentType = "DAY_OLD_POULTRY"
	FRUITS          DomesticPackageReturnOptionsContentType = "FRUITS"
	HAZMAT          DomesticPackageReturnOptionsContentType = "HAZMAT"
	LIVEPLANTS      DomesticPackageReturnOptionsContentType = "LIVE_PLANTS"
	MEDICALSUPPLIES DomesticPackageReturnOptionsContentType = "MEDICAL_SUPPLIES"
	OTHERLIVES      DomesticPackageReturnOptionsContentType = "OTHER_LIVES"
	PERISHABLE      DomesticPackageReturnOptionsContentType = "PERISHABLE"
	PHARMACEUTICALS DomesticPackageReturnOptionsContentType = "PHARMACEUTICALS"
	VEGETABLES      DomesticPackageReturnOptionsContentType = "VEGETABLES"
)

Defines values for DomesticPackageReturnOptionsContentType.

type DomesticPackageReturnOptionsNonDeliveryOption

type DomesticPackageReturnOptionsNonDeliveryOption string

DomesticPackageReturnOptionsNonDeliveryOption Requested action in the case a package is undeliverable:

  • `RETURN` for package to be returned to `fromAddress`.
  • `REDIRECT` to return package to address specified in the `redirectAddress`.
  • `ABANDON` to dispose of undeliverable package

Note:

  • `REDIRECT` and `ABANDON` will not impact the domestic package endpoint. Please use ancillary service endorsements instead.
  • An address must be provided in `redirectAddress` when a value of `REDIRECT` is provided.
const (
	DomesticPackageReturnOptionsNonDeliveryOptionABANDON  DomesticPackageReturnOptionsNonDeliveryOption = "ABANDON"
	DomesticPackageReturnOptionsNonDeliveryOptionREDIRECT DomesticPackageReturnOptionsNonDeliveryOption = "REDIRECT"
	DomesticPackageReturnOptionsNonDeliveryOptionRETURN   DomesticPackageReturnOptionsNonDeliveryOption = "RETURN"
)

Defines values for DomesticPackageReturnOptionsNonDeliveryOption.

type DomesticReturnsCustomsForm

type DomesticReturnsCustomsForm struct {
	// AESITN AES/ITN Exemption should be populated with the electronic export internal transaction number (if required), or the appropriate Exemption/Exclusion Legend.
	//
	// * **AES - Automated Export System /   ITN - Internal Transaction Number**\
	//   The [internal transaction number (ITN)](https://pe.usps.com/text/imm/immc5_010.htm) is a 14-digit number that corresponds to an export transaction in the Automated Export System. It serves as proof that an exporter met his or her legal obligation to inform the U.S. government about the details of an export shipment.
	// * **EEL- Exemptions, Exclusions, Legend**\
	//   An [AES exemption](https://pe.usps.com/text/imm/immc5_012.htm) is an instance in which you would not have to file in AES to get the 14-digit ITN. Instead of the ITN, you would enter the exemption’s section in the U.S. Foreign Trade Regulations on the export documentation where you would otherwise put the ITN.
	//
	// Sample - `NO EEI 30.37(a)`: Shipments valued at $2,500 or less.
	AESITN *string `json:"AESITN,omitempty"`

	// CertificateNumber Certificate Number
	CertificateNumber *string `json:"certificateNumber,omitempty"`

	// ContentComments Required when customContentType is OTHER.
	ContentComments *string `json:"contentComments,omitempty"`

	// Contents Details of the contents of the package. The first five items will print on the label of the customs form, and the rest will print on a separate continuation page.
	Contents *[]ShippingContents `json:"contents,omitempty"`

	// CustomsContentType Specifies the content of the package or envelope.
	//  * MERCHANDISE
	//  * GIFT
	//  * DOCUMENT
	//  * COMMERCIAL_SAMPLE
	//  * RETURNED_GOODS
	//  * OTHER
	//  * HUMANITARIAN_DONATIONS
	//  * DANGEROUS_GOODS
	CustomsContentType *DomesticReturnsCustomsFormCustomsContentType `json:"customsContentType,omitempty"`

	// ExportersContact Exporters Contact. Enter, if known, the Exporter’s telephone number, fax number, or email address, as such information might facilitate customs clearance or delivery.
	ExportersContact *string `json:"exportersContact,omitempty"`

	// ExportersReference Exporters Reference. The Exporter’s Reference might be a tax code, importer code, or VAT number used for sales tax.
	ExportersReference *string `json:"exportersReference,omitempty"`

	// ImportersContact Importers Contact. Enter, if known, the Importer’s telephone number, fax number, or email address, as such information might facilitate customs clearance or delivery.
	ImportersContact *string `json:"importersContact,omitempty"`

	// ImportersReference Importers Reference. The Importer’s Reference might be a tax code, importer code, or VAT number used for sales tax.
	ImportersReference *string `json:"importersReference,omitempty"`

	// InvoiceNumber Invoice Number
	InvoiceNumber *string `json:"invoiceNumber,omitempty"`

	// LicenseNumber License Number
	LicenseNumber *string `json:"licenseNumber,omitempty"`

	// RestrictionComments Restriction Comments.  Required when `restrictionType`=`OTHER`.
	RestrictionComments *string `json:"restrictionComments,omitempty"`

	// RestrictionType Restriction Types
	//   * QUARANTINE
	//   * SANITARY_INSPECTION
	//   * PHYTOSANITARY_INSPECTION
	//   * OTHER
	RestrictionType      *DomesticReturnsCustomsFormRestrictionType `json:"restrictionType,omitempty"`
	AdditionalProperties map[string]interface{}                     `json:"-"`
}

DomesticReturnsCustomsForm defines model for DomesticReturnsCustomsForm.

func (DomesticReturnsCustomsForm) Get

func (a DomesticReturnsCustomsForm) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for DomesticReturnsCustomsForm. Returns the specified element and whether it was found

func (DomesticReturnsCustomsForm) MarshalJSON

func (a DomesticReturnsCustomsForm) MarshalJSON() ([]byte, error)

Override default JSON handling for DomesticReturnsCustomsForm to handle AdditionalProperties

func (*DomesticReturnsCustomsForm) Set

func (a *DomesticReturnsCustomsForm) Set(fieldName string, value interface{})

Setter for additional properties for DomesticReturnsCustomsForm

func (*DomesticReturnsCustomsForm) UnmarshalJSON

func (a *DomesticReturnsCustomsForm) UnmarshalJSON(b []byte) error

Override default JSON handling for DomesticReturnsCustomsForm to handle AdditionalProperties

type DomesticReturnsCustomsFormCustomsContentType

type DomesticReturnsCustomsFormCustomsContentType string

DomesticReturnsCustomsFormCustomsContentType Specifies the content of the package or envelope.

  • MERCHANDISE
  • GIFT
  • DOCUMENT
  • COMMERCIAL_SAMPLE
  • RETURNED_GOODS
  • OTHER
  • HUMANITARIAN_DONATIONS
  • DANGEROUS_GOODS
const (
	DomesticReturnsCustomsFormCustomsContentTypeCOMMERCIALSAMPLE      DomesticReturnsCustomsFormCustomsContentType = "COMMERCIAL_SAMPLE"
	DomesticReturnsCustomsFormCustomsContentTypeDANGEROUSGOODS        DomesticReturnsCustomsFormCustomsContentType = "DANGEROUS_GOODS"
	DomesticReturnsCustomsFormCustomsContentTypeDOCUMENT              DomesticReturnsCustomsFormCustomsContentType = "DOCUMENT"
	DomesticReturnsCustomsFormCustomsContentTypeGIFT                  DomesticReturnsCustomsFormCustomsContentType = "GIFT"
	DomesticReturnsCustomsFormCustomsContentTypeHUMANITARIANDONATIONS DomesticReturnsCustomsFormCustomsContentType = "HUMANITARIAN_DONATIONS"
	DomesticReturnsCustomsFormCustomsContentTypeMERCHANDISE           DomesticReturnsCustomsFormCustomsContentType = "MERCHANDISE"
	DomesticReturnsCustomsFormCustomsContentTypeOTHER                 DomesticReturnsCustomsFormCustomsContentType = "OTHER"
	DomesticReturnsCustomsFormCustomsContentTypeRETURNEDGOODS         DomesticReturnsCustomsFormCustomsContentType = "RETURNED_GOODS"
)

Defines values for DomesticReturnsCustomsFormCustomsContentType.

type DomesticReturnsCustomsFormRestrictionType

type DomesticReturnsCustomsFormRestrictionType string

DomesticReturnsCustomsFormRestrictionType Restriction Types

  • QUARANTINE
  • SANITARY_INSPECTION
  • PHYTOSANITARY_INSPECTION
  • OTHER
const (
	OTHER                   DomesticReturnsCustomsFormRestrictionType = "OTHER"
	PHYTOSANITARYINSPECTION DomesticReturnsCustomsFormRestrictionType = "PHYTOSANITARY_INSPECTION"
	QUARANTINE              DomesticReturnsCustomsFormRestrictionType = "QUARANTINE"
	SANITARYINSPECTION      DomesticReturnsCustomsFormRestrictionType = "SANITARY_INSPECTION"
)

Defines values for DomesticReturnsCustomsFormRestrictionType.

type Email

type Email = openapi_types.Email

Email Email address used for redirect notification via email.

type ErrorMessage

type ErrorMessage struct {
	// ApiVersion The version of the API that was used and that raised the error.
	ApiVersion *string `json:"apiVersion,omitempty"`

	// Error The high-level error that has occurred as indicated by the status code.
	Error                *ErrorMessage_Error    `json:"error,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

ErrorMessage Standard error message response.

func (ErrorMessage) Get

func (a ErrorMessage) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for ErrorMessage. Returns the specified element and whether it was found

func (ErrorMessage) MarshalJSON

func (a ErrorMessage) MarshalJSON() ([]byte, error)

Override default JSON handling for ErrorMessage to handle AdditionalProperties

func (*ErrorMessage) Set

func (a *ErrorMessage) Set(fieldName string, value interface{})

Setter for additional properties for ErrorMessage

func (*ErrorMessage) UnmarshalJSON

func (a *ErrorMessage) UnmarshalJSON(b []byte) error

Override default JSON handling for ErrorMessage to handle AdditionalProperties

type ErrorMessage_Error

type ErrorMessage_Error struct {
	// Code The error status code that has been returned in response to the request.
	Code *string `json:"code,omitempty"`

	// Errors List of Errors
	Errors *[]ErrorMessage_Error_Errors_Item `json:"errors,omitempty"`

	// Message A human-readable message describing the error.
	Message              *string                `json:"message,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

ErrorMessage_Error The high-level error that has occurred as indicated by the status code.

func (ErrorMessage_Error) Get

func (a ErrorMessage_Error) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for ErrorMessage_Error. Returns the specified element and whether it was found

func (ErrorMessage_Error) MarshalJSON

func (a ErrorMessage_Error) MarshalJSON() ([]byte, error)

Override default JSON handling for ErrorMessage_Error to handle AdditionalProperties

func (*ErrorMessage_Error) Set

func (a *ErrorMessage_Error) Set(fieldName string, value interface{})

Setter for additional properties for ErrorMessage_Error

func (*ErrorMessage_Error) UnmarshalJSON

func (a *ErrorMessage_Error) UnmarshalJSON(b []byte) error

Override default JSON handling for ErrorMessage_Error to handle AdditionalProperties

type ErrorMessage_Error_Errors_Item

type ErrorMessage_Error_Errors_Item struct {
	// Code An internal subordinate code used for error diagnosis.
	Code *string `json:"code,omitempty"`

	// Detail A human-readable description of the error that occurred.
	Detail *string `json:"detail,omitempty"`

	// Source The element that is suspected of originating the error.  Helps to pinpoint the problem.
	Source *ErrorMessage_Error_Errors_Source `json:"source,omitempty"`

	// Status The status code response returned to the client.
	Status *string `json:"status,omitempty"`

	// Title A human-readable title that identifies the error.
	Title                *string                `json:"title,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

ErrorMessage_Error_Errors_Item defines model for ErrorMessage.Error.Errors.Item.

func (ErrorMessage_Error_Errors_Item) Get

func (a ErrorMessage_Error_Errors_Item) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for ErrorMessage_Error_Errors_Item. Returns the specified element and whether it was found

func (ErrorMessage_Error_Errors_Item) MarshalJSON

func (a ErrorMessage_Error_Errors_Item) MarshalJSON() ([]byte, error)

Override default JSON handling for ErrorMessage_Error_Errors_Item to handle AdditionalProperties

func (*ErrorMessage_Error_Errors_Item) Set

func (a *ErrorMessage_Error_Errors_Item) Set(fieldName string, value interface{})

Setter for additional properties for ErrorMessage_Error_Errors_Item

func (*ErrorMessage_Error_Errors_Item) UnmarshalJSON

func (a *ErrorMessage_Error_Errors_Item) UnmarshalJSON(b []byte) error

Override default JSON handling for ErrorMessage_Error_Errors_Item to handle AdditionalProperties

type ErrorMessage_Error_Errors_Source

type ErrorMessage_Error_Errors_Source struct {
	// Example An example of a valid value for the input parameter.
	Example *string `json:"example,omitempty"`

	// Parameter The input in the request which caused an error.
	Parameter            *string                `json:"parameter,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

ErrorMessage_Error_Errors_Source The element that is suspected of originating the error. Helps to pinpoint the problem.

func (ErrorMessage_Error_Errors_Source) Get

func (a ErrorMessage_Error_Errors_Source) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for ErrorMessage_Error_Errors_Source. Returns the specified element and whether it was found

func (ErrorMessage_Error_Errors_Source) MarshalJSON

func (a ErrorMessage_Error_Errors_Source) MarshalJSON() ([]byte, error)

Override default JSON handling for ErrorMessage_Error_Errors_Source to handle AdditionalProperties

func (*ErrorMessage_Error_Errors_Source) Set

func (a *ErrorMessage_Error_Errors_Source) Set(fieldName string, value interface{})

Setter for additional properties for ErrorMessage_Error_Errors_Source

func (*ErrorMessage_Error_Errors_Source) UnmarshalJSON

func (a *ErrorMessage_Error_Errors_Source) UnmarshalJSON(b []byte) error

Override default JSON handling for ErrorMessage_Error_Errors_Source to handle AdditionalProperties

type ExtraService

type ExtraService int

ExtraService Extra Service Code (ESC) requested.

Extra Service Code list:

  • 365 - Global Direct Entry

  • 415 - USPS Label Delivery

  • 480 - Tracking Plus 6 Months

  • 481 - Tracking Plus 1 Year

  • 482 - Tracking Plus 3 Years

  • 483 - Tracking Plus 5 Years

  • 484 - Tracking Plus 7 Years

  • 485 - Tracking Plus 10 Years

  • 486 - Tracking Plus Signature 3 Years

  • 487 - Tracking Plus Signature 5 Years

  • 488 - Tracking Plus Signature 7 Years

  • 489 - Tracking Plus Signature 10 Years

  • 810 - HAZMAT Air Eligible Ethanol Package

  • 811 - HAZMAT Class 1 - Toy Propellant/Safety Fuse Package

  • 812 - HAZMAT Class 3 – Flammable Liquid Package

  • 813 - HAZMAT Class 7 - Radioactive Materials Package

  • 814 - HAZMAT Class 8 - Corrosive Materials Package

  • 815 - HAZMAT Class 8 - Nonspillable Wet Battery Package

  • 816 - HAZMAT Class 9 - Lithium Battery Marked - Ground Only Package

  • 817 - HAZMAT Class 9 - Lithium Battery - Returns Package

  • 818 - HAZMAT Class 9 - Lithium batteries, marked package

  • 819 - HAZMAT Class 9 - Dry Ice Package

  • 820 - HAZMAT Class 9 - Lithium batteries, unmarked package

  • 821 - HAZMAT Class 9 - Magnetized Materials Package

  • 822 - HAZMAT Division 4.1 – Flammable Solids or Safety Matches Package

  • 823 - HAZMAT Division 5.1 - Oxidizers Package

  • 824 - HAZMAT Division 5.2 - Organic Peroxides Package

  • 825 - HAZMAT Division 6.1 – Toxic Materials Package

  • 826 - HAZMAT Division 6.2 – Infectious Substances Package

  • 827 - HAZMAT Excepted Quantity Provision Package

  • 828 - HAZMAT Ground Only

  • 829 - HAZMAT ID8000 Consumer Commodity Package

  • 830 - HAZMAT Lighters Package

  • 831 - HAZMAT LTD QTY Ground Package

  • 832 - HAZMAT Small Quantity Provision Package

  • 857 - Hazardous Material

  • 910 - Certified Mail

  • 911 - Certified Mail Restricted Delivery

  • 912 - Certified Mail Adult Signature Required

  • 913 - Certified Mail Adult Signature Restricted Delivery

  • 920 - USPS Tracking

  • 921 - Signature Confirmation

  • 922 - Adult Signature Required 21 or Over

  • 923 - Adult Signature Restricted Delivery 21 or Over

  • 924 - Signature Confirmation Restricted Delivery

  • 925 - Priority Mail Express Merchandise Insurance

  • 930 - Insurance <= $500

  • 931 - Insurance > $500

  • 934 - Insurance Restricted Delivery

  • 955 - Return Receipt

  • 957 - Return Receipt Electronic

  • 981 - Signature Requested (PRIORITY_MAIL_EXPRESS only)

  • 986 - PO to Addressee (PRIORITY_MAIL_EXPRESS only)

  • 991 - Sunday Delivery

    Note:

  • Extra Service Code "415 - USPS Label Delivery": When requesting this service, no images will be returned in the API response. The label and receipt will be printed and mailed to the `fromAddress` provided. The mailed label will always include a receipt on the page.

const (
	ExtraServiceN365 ExtraService = 365
	ExtraServiceN415 ExtraService = 415
	ExtraServiceN480 ExtraService = 480
	ExtraServiceN481 ExtraService = 481
	ExtraServiceN482 ExtraService = 482
	ExtraServiceN483 ExtraService = 483
	ExtraServiceN484 ExtraService = 484
	ExtraServiceN485 ExtraService = 485
	ExtraServiceN486 ExtraService = 486
	ExtraServiceN487 ExtraService = 487
	ExtraServiceN488 ExtraService = 488
	ExtraServiceN489 ExtraService = 489
	ExtraServiceN810 ExtraService = 810
	ExtraServiceN811 ExtraService = 811
	ExtraServiceN812 ExtraService = 812
	ExtraServiceN813 ExtraService = 813
	ExtraServiceN814 ExtraService = 814
	ExtraServiceN815 ExtraService = 815
	ExtraServiceN816 ExtraService = 816
	ExtraServiceN817 ExtraService = 817
	ExtraServiceN818 ExtraService = 818
	ExtraServiceN819 ExtraService = 819
	ExtraServiceN820 ExtraService = 820
	ExtraServiceN821 ExtraService = 821
	ExtraServiceN822 ExtraService = 822
	ExtraServiceN823 ExtraService = 823
	ExtraServiceN824 ExtraService = 824
	ExtraServiceN825 ExtraService = 825
	ExtraServiceN826 ExtraService = 826
	ExtraServiceN827 ExtraService = 827
	ExtraServiceN828 ExtraService = 828
	ExtraServiceN829 ExtraService = 829
	ExtraServiceN830 ExtraService = 830
	ExtraServiceN831 ExtraService = 831
	ExtraServiceN832 ExtraService = 832
	ExtraServiceN857 ExtraService = 857
	ExtraServiceN910 ExtraService = 910
	ExtraServiceN911 ExtraService = 911
	ExtraServiceN912 ExtraService = 912
	ExtraServiceN913 ExtraService = 913
	ExtraServiceN920 ExtraService = 920
	ExtraServiceN921 ExtraService = 921
	ExtraServiceN922 ExtraService = 922
	ExtraServiceN923 ExtraService = 923
	ExtraServiceN924 ExtraService = 924
	ExtraServiceN925 ExtraService = 925
	ExtraServiceN930 ExtraService = 930
	ExtraServiceN931 ExtraService = 931
	ExtraServiceN934 ExtraService = 934
	ExtraServiceN955 ExtraService = 955
	ExtraServiceN957 ExtraService = 957
	ExtraServiceN981 ExtraService = 981
	ExtraServiceN986 ExtraService = 986
	ExtraServiceN991 ExtraService = 991
)

Defines values for ExtraService.

type ExtraServiceResponse

type ExtraServiceResponse = []struct {
	// SKU SKU of the extra service.
	SKU *string `json:"SKU,omitempty"`

	// Name Name of the extra service.
	Name *string `json:"name,omitempty"`

	// Price The price for the extra service.
	Price *float32 `json:"price,omitempty"`

	// Warnings Warnings and additional details around the Extra Services.
	Warnings *[]struct {
		// WarningCode Code corresponding to the warning
		WarningCode *string `json:"warningCode,omitempty"`

		// WarningDescription Warning or additional information regarding the Extra Service.
		WarningDescription *string `json:"warningDescription,omitempty"`
	} `json:"warnings,omitempty"`
}

ExtraServiceResponse Extra services requested on the mailpiece.

type GetListLabelBrandingParams

type GetListLabelBrandingParams struct {
	// Limit The number of items to return.
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`

	// Offset The number of items to skip before returning the results.
	Offset *int `form:"offset,omitempty" json:"offset,omitempty"`

	// OrderBy Sort results in ascending or descending order.
	OrderBy *GetListLabelBrandingParamsOrderBy `form:"orderBy,omitempty" json:"orderBy,omitempty"`

	// SortBy Sort by field, e.g., `imageName` or `createdDateTime`.
	SortBy *GetListLabelBrandingParamsSortBy `form:"sortBy,omitempty" json:"sortBy,omitempty"`

	// XPaymentAuthorizationToken Payment Authorization Token from the payments API Call.
	XPaymentAuthorizationToken XPaymentAuthorizationToken `json:"X-Payment-Authorization-Token"`
}

GetListLabelBrandingParams defines parameters for GetListLabelBranding.

type GetListLabelBrandingParamsOrderBy

type GetListLabelBrandingParamsOrderBy string

GetListLabelBrandingParamsOrderBy defines parameters for GetListLabelBranding.

Defines values for GetListLabelBrandingParamsOrderBy.

type GetListLabelBrandingParamsSortBy

type GetListLabelBrandingParamsSortBy string

GetListLabelBrandingParamsSortBy defines parameters for GetListLabelBranding.

const (
	GetListLabelBrandingParamsSortByCreatedDateTime GetListLabelBrandingParamsSortBy = "createdDateTime"
	GetListLabelBrandingParamsSortByImageName       GetListLabelBrandingParamsSortBy = "imageName"
)

Defines values for GetListLabelBrandingParamsSortBy.

type GetListLabelBrandingResponse

type GetListLabelBrandingResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *LabelBrandingGetListResponse
	XML200       *LabelBrandingGetListResponse
	JSON400      *ErrorMessage
	XML400       *ErrorMessage
	JSON401      *ErrorMessage
	XML401       *ErrorMessage
	JSON403      *ErrorMessage
	XML403       *ErrorMessage
	JSON429      *ErrorMessage
	XML429       *ErrorMessage
	JSON503      *ErrorMessage
	XML503       *ErrorMessage
}

func ParseGetListLabelBrandingResponse

func ParseGetListLabelBrandingResponse(rsp *http.Response) (*GetListLabelBrandingResponse, error)

ParseGetListLabelBrandingResponse parses an HTTP response from a GetListLabelBrandingWithResponse call

func (GetListLabelBrandingResponse) Status

Status returns HTTPResponse.Status

func (GetListLabelBrandingResponse) StatusCode

func (r GetListLabelBrandingResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetSingleLabelBrandingParams

type GetSingleLabelBrandingParams struct {
	// XPaymentAuthorizationToken Payment Authorization Token from the payments API Call.
	XPaymentAuthorizationToken XPaymentAuthorizationToken `json:"X-Payment-Authorization-Token"`
}

GetSingleLabelBrandingParams defines parameters for GetSingleLabelBranding.

type GetSingleLabelBrandingResponse

type GetSingleLabelBrandingResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *LabelBrandingGetImageResponse
	XML200       *LabelBrandingGetImageResponse
	JSON400      *ErrorMessage
	XML400       *ErrorMessage
	JSON401      *ErrorMessage
	XML401       *ErrorMessage
	JSON403      *ErrorMessage
	XML403       *ErrorMessage
	JSON429      *ErrorMessage
	XML429       *ErrorMessage
	JSON503      *ErrorMessage
	XML503       *ErrorMessage
}

func ParseGetSingleLabelBrandingResponse

func ParseGetSingleLabelBrandingResponse(rsp *http.Response) (*GetSingleLabelBrandingResponse, error)

ParseGetSingleLabelBrandingResponse parses an HTTP response from a GetSingleLabelBrandingWithResponse call

func (GetSingleLabelBrandingResponse) Status

Status returns HTTPResponse.Status

func (GetSingleLabelBrandingResponse) StatusCode

func (r GetSingleLabelBrandingResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type IMB

type IMB = string

IMB defines model for IMB.

type IMBCancelResponse

type IMBCancelResponse struct {
	// DisputeID The ID of the submitted refund request.
	//
	// Note:
	// - The disputeID field may not be returned for IMBs created prior to 8/27/2025.
	// - If a refund request is successfully submitted, a disputeID will be returned that can be used to then track the status of the refund request. The system will only give one unique disputeID per customer reference ID (CRID) per day. Duplicate submissions of the same label, for the same CRID, on the same day, will be rejected.
	// - In some cases, a disputeID may be generated before the IMB is processed for payment. If this occurs, please resubmit the IMB for cancellation the following day for a new disputeID.
	DisputeID *string `json:"disputeID,omitempty"`

	// Imb The Human-readable form of the Intelligent Mail Barcode (IMB) that has been canceled or for which a refund request has been submitted.
	Imb *string `json:"imb,omitempty"`

	// Status * `CANCELED` indicates that the IMB has been successfully canceled.
	// * `DISPUTED` indicates that a refund request has been submitted.
	//
	// Note:
	// - The `CANCELED` status has been deprecated.  All Cancel requests will have the `DISPUTED` status returned back for the refund request submission.
	Status *IMBCancelResponseStatus `json:"status,omitempty"`
}

IMBCancelResponse Cancel Intelligent Mail Barcode (IMB) Response

type IMBCancelResponseStatus

type IMBCancelResponseStatus string

IMBCancelResponseStatus * `CANCELED` indicates that the IMB has been successfully canceled. * `DISPUTED` indicates that a refund request has been submitted.

Note: - The `CANCELED` status has been deprecated. All Cancel requests will have the `DISPUTED` status returned back for the refund request submission.

const (
	IMBCancelResponseStatusCANCELED IMBCancelResponseStatus = "CANCELED"
	IMBCancelResponseStatusDISPUTED IMBCancelResponseStatus = "DISPUTED"
)

Defines values for IMBCancelResponseStatus.

type IMIType

type IMIType string

IMIType The type of Intelligent Mail Indicia (IMI) to be generated. The default option is `IMI_STD`. The `imiType` can be changed only when `imageInfo.labelType` is set to `IMI_DATA_ONLY`.

const (
	IMIMAX IMIType = "IMI_MAX"
	IMIMIN IMIType = "IMI_MIN"
	IMISTD IMIType = "IMI_STD"
)

Defines values for IMIType.

type ImageInfo

type ImageInfo struct {
	// AddImageComments Applicable only when `imageType` is `ZPL203DPI`, `ZPL300DPI`, or `EPL300DPI`.  When `addImageComments` is `true`, comments will be visible within the ZPL or EPL text response to the user to denote different sections of their label.  When `addImageComments` is `false`, no comments will be included in the ZPL or EPL text response.  This will be ignored for any other `imageType`.
	// Example of a ZPL comment:
	// `^FX Start of label. 123e4567-e89b-12d3-a456-426614174000 ^FS`
	AddImageComments *bool `json:"addImageComments,omitempty"`

	// AddZPLComments Note: This field has been deprecated in favor of `addImageComments`.
	//
	// Applicable only when `imageType` is `ZPL203DPI` or `ZPL300DPI`.  When `addZPLComments` is `true`, comments will be visible within the ZPL text response to the user to denote different sections of their label.  When `addZPLComments` is `false`, no comments will be included in the ZPL text response.  This will be ignored for any other `imageType`.
	//
	// Example of a ZPL comment:
	// `^FX Start of label. 123e4567-e89b-12d3-a456-426614174000 ^FS`
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	AddZPLComments *bool `json:"addZPLComments,omitempty"`

	// BrandingImageFormat The format of label branding images to be shown on the generated label image.
	//
	// Note:
	// * Label branding images will not be shown on labels with customs forms.
	// * Label branding images are not currently supported with an `imageType` of `ZPL203DPI`, `ZPL300DPI`, or `EPL300DPI`.
	// * Label branding images are not currently supported with a `labelType` of `4X4LABEL`.
	// * When a `brandingImageFormat` is provided with a Destination Entry Facility, the Drop-Off Location will not be displayed on the label.
	// * When a `brandingImageFormat` of `RECTANGLE` is provided, Customer Reference #3-#4 cannot be provided since they will not be shown.
	// * When a `brandingImageFormat` of `ONE_SQUARE` or `TWO_SQUARES` is provided, Customer Reference numbers will be shifted to the right to accommodate the image.
	// * When a `brandingImageFormat` of `RECTANGLE` is provided, Customer Reference numbers, package number, and total packages will not be displayed on the label.
	// * A `brandingImageFormat` of `ONE_SQUARE` is currently only supported with `labelType` of `4X6LABEL`, `4X5LABEL`, `6X4LABEL`, and `2X7LABEL` for both outbound and return labels.
	// * A `brandingImageFormat` of `TWO_SQUARES` is currently only supported with `labelType` of `4X6LABEL`, `4X5LABEL`, and `6X4LABEL` for both outbound and return labels.
	// * A `brandingImageFormat` of `RECTANGLE` is currently only supported with `labelType` of `4X6LABEL`, `4X5LABEL`, and `6X4LABEL` for outbound labels and `4X5LABEL` and `6X4LABEL` for return labels.
	BrandingImageFormat *ImageInfoBrandingImageFormat `json:"brandingImageFormat,omitempty"`

	// BrandingImageUUIDs The UUIDs associated with custom images uploaded in the Logo Branding endpoint: /branding
	//
	// Note:
	// * These UUIDs must have been created with the same Payment Authorization Label Owner CRID in use when creating the label
	// * When using `ONE_SQUARE` or `RECTANGLE` the brandingImageUUIDs list should include only one imageUUID string.
	// * When using `TWO_SQUARES` the brandingImageUUIDs list should include only two imageUUID strings.
	BrandingImageUUIDs *[]string `json:"brandingImageUUIDs,omitempty"`

	// ImageType The type of label image requested.  If omitted then the default image type is PDF.
	// * `PDF`
	// * `TIFF`
	// * `JPG`
	// * `PNG`
	// * `GIF`
	// * `SVG`
	// * `ZPL203DPI`
	// * `ZPL300DPI`
	// * `EPL300DPI`
	// * `LABEL_BROKER` - Request a USPS QR code to allow your customers with no access to a printer to print at participating Post Office Locations. All USPS API users and third-party integrators utilizing QR codes are subject to the [Label Broker terms and conditions](https://www.usps.com/terms-conditions/label-broker.htm). For more information please see the Label Broker guide available on [GitHub](https://github.com/USPS/api-examples/blob/main/USPS%20APIs%20Domestic%20Labels%20API%20Documentation_2023_0901%20Published.pdf) (Note: Only supports labelType of `4X6LABEL` or `6X4LABEL` and receiptOption of `NONE`).  A USPS Label Broker QR code image will be returned in the API response instead of a label image.
	// * `NONE`
	//
	// Note:
	// - Labels with customs forms only support formats of `PDF`, `TIFF`, `ZPL203DPI`, `ZPL300DPI`, `LABEL_BROKER`, and `NONE`.
	// - Including Extra Service Code `415 - USPS Label Delivery` returns no images and is equivalent to requesting `NONE`.
	// - `EPL300DPI` is not supported for Return Labels.
	// - When the `imageType` is set to `LABEL_BROKER`, the QR code's embedded URL will be returned in the `links` array of the response.
	ImageType *ImageInfoImageType `json:"imageType,omitempty"`

	// IncludeLabelBrokerPDF Applicable only when `imageType` is `LABEL_BROKER`. When `includeLabelBrokerPDF` is `true`, two label images will be returned in the multi-part and vendor response as `labelBrokerQR` and `labelImage`. `labelBrokerQR` will contain the base64 PNG of the Label Broker QR Code and `labelImage` will contain the base64 PDF of the Label stored in Label Broker. When `includeLabelBrokerPDF` is `false`, one image will be returned in the multi-part and vendor response as `labelImage` as the base64 PNG of the Label Broker QR Code.
	IncludeLabelBrokerPDF *bool `json:"includeLabelBrokerPDF,omitempty"`

	// LabelType Ability to select the label image size.  If omitted then the default label size is `4X6LABEL`.
	//
	// Note:
	//   * Currently, customs forms only support `4X6LABEL`.
	//   * The `labelType` of `2X7LABEL` is not supported with the `imageType` of `ZPL203DPI` or `ZPL300DPI`.
	//   * The `labelType` of `4X6LABEL` is the only supported format with the `imageType` of `EPL300DPI`.
	LabelType *ImageInfoLabelType `json:"labelType,omitempty"`

	// ReceiptOption Label & Receipt print out options: Enter `SAME_PAGE` to print the Label and the Receipt on a single page. Enter `SEPARATE_PAGE` to print the Label and the Receipt on separate pages. Enter `NONE` to print the Label only and no Receipt.
	//
	// Note:
	//   * The `labelType` of `4X4LABEL` or `6X4LABEL` with the image `imageType` of `ZPL203DPI` or `ZPL300DPI` does not support a `receiptOption` of `SEPARATE_PAGE`.
	//   * When `imageType` is `ZPL203DPI`, `ZPL300DPI`, or `EPL300DPI`, a `receiptOption` of `SAME_PAGE` is not supported.
	//   * When `imageType` is `ZPL203DPI`, `ZPL300DPI`, or `EPL300DPI` and `receiptOption` is `SEPARATE_PAGE`, the receipt will be returned as an additional label segment within the single ZPL or EPL payload in `labelImage`. In this case, `receiptImage` will not be populated.
	ReceiptOption *ImageInfoReceiptOption `json:"receiptOption,omitempty"`

	// ShipInfo indicates if revenue protection information is printed on the label. (true or false)
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	ShipInfo             *bool                  `json:"shipInfo,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

ImageInfo Additional details used to determine how to generate the label image.

func (ImageInfo) Get

func (a ImageInfo) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for ImageInfo. Returns the specified element and whether it was found

func (ImageInfo) MarshalJSON

func (a ImageInfo) MarshalJSON() ([]byte, error)

Override default JSON handling for ImageInfo to handle AdditionalProperties

func (*ImageInfo) Set

func (a *ImageInfo) Set(fieldName string, value interface{})

Setter for additional properties for ImageInfo

func (*ImageInfo) UnmarshalJSON

func (a *ImageInfo) UnmarshalJSON(b []byte) error

Override default JSON handling for ImageInfo to handle AdditionalProperties

type ImageInfoBrandingImageFormat

type ImageInfoBrandingImageFormat string

ImageInfoBrandingImageFormat The format of label branding images to be shown on the generated label image.

Note: * Label branding images will not be shown on labels with customs forms. * Label branding images are not currently supported with an `imageType` of `ZPL203DPI`, `ZPL300DPI`, or `EPL300DPI`. * Label branding images are not currently supported with a `labelType` of `4X4LABEL`. * When a `brandingImageFormat` is provided with a Destination Entry Facility, the Drop-Off Location will not be displayed on the label. * When a `brandingImageFormat` of `RECTANGLE` is provided, Customer Reference #3-#4 cannot be provided since they will not be shown. * When a `brandingImageFormat` of `ONE_SQUARE` or `TWO_SQUARES` is provided, Customer Reference numbers will be shifted to the right to accommodate the image. * When a `brandingImageFormat` of `RECTANGLE` is provided, Customer Reference numbers, package number, and total packages will not be displayed on the label. * A `brandingImageFormat` of `ONE_SQUARE` is currently only supported with `labelType` of `4X6LABEL`, `4X5LABEL`, `6X4LABEL`, and `2X7LABEL` for both outbound and return labels. * A `brandingImageFormat` of `TWO_SQUARES` is currently only supported with `labelType` of `4X6LABEL`, `4X5LABEL`, and `6X4LABEL` for both outbound and return labels. * A `brandingImageFormat` of `RECTANGLE` is currently only supported with `labelType` of `4X6LABEL`, `4X5LABEL`, and `6X4LABEL` for outbound labels and `4X5LABEL` and `6X4LABEL` for return labels.

const (
	ImageInfoBrandingImageFormatNONE       ImageInfoBrandingImageFormat = "NONE"
	ImageInfoBrandingImageFormatONESQUARE  ImageInfoBrandingImageFormat = "ONE_SQUARE"
	ImageInfoBrandingImageFormatRECTANGLE  ImageInfoBrandingImageFormat = "RECTANGLE"
	ImageInfoBrandingImageFormatTWOSQUARES ImageInfoBrandingImageFormat = "TWO_SQUARES"
)

Defines values for ImageInfoBrandingImageFormat.

type ImageInfoImageType

type ImageInfoImageType string

ImageInfoImageType The type of label image requested. If omitted then the default image type is PDF. * `PDF` * `TIFF` * `JPG` * `PNG` * `GIF` * `SVG` * `ZPL203DPI` * `ZPL300DPI` * `EPL300DPI` * `LABEL_BROKER` - Request a USPS QR code to allow your customers with no access to a printer to print at participating Post Office Locations. All USPS API users and third-party integrators utilizing QR codes are subject to the [Label Broker terms and conditions](https://www.usps.com/terms-conditions/label-broker.htm). For more information please see the Label Broker guide available on [GitHub](https://github.com/USPS/api-examples/blob/main/USPS%20APIs%20Domestic%20Labels%20API%20Documentation_2023_0901%20Published.pdf) (Note: Only supports labelType of `4X6LABEL` or `6X4LABEL` and receiptOption of `NONE`). A USPS Label Broker QR code image will be returned in the API response instead of a label image. * `NONE`

Note: - Labels with customs forms only support formats of `PDF`, `TIFF`, `ZPL203DPI`, `ZPL300DPI`, `LABEL_BROKER`, and `NONE`. - Including Extra Service Code `415 - USPS Label Delivery` returns no images and is equivalent to requesting `NONE`. - `EPL300DPI` is not supported for Return Labels. - When the `imageType` is set to `LABEL_BROKER`, the QR code's embedded URL will be returned in the `links` array of the response.

const (
	ImageInfoImageTypeEPL300DPI   ImageInfoImageType = "EPL300DPI"
	ImageInfoImageTypeGIF         ImageInfoImageType = "GIF"
	ImageInfoImageTypeJPG         ImageInfoImageType = "JPG"
	ImageInfoImageTypeLABELBROKER ImageInfoImageType = "LABEL_BROKER"
	ImageInfoImageTypeNONE        ImageInfoImageType = "NONE"
	ImageInfoImageTypePDF         ImageInfoImageType = "PDF"
	ImageInfoImageTypePNG         ImageInfoImageType = "PNG"
	ImageInfoImageTypeSVG         ImageInfoImageType = "SVG"
	ImageInfoImageTypeTIFF        ImageInfoImageType = "TIFF"
	ImageInfoImageTypeZPL203DPI   ImageInfoImageType = "ZPL203DPI"
	ImageInfoImageTypeZPL300DPI   ImageInfoImageType = "ZPL300DPI"
)

Defines values for ImageInfoImageType.

type ImageInfoLabelType

type ImageInfoLabelType string

ImageInfoLabelType Ability to select the label image size. If omitted then the default label size is `4X6LABEL`.

Note:

  • Currently, customs forms only support `4X6LABEL`.
  • The `labelType` of `2X7LABEL` is not supported with the `imageType` of `ZPL203DPI` or `ZPL300DPI`.
  • The `labelType` of `4X6LABEL` is the only supported format with the `imageType` of `EPL300DPI`.
const (
	ImageInfoLabelTypeN2X7LABEL ImageInfoLabelType = "2X7LABEL"
	ImageInfoLabelTypeN4X4LABEL ImageInfoLabelType = "4X4LABEL"
	ImageInfoLabelTypeN4X5LABEL ImageInfoLabelType = "4X5LABEL"
	ImageInfoLabelTypeN4X6LABEL ImageInfoLabelType = "4X6LABEL"
	ImageInfoLabelTypeN6X4LABEL ImageInfoLabelType = "6X4LABEL"
)

Defines values for ImageInfoLabelType.

type ImageInfoReceiptOption

type ImageInfoReceiptOption string

ImageInfoReceiptOption Label & Receipt print out options: Enter `SAME_PAGE` to print the Label and the Receipt on a single page. Enter `SEPARATE_PAGE` to print the Label and the Receipt on separate pages. Enter `NONE` to print the Label only and no Receipt.

Note:

  • The `labelType` of `4X4LABEL` or `6X4LABEL` with the image `imageType` of `ZPL203DPI` or `ZPL300DPI` does not support a `receiptOption` of `SEPARATE_PAGE`.
  • When `imageType` is `ZPL203DPI`, `ZPL300DPI`, or `EPL300DPI`, a `receiptOption` of `SAME_PAGE` is not supported.
  • When `imageType` is `ZPL203DPI`, `ZPL300DPI`, or `EPL300DPI` and `receiptOption` is `SEPARATE_PAGE`, the receipt will be returned as an additional label segment within the single ZPL or EPL payload in `labelImage`. In this case, `receiptImage` will not be populated.
const (
	ImageInfoReceiptOptionNONE         ImageInfoReceiptOption = "NONE"
	ImageInfoReceiptOptionSAMEPAGE     ImageInfoReceiptOption = "SAME_PAGE"
	ImageInfoReceiptOptionSEPARATEPAGE ImageInfoReceiptOption = "SEPARATE_PAGE"
)

Defines values for ImageInfoReceiptOption.

type IndiciaIMI

type IndiciaIMI = []byte

IndiciaIMI Base64 encoded string of the binary data used to create the Intelligent Mail Indicia (IMI) Data Matrix.

type IndiciaImbAddress

type IndiciaImbAddress struct {
	// ZIPCode This is the 5-digit ZIP code.
	ZIPCode *string `json:"ZIPCode,omitempty"`

	// ZIPPlus4 This is the 4-digit component of the ZIP+4 code. Using the correct Zip+4 reduces the number of times your mail is handled and can decrease the chance of a misdelivery or error.
	ZIPPlus4 *string `json:"ZIPPlus4"`

	// City This is the city name of the address.
	City *string `json:"city,omitempty"`

	// CityAbbreviation This is the abbreviation of city name for the address.
	CityAbbreviation *string `json:"cityAbbreviation,omitempty"`

	// Firm Firm/business name corresponding to the address.
	Firm *string `json:"firm,omitempty"`

	// FirstName First Name corresponding to the address.
	FirstName *string `json:"firstName,omitempty"`

	// IgnoreBadAddress Allows Non-Validated Street Address. Enter `true` to bypass street address validation failures/errors or `false` if only validated addresses should be allowed.
	//
	// Note: Integrators are recommended to always use `false` to ensure no delivery issues.
	//
	// In the event USPS cannot validate the street address, this tag will "bypass" address validation error when `true` is indicated to allow IMB indicia creation which could impact delivery.
	IgnoreBadAddress *bool `json:"ignoreBadAddress,omitempty"`

	// LastName Last Name corresponding to the address.
	LastName *string `json:"lastName,omitempty"`

	// SecondaryAddress The secondary unit designator, such as apartment(APT) or suite(STE) number, defining the exact location of the address within a building.  For more information please see [Postal Explorer](https://pe.usps.com/text/pub28/28c2_003.htm).
	SecondaryAddress *string `json:"secondaryAddress,omitempty"`

	// State This is the two-character state code of the address.
	State *State `json:"state,omitempty"`

	// StreetAddress The number of a building along with the name of the road or street on which it is located.
	StreetAddress *string `json:"streetAddress,omitempty"`

	// StreetAddressAbbreviation This is the abbreviation of street address line for the address.
	StreetAddressAbbreviation *string `json:"streetAddressAbbreviation,omitempty"`

	// Urbanization An area, sector, or residential development within a geographic area (typically used for addresses in Puerto Rico).
	Urbanization         *string                `json:"urbanization,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

IndiciaImbAddress defines model for IndiciaImbAddress.

func (IndiciaImbAddress) Get

func (a IndiciaImbAddress) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for IndiciaImbAddress. Returns the specified element and whether it was found

func (IndiciaImbAddress) MarshalJSON

func (a IndiciaImbAddress) MarshalJSON() ([]byte, error)

Override default JSON handling for IndiciaImbAddress to handle AdditionalProperties

func (*IndiciaImbAddress) Set

func (a *IndiciaImbAddress) Set(fieldName string, value interface{})

Setter for additional properties for IndiciaImbAddress

func (*IndiciaImbAddress) UnmarshalJSON

func (a *IndiciaImbAddress) UnmarshalJSON(b []byte) error

Override default JSON handling for IndiciaImbAddress to handle AdditionalProperties

type IndiciaImbExtraService

type IndiciaImbExtraService int

IndiciaImbExtraService Extra Service Code requested for IMB letters, flats, and cards.

  • 910 - Certified Mail
  • 911 - Certified Mail Restricted Delivery
  • 930 - Insurance
  • 934 - Insurance Restricted Delivery
  • 940 - Registered Mail
  • 941 - Registered Mail Restricted Delivery
  • 955 - Return Receipt
  • 957 - Return Receipt Electronic

Note:

  • When the extra service code "930" is provided in the request, if the item value is over $500, "930" will automatically be replaced with "931" - Insurance (Greater than $500).
const (
	IndiciaImbExtraServiceN910 IndiciaImbExtraService = 910
	IndiciaImbExtraServiceN911 IndiciaImbExtraService = 911
	IndiciaImbExtraServiceN930 IndiciaImbExtraService = 930
	IndiciaImbExtraServiceN934 IndiciaImbExtraService = 934
	IndiciaImbExtraServiceN940 IndiciaImbExtraService = 940
	IndiciaImbExtraServiceN941 IndiciaImbExtraService = 941
	IndiciaImbExtraServiceN955 IndiciaImbExtraService = 955
	IndiciaImbExtraServiceN957 IndiciaImbExtraService = 957
)

Defines values for IndiciaImbExtraService.

type IndiciaImbImageInfo

type IndiciaImbImageInfo struct {
	// ImageType The image type to be created.  If omitted then the default image type is PDF.
	ImageType *IndiciaImbImageInfoImageType `json:"imageType,omitempty"`

	// LabelType The requested image size.
	// - Using `6X4LABEL` will return the image in the `indiciaImage` response field.
	// - Using `IMI_DATA_ONLY` will return the IMI data in the `indiciaIMI` response field and not populate the `indiciaImage` or `receiptImage` field.
	LabelType *IndiciaImbImageInfoLabelType `json:"labelType,omitempty"`

	// ReceiptOption Indicia & Receipt print out options: Enter `SEPARATE_PAGE` to print the Indicia and the Receipt on separate pages. Enter `NONE` to print the Indicia only and no Receipt.
	//
	// Note:
	// - `NONE` is the only option supported when `labelType` is set to `IMI_DATA_ONLY`.
	// - `NONE` is the only option supported when `imageType` is set to `ZPL203DPI` or `ZPL300DPI`.
	ReceiptOption        *IndiciaImbImageInfoReceiptOption `json:"receiptOption,omitempty"`
	AdditionalProperties map[string]interface{}            `json:"-"`
}

IndiciaImbImageInfo Additional details used to determine how to generate the indicia image.

func (IndiciaImbImageInfo) Get

func (a IndiciaImbImageInfo) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for IndiciaImbImageInfo. Returns the specified element and whether it was found

func (IndiciaImbImageInfo) MarshalJSON

func (a IndiciaImbImageInfo) MarshalJSON() ([]byte, error)

Override default JSON handling for IndiciaImbImageInfo to handle AdditionalProperties

func (*IndiciaImbImageInfo) Set

func (a *IndiciaImbImageInfo) Set(fieldName string, value interface{})

Setter for additional properties for IndiciaImbImageInfo

func (*IndiciaImbImageInfo) UnmarshalJSON

func (a *IndiciaImbImageInfo) UnmarshalJSON(b []byte) error

Override default JSON handling for IndiciaImbImageInfo to handle AdditionalProperties

type IndiciaImbImageInfoImageType

type IndiciaImbImageInfoImageType string

IndiciaImbImageInfoImageType The image type to be created. If omitted then the default image type is PDF.

const (
	IndiciaImbImageInfoImageTypeGIF       IndiciaImbImageInfoImageType = "GIF"
	IndiciaImbImageInfoImageTypeJPG       IndiciaImbImageInfoImageType = "JPG"
	IndiciaImbImageInfoImageTypePDF       IndiciaImbImageInfoImageType = "PDF"
	IndiciaImbImageInfoImageTypePNG       IndiciaImbImageInfoImageType = "PNG"
	IndiciaImbImageInfoImageTypeSVG       IndiciaImbImageInfoImageType = "SVG"
	IndiciaImbImageInfoImageTypeTIFF      IndiciaImbImageInfoImageType = "TIFF"
	IndiciaImbImageInfoImageTypeZPL203DPI IndiciaImbImageInfoImageType = "ZPL203DPI"
	IndiciaImbImageInfoImageTypeZPL300DPI IndiciaImbImageInfoImageType = "ZPL300DPI"
)

Defines values for IndiciaImbImageInfoImageType.

type IndiciaImbImageInfoLabelType

type IndiciaImbImageInfoLabelType string

IndiciaImbImageInfoLabelType The requested image size. - Using `6X4LABEL` will return the image in the `indiciaImage` response field. - Using `IMI_DATA_ONLY` will return the IMI data in the `indiciaIMI` response field and not populate the `indiciaImage` or `receiptImage` field.

const (
	IndiciaImbImageInfoLabelTypeIMIDATAONLY IndiciaImbImageInfoLabelType = "IMI_DATA_ONLY"
	IndiciaImbImageInfoLabelTypeN6X4LABEL   IndiciaImbImageInfoLabelType = "6X4LABEL"
)

Defines values for IndiciaImbImageInfoLabelType.

type IndiciaImbImageInfoReceiptOption

type IndiciaImbImageInfoReceiptOption string

IndiciaImbImageInfoReceiptOption Indicia & Receipt print out options: Enter `SEPARATE_PAGE` to print the Indicia and the Receipt on separate pages. Enter `NONE` to print the Indicia only and no Receipt.

Note: - `NONE` is the only option supported when `labelType` is set to `IMI_DATA_ONLY`. - `NONE` is the only option supported when `imageType` is set to `ZPL203DPI` or `ZPL300DPI`.

const (
	IndiciaImbImageInfoReceiptOptionNONE         IndiciaImbImageInfoReceiptOption = "NONE"
	IndiciaImbImageInfoReceiptOptionSEPARATEPAGE IndiciaImbImageInfoReceiptOption = "SEPARATE_PAGE"
)

Defines values for IndiciaImbImageInfoReceiptOption.

type IndiciaImbRequest

type IndiciaImbRequest struct {
	// ImageInfo Additional details used to determine how to generate the indicia image.
	ImageInfo *IndiciaImbImageInfo `json:"imageInfo,omitempty"`

	// IndiciaDescription Indicia intelligent mail barcode request description
	IndiciaDescription IndiciaImbRequestDescription `json:"indiciaDescription"`

	// ReturnAddress The address where the letter, flat, or card is being mailed from.  Address elements streetAddress, city, state, ZIPCode are required.  First and Last Name or Firm are also required.
	ReturnAddress IndiciaImbAddress `json:"returnAddress"`

	// ToAddress The address where the letter, flat, or card is being mailed to. Address elements streetAddress, city, state, ZIPCode are required.  First and Last Name or Firm are also required.
	ToAddress IndiciaImbAddress `json:"toAddress"`
}

IndiciaImbRequest Indicia IMB request for letters, flats, and cards First-Class mailings.

type IndiciaImbRequestDescription

type IndiciaImbRequestDescription struct {
	// ExtraServices Extra Service Code requested for IMB letters, flats, and cards.
	//
	//   * 910 - Certified Mail
	//   * 911 - Certified Mail Restricted Delivery
	//   * 930 - Insurance
	//   * 934 - Insurance Restricted Delivery
	//   * 940 - Registered Mail
	//   * 941 - Registered Mail Restricted Delivery
	//   * 955 - Return Receipt
	//   * 957 - Return Receipt Electronic
	//
	// Note:
	//   * When the extra service code "930" is provided in the request, if the item value is over $500, "930" will automatically be replaced with "931" - Insurance (Greater than $500).
	//   * Some service codes require a combination with extra services such as "955" and "957". For all valid combinations, visit [https://postalpro.usps.com/IMPB_Service_Type_Codes](https://postalpro.usps.com/IMPB_Service_Type_Codes).
	ExtraServices *[]IndiciaImbExtraService `json:"extraServices,omitempty"`

	// Height The letter/flat/card height in inches.  The height is the dimension perpendicular to the length.
	Height float64 `json:"height"`

	// ImiType The type of Intelligent Mail Indicia (IMI) to be generated.  The default option is `IMI_STD`.  The `imiType` can be changed only when `imageInfo.labelType` is set to `IMI_DATA_ONLY`.
	ImiType *IMIType `json:"imiType,omitempty"`

	// ItemValue Value of the letter, flat, or card in USD.
	//
	// Note:
	//   * This value must be set if extra service codes 930 (Insurance) or 934 (Insurance (Restricted Delivery)) are in the extraServices field.
	ItemValue *float32 `json:"itemValue,omitempty"`

	// Length The letter/flat/card length in inches.  For  `LETTERS` and `CARDS` the length is the dimension parallel to the delivery address as read. For  `FLATS` the length is the longest dimension.
	Length float64 `json:"length"`

	// MailingDate Mailing Date Indicia Options
	MailingDate MailingDateIndiciaOptions `json:"mailingDate"`

	// NonMachinableIndicators Set of boolean indicators used to determine whether a letter qualifies as nonmachinable.
	NonMachinableIndicators *struct {
		// HasClosureDevices Does the letter/flat/card have clasps, strings, buttons, or similar closure devices.
		HasClosureDevices *bool `json:"hasClosureDevices,omitempty"`

		// HasLooseItems Does the letter/flat/card contain items such as pens, pencils, keys, or coins that cause the thickness of the mailpiece to be uneven; or loose keys or coins or similar objects not affixed to the contents within the mailpiece. Loose items may cause a letter to be nonmailable when mailed in paper envelopes; (see [DMM 601.3.3](https://pe.usps.com/text/dmm300/601.htm#ep1196660)).
		HasLooseItems *bool `json:"hasLooseItems,omitempty"`

		// IsBooklet Is the letter/flat/card a booklet that is not prepared according to [DMM 201.3.16](https://pe.usps.com/text/dmm300/201.htm#ep1092751).
		IsBooklet *bool `json:"isBooklet,omitempty"`

		// IsPolybagged Is the letter/flat/card polybagged, polywrapped, enclosed in any plastic material, or has an exterior surface made of a material that is not paper. Windows in envelopes made of paper do not make mailpieces nonmachinable. Attachments allowable under applicable eligibility standards do not make mailpieces nonmachinable.
		IsPolybagged *bool `json:"isPolybagged,omitempty"`

		// IsRigid Is the letter/flat/card too rigid (does not bend easily when subjected to a transport belt tension of 40 pounds around an 11-inch diameter turn).
		IsRigid *bool `json:"isRigid,omitempty"`

		// IsSelfMailer Is the letter/flat/card a self-mailer that is not prepared according to [DMM 201.3.14](https://pe.usps.com/text/dmm300/201.htm#ep1079302).
		IsSelfMailer *bool `json:"isSelfMailer,omitempty"`
	} `json:"nonMachinableIndicators,omitempty"`

	// ProcessingCategory * LETTERS
	//
	//   To be eligible for mailing at the price for letters, a piece must be:
	//     * Rectangular
	//     * At least 3-1/2 inches high x 5 inches long x 0.007 inch thick.
	//     * No more than 6-1/8 inches high x 11-1/2 inches long x 1/4 inch thick.
	//
	//   For additional information on letters, please refer to the [Postal Explorer](https://pe.usps.com/businessmail101?ViewName=Letters).
	//
	// * FLATS
	//
	//   The Postal Service uses the word "flats" to refer to large envelopes, newsletters, and magazines. The words large envelopes and flats are used interchangeably. Whatever you call them, flats must:
	//
	//     * Have one dimension that is greater than 6-1/8 inches high OR 11-½ inches long OR ¼ inch thick.
	//     * Be no more than 12 inches high x 15 inches long x ¾ inch thick.
	//
	//   For additional information on flats, please refer to the [Postal Explorer](https://pe.usps.com/businessmail101?ViewName=Flats).
	//
	// * CARDS
	//
	//   To be eligible for mailing at the price for postcards, a piece must be:
	//     * Rectangular
	//     * At least 3-1/2 inches high x 5 inches long x 0.007 inch thick.
	//     * No more than 4-1/4 inches high x 6 inches long x 0.016 inch thick.
	//
	//   For additional information on postcards, please refer to the [Postal Explorer](https://pe.usps.com/businessmail101?ViewName=Cards).
	ProcessingCategory IndiciaImbRequestDescriptionProcessingCategory `json:"processingCategory"`

	// Thickness The letter/flat/card thickness in inches. The minimum dimension is always the thickness.
	Thickness float64 `json:"thickness"`

	// Weight The letter/flat/card weight, in ounces. The maximum weight of a letter and cards is 3.5 oz and the maximum weight of a flat is 13 oz.
	Weight float32 `json:"weight"`
}

IndiciaImbRequestDescription Indicia intelligent mail barcode request description

type IndiciaImbRequestDescriptionProcessingCategory

type IndiciaImbRequestDescriptionProcessingCategory string

IndiciaImbRequestDescriptionProcessingCategory * LETTERS

To be eligible for mailing at the price for letters, a piece must be:
  * Rectangular
  * At least 3-1/2 inches high x 5 inches long x 0.007 inch thick.
  * No more than 6-1/8 inches high x 11-1/2 inches long x 1/4 inch thick.

For additional information on letters, please refer to the [Postal Explorer](https://pe.usps.com/businessmail101?ViewName=Letters).

* FLATS

The Postal Service uses the word "flats" to refer to large envelopes, newsletters, and magazines. The words large envelopes and flats are used interchangeably. Whatever you call them, flats must:

  * Have one dimension that is greater than 6-1/8 inches high OR 11-½ inches long OR ¼ inch thick.
  * Be no more than 12 inches high x 15 inches long x ¾ inch thick.

For additional information on flats, please refer to the [Postal Explorer](https://pe.usps.com/businessmail101?ViewName=Flats).

* CARDS

To be eligible for mailing at the price for postcards, a piece must be:
  * Rectangular
  * At least 3-1/2 inches high x 5 inches long x 0.007 inch thick.
  * No more than 4-1/4 inches high x 6 inches long x 0.016 inch thick.

For additional information on postcards, please refer to the [Postal Explorer](https://pe.usps.com/businessmail101?ViewName=Cards).
const (
	IndiciaImbRequestDescriptionProcessingCategoryCARDS   IndiciaImbRequestDescriptionProcessingCategory = "CARDS"
	IndiciaImbRequestDescriptionProcessingCategoryFLATS   IndiciaImbRequestDescriptionProcessingCategory = "FLATS"
	IndiciaImbRequestDescriptionProcessingCategoryLETTERS IndiciaImbRequestDescriptionProcessingCategory = "LETTERS"
)

Defines values for IndiciaImbRequestDescriptionProcessingCategory.

type IndiciaImbResponse

type IndiciaImbResponse struct {
	// IndiciaImage Contains the Base64-encoded file contents of the indicia image. Provided only when `imageInfo.labelType` is not `IMI_DATA_ONLY`.
	IndiciaImage *[]byte `json:"indiciaImage,omitempty"`

	// IndiciaMetadata Metadata for indicia
	IndiciaMetadata *struct {
		// SKU Pricing SKU
		SKU *string `json:"SKU,omitempty"`

		// BannerText Banner text printed on the label.
		BannerText *string `json:"bannerText,omitempty"`

		// ConstructCode The barcode construct code associated with the tracking number.
		//
		// Notes:
		//   - This field will be absent from the response if the request does not include extra services.
		ConstructCode *string `json:"constructCode,omitempty"`

		// ExtraServices Extra services requested on the mailpiece.
		ExtraServices *ExtraServiceResponse `json:"extraServices,omitempty"`

		// Fees Fees associated to the mailpiece.
		Fees *[]struct {
			// SKU Pricing SKU for the fee.
			SKU *string `json:"SKU,omitempty"`

			// Name Name of the fee.
			Name *string `json:"name,omitempty"`

			// Price The price for the fee.
			Price *float32 `json:"price,omitempty"`
		} `json:"fees,omitempty"`

		// Imb Human-readable form of the intelligent mail barcode (IMB) value.
		Imb *string `json:"imb,omitempty"`

		// IndiciaIMI Base64 encoded string of the binary data used to create the Intelligent Mail Indicia (IMI) Data Matrix.
		IndiciaIMI *IndiciaIMI `json:"indiciaIMI,omitempty"`

		// MailClass The mail class of the indicia.
		MailClass interface{} `json:"mailClass,omitempty"`

		// Postage Amount of postage required, does not include insurance or other extra service fees.
		Postage *float32 `json:"postage,omitempty"`

		// ReturnAddress The `returnAddress` from the request that will be printed on the letter, flat, or card.
		ReturnAddress *IndiciaImbAddress `json:"returnAddress,omitempty"`

		// ServiceTypeCode The Service Type Code associated with the mailpiece. A list of Service Type Codes can be found at: [https://postalpro.usps.com/IMPB_Service_Type_Codes](https://postalpro.usps.com/IMPB_Service_Type_Codes)
		ServiceTypeCode *string `json:"serviceTypeCode,omitempty"`

		// ToAddress The `toAddress` from the request that will be printed on the letter, flat, or card.
		ToAddress *IndiciaImbAddress `json:"toAddress,omitempty"`

		// TotalPrice Total price of the indicia, including postage and any fees.
		TotalPrice *float32 `json:"totalPrice,omitempty"`

		// TrackingNumber Human-readable form of the intelligent mail package barcode (IMPB) value.
		//
		// Notes:
		//   - This field will be absent from the response if the request does not include extra services.
		TrackingNumber *string `json:"trackingNumber,omitempty"`

		// Warnings Warnings and additional details around the Label.
		Warnings *Warnings `json:"warnings,omitempty"`

		// Weight The mailpiece weight, in ounces.
		Weight *float32 `json:"weight,omitempty"`
	} `json:"indiciaMetadata,omitempty"`

	// ReceiptImage Contains the Base64-encoded file contents of the indicia receipt image. Provided only when `imageInfo.receiptOption` is `SEPARATE_PAGE`.
	ReceiptImage *[]byte `json:"receiptImage,omitempty"`
}

IndiciaImbResponse defines model for IndiciaImbResponse.

type IndiciaRequest

type IndiciaRequest struct {
	// ImageInfo Additional details used to determine how to generate the indicia image.
	ImageInfo *struct {
		// ImageType The type of indicia image requested. If omitted then the default image type is PDF.
		ImageType *IndiciaRequestImageInfoImageType `json:"imageType,omitempty"`

		// LabelType Ability to select the indicia image size.  If omitted then the default indicia size is 2X1.5LABEL.
		// - Using `2X1.5LABEL` will return the image in the `indiciaImage` response field.
		// - Using `IMI_DATA_ONLY` will return the IMI data in the `indiciaIMI` response field and not populate the `indiciaImage` field.
		LabelType *IndiciaRequestImageInfoLabelType `json:"labelType,omitempty"`

		// ReceiptOption Indicia & Receipt print out options.
		//
		// Enter `SEPARATE_PAGE` to print the Indicia and the Receipt on separate pages. Enter `NONE` to print the Indicia only and no Receipt.
		//
		// Note:
		// - `NONE` is the only option supported when `imageType` is set to `ZPL203DPI` or `ZPL300DPI`.
		ReceiptOption *IndiciaRequestImageInfoReceiptOption `json:"receiptOption,omitempty"`
	} `json:"imageInfo,omitempty"`

	// IndiciaDescription The `IndiciaRequestDescription` object defines the physical dimensions, mailing date, processing category, and weight required for processing a First-Class letter, flat, or card.
	IndiciaDescription   IndiciaRequestDescription `json:"indiciaDescription"`
	AdditionalProperties map[string]interface{}    `json:"-"`
}

IndiciaRequest Indicia request for letters, flats, and cards First-Class mailings.

func (IndiciaRequest) Get

func (a IndiciaRequest) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for IndiciaRequest. Returns the specified element and whether it was found

func (IndiciaRequest) MarshalJSON

func (a IndiciaRequest) MarshalJSON() ([]byte, error)

Override default JSON handling for IndiciaRequest to handle AdditionalProperties

func (*IndiciaRequest) Set

func (a *IndiciaRequest) Set(fieldName string, value interface{})

Setter for additional properties for IndiciaRequest

func (*IndiciaRequest) UnmarshalJSON

func (a *IndiciaRequest) UnmarshalJSON(b []byte) error

Override default JSON handling for IndiciaRequest to handle AdditionalProperties

type IndiciaRequestDescription

type IndiciaRequestDescription struct {
	// Height The letter/flat/card height in inches.  The height is the dimension perpendicular to the length.
	Height float64 `json:"height"`

	// ImiType The type of Intelligent Mail Indicia (IMI) to be generated.  The default option is `IMI_STD`.  The `imiType` can be changed only when `imageInfo.labelType` is set to `IMI_DATA_ONLY`.
	ImiType *IMIType `json:"imiType,omitempty"`

	// Length The letter/flat/card length in inches.  For  `LETTERS` and `CARDS` the length is the dimension parallel to the delivery address as read. For  `FLATS` the length is the longest dimension.
	Length float64 `json:"length"`

	// MailingDate Mailing Date Indicia Options
	MailingDate MailingDateIndiciaOptions `json:"mailingDate"`

	// NonMachinableIndicators Set of boolean indicators used to determine whether a letter qualifies as nonmachinable.
	NonMachinableIndicators *struct {
		// HasClosureDevices Does the letter/flat/card have clasps, strings, buttons, or similar closure devices.
		HasClosureDevices *bool `json:"hasClosureDevices,omitempty"`

		// HasLooseItems Does the letter/flat/card contain items such as pens, pencils, keys, or coins that cause the thickness of the mailpiece to be uneven; or loose keys or coins or similar objects not affixed to the contents within the mailpiece. Loose items may cause a letter to be nonmailable when mailed in paper envelopes; (see [DMM 601.3.3](https://pe.usps.com/text/dmm300/601.htm#ep1196660)).
		HasLooseItems *bool `json:"hasLooseItems,omitempty"`

		// IsBooklet Is the letter/flat/card a booklet that is not prepared according to [DMM 201.3.16](https://pe.usps.com/text/dmm300/201.htm#ep1092751).
		IsBooklet *bool `json:"isBooklet,omitempty"`

		// IsPolybagged Is the letter/flat/card polybagged, polywrapped, enclosed in any plastic material, or has an exterior surface made of a material that is not paper. Windows in envelopes made of paper do not make mailpieces nonmachinable. Attachments allowable under applicable eligibility standards do not make mailpieces nonmachinable.
		IsPolybagged *bool `json:"isPolybagged,omitempty"`

		// IsRigid Is the letter/flat/card too rigid (does not bend easily when subjected to a transport belt tension of 40 pounds around an 11-inch diameter turn).
		IsRigid *bool `json:"isRigid,omitempty"`

		// IsSelfMailer Is the letter/flat/card a self-mailer that is not prepared according to [DMM 201.3.14](https://pe.usps.com/text/dmm300/201.htm#ep1079302).
		IsSelfMailer *bool `json:"isSelfMailer,omitempty"`
	} `json:"nonMachinableIndicators,omitempty"`

	// ProcessingCategory * LETTERS
	//
	//   To be eligible for mailing at the price for letters, a piece must be:
	//     * Rectangular
	//     * At least 3-1/2 inches high x 5 inches long x 0.007 inch thick.
	//     * No more than 6-1/8 inches high x 11-1/2 inches long x 1/4 inch thick.
	//
	//   For additional information on letters, please refer to the [Postal Explorer](https://pe.usps.com/businessmail101?ViewName=Letters).
	//
	// * FLATS
	//
	//   The Postal Service uses the word "flats" to refer to large envelopes, newsletters, and magazines. The words large envelopes and flats are used interchangeably. Whatever you call them, flats must:
	//
	//     * Have one dimension that is greater than 6-1/8 inches high OR 11-½ inches long OR ¼ inch thick.
	//     * Be no more than 12 inches high x 15 inches long x ¾ inch thick.
	//
	//   For additional information on flats, please refer to the [Postal Explorer](https://pe.usps.com/businessmail101?ViewName=Flats).
	//
	// * CARDS
	//
	//   To be eligible for mailing at the price for postcards, a piece must be:
	//     * Rectangular
	//     * At least 3-1/2 inches high x 5 inches long x 0.007 inch thick.
	//     * No more than 4-1/4 inches high x 6 inches long x 0.016 inch thick.
	//
	//   For additional information on postcards, please refer to the [Postal Explorer](https://pe.usps.com/businessmail101?ViewName=Cards).
	ProcessingCategory IndiciaRequestDescriptionProcessingCategory `json:"processingCategory"`

	// Thickness The letter/flat/card thickness in inches. The minimum dimension is always the thickness.
	Thickness float64 `json:"thickness"`

	// Weight The letter/flat/card weight, in ounces. The maximum weight of a letter or card is 3.5 oz and the maximum weight of a flat is 13 oz.
	Weight float32 `json:"weight"`
}

IndiciaRequestDescription The `IndiciaRequestDescription` object defines the physical dimensions, mailing date, processing category, and weight required for processing a First-Class letter, flat, or card.

type IndiciaRequestDescriptionProcessingCategory

type IndiciaRequestDescriptionProcessingCategory string

IndiciaRequestDescriptionProcessingCategory * LETTERS

To be eligible for mailing at the price for letters, a piece must be:
  * Rectangular
  * At least 3-1/2 inches high x 5 inches long x 0.007 inch thick.
  * No more than 6-1/8 inches high x 11-1/2 inches long x 1/4 inch thick.

For additional information on letters, please refer to the [Postal Explorer](https://pe.usps.com/businessmail101?ViewName=Letters).

* FLATS

The Postal Service uses the word "flats" to refer to large envelopes, newsletters, and magazines. The words large envelopes and flats are used interchangeably. Whatever you call them, flats must:

  * Have one dimension that is greater than 6-1/8 inches high OR 11-½ inches long OR ¼ inch thick.
  * Be no more than 12 inches high x 15 inches long x ¾ inch thick.

For additional information on flats, please refer to the [Postal Explorer](https://pe.usps.com/businessmail101?ViewName=Flats).

* CARDS

To be eligible for mailing at the price for postcards, a piece must be:
  * Rectangular
  * At least 3-1/2 inches high x 5 inches long x 0.007 inch thick.
  * No more than 4-1/4 inches high x 6 inches long x 0.016 inch thick.

For additional information on postcards, please refer to the [Postal Explorer](https://pe.usps.com/businessmail101?ViewName=Cards).
const (
	IndiciaRequestDescriptionProcessingCategoryCARDS   IndiciaRequestDescriptionProcessingCategory = "CARDS"
	IndiciaRequestDescriptionProcessingCategoryFLATS   IndiciaRequestDescriptionProcessingCategory = "FLATS"
	IndiciaRequestDescriptionProcessingCategoryLETTERS IndiciaRequestDescriptionProcessingCategory = "LETTERS"
)

Defines values for IndiciaRequestDescriptionProcessingCategory.

type IndiciaRequestImageInfoImageType

type IndiciaRequestImageInfoImageType string

IndiciaRequestImageInfoImageType The type of indicia image requested. If omitted then the default image type is PDF.

const (
	IndiciaRequestImageInfoImageTypeGIF       IndiciaRequestImageInfoImageType = "GIF"
	IndiciaRequestImageInfoImageTypeJPG       IndiciaRequestImageInfoImageType = "JPG"
	IndiciaRequestImageInfoImageTypePDF       IndiciaRequestImageInfoImageType = "PDF"
	IndiciaRequestImageInfoImageTypePNG       IndiciaRequestImageInfoImageType = "PNG"
	IndiciaRequestImageInfoImageTypeSVG       IndiciaRequestImageInfoImageType = "SVG"
	IndiciaRequestImageInfoImageTypeTIFF      IndiciaRequestImageInfoImageType = "TIFF"
	IndiciaRequestImageInfoImageTypeZPL203DPI IndiciaRequestImageInfoImageType = "ZPL203DPI"
	IndiciaRequestImageInfoImageTypeZPL300DPI IndiciaRequestImageInfoImageType = "ZPL300DPI"
)

Defines values for IndiciaRequestImageInfoImageType.

type IndiciaRequestImageInfoLabelType

type IndiciaRequestImageInfoLabelType string

IndiciaRequestImageInfoLabelType Ability to select the indicia image size. If omitted then the default indicia size is 2X1.5LABEL. - Using `2X1.5LABEL` will return the image in the `indiciaImage` response field. - Using `IMI_DATA_ONLY` will return the IMI data in the `indiciaIMI` response field and not populate the `indiciaImage` field.

const (
	IMIDATAONLY IndiciaRequestImageInfoLabelType = "IMI_DATA_ONLY"
	N2X15LABEL  IndiciaRequestImageInfoLabelType = "2X1.5LABEL"
)

Defines values for IndiciaRequestImageInfoLabelType.

type IndiciaRequestImageInfoReceiptOption

type IndiciaRequestImageInfoReceiptOption string

IndiciaRequestImageInfoReceiptOption Indicia & Receipt print out options.

Enter `SEPARATE_PAGE` to print the Indicia and the Receipt on separate pages. Enter `NONE` to print the Indicia only and no Receipt.

Note: - `NONE` is the only option supported when `imageType` is set to `ZPL203DPI` or `ZPL300DPI`.

const (
	IndiciaRequestImageInfoReceiptOptionNONE         IndiciaRequestImageInfoReceiptOption = "NONE"
	IndiciaRequestImageInfoReceiptOptionSEPARATEPAGE IndiciaRequestImageInfoReceiptOption = "SEPARATE_PAGE"
)

Defines values for IndiciaRequestImageInfoReceiptOption.

type IndiciaResponse

type IndiciaResponse struct {
	// IndiciaImage Contains the Base64-encoded file contents of the indicia image.
	IndiciaImage *[]byte `json:"indiciaImage,omitempty"`

	// IndiciaMetadata Metadata for the generated indicia.
	IndiciaMetadata *struct {
		// SKU Pricing SKU
		SKU *string `json:"SKU,omitempty"`

		// Fees Fees associated to the mailpiece.
		Fees *[]struct {
			// SKU Pricing SKU for the fee.
			SKU *string `json:"SKU,omitempty"`

			// Name Name of the fee.
			Name *string `json:"name,omitempty"`

			// Price The price for the fee.
			Price *float32 `json:"price,omitempty"`
		} `json:"fees,omitempty"`

		// IndiciaIMI Base64 encoded string of the binary data used to create the Intelligent Mail Indicia (IMI) Data Matrix.
		IndiciaIMI *IndiciaIMI `json:"indiciaIMI,omitempty"`

		// Postage Amount of postage required, does not include insurance or other extra service fees.
		Postage *float32 `json:"postage,omitempty"`

		// Weight The mailpiece weight, in ounces.
		Weight *float32 `json:"weight,omitempty"`
	} `json:"indiciaMetadata,omitempty"`

	// ReceiptImage Contains the Base64-encoded file contents of the label receipt image. Provided only when `imageInfo.receiptOption` is `SEPARATE_PAGE`.
	ReceiptImage *[]byte `json:"receiptImage,omitempty"`
}

IndiciaResponse The IndiciaResponse object contains metadata for the generated First-Class indicia.

type InductionZIPCode

type InductionZIPCode = string

InductionZIPCode The 5-Digit ZIP Code representing the location where the package is being inducted (i.e. dropped off) into the mailstream. When provided, this ZIP Code will be used for pricing instead of `fromAddress.ZIPCode`.

type LabelBrandingDeleteResponse

type LabelBrandingDeleteResponse struct {
	// ImageName The name of the image that was successfully deleted.
	ImageName *string `json:"imageName,omitempty"`

	// ImageUUID The UUID of the image that was successfully deleted.
	ImageUUID *string `json:"imageUUID,omitempty"`
}

LabelBrandingDeleteResponse Label Branding Image Delete Response

type LabelBrandingGetImageResponse

type LabelBrandingGetImageResponse struct {
	// CreatedDateTime The time that the image was created.
	CreatedDateTime *time.Time `json:"createdDateTime,omitempty"`

	// ImageData The base64 image data associated with your image.
	ImageData *string `json:"imageData,omitempty"`

	// ImageName The descriptor text that was optionally associated with the image when the image was created.
	ImageName *string `json:"imageName,omitempty"`

	// ImageUUID UUID of the image. Used in Domestic Labels and Return Labels requests to apply an image to a label.
	ImageUUID *string `json:"imageUUID,omitempty"`
}

LabelBrandingGetImageResponse Response schema for getting a single label branding image.

type LabelBrandingGetListResponse

type LabelBrandingGetListResponse struct {
	// Images List of all label branding image names associated with the USPS Customer Registration ID (CRID).
	Images *[]struct {
		// CreatedDateTime The datetime that the image was created.
		CreatedDateTime *time.Time `json:"createdDateTime,omitempty"`

		// ImageData The base64 image data associated with your image.
		ImageData *string `json:"imageData,omitempty"`

		// ImageName The descriptor text that was optionally associated with the image when the image was created.
		ImageName *string `json:"imageName,omitempty"`

		// ImageUUID UUID of the image. Used in Domestic Labels and Return Labels requests to apply an image to a label.
		ImageUUID *string `json:"imageUUID,omitempty"`
	} `json:"images,omitempty"`

	// Limit Current limit on number of included results.
	Limit *int `json:"limit,omitempty"`

	// Offset Number of items skipped.
	Offset *int `json:"offset,omitempty"`

	// TotalCount Total number of items.
	TotalCount *int `json:"totalCount,omitempty"`
}

LabelBrandingGetListResponse Paginated response schema for getting a list of label branding images.

type LabelBrandingImageUUID

type LabelBrandingImageUUID = string

LabelBrandingImageUUID defines model for LabelBrandingImageUUID.

type LabelBrandingPatchResponse

type LabelBrandingPatchResponse struct {
	// CreatedDateTime The time that the image was created.
	CreatedDateTime *time.Time `json:"createdDateTime,omitempty"`

	// ImageData The base64 image data associated with your image.
	ImageData *string `json:"imageData,omitempty"`

	// ImageName The name of the image that was successfully renamed.
	ImageName *string `json:"imageName,omitempty"`

	// ImageUUID The UUID of the image that was successfully renamed.
	ImageUUID *string `json:"imageUUID,omitempty"`
}

LabelBrandingPatchResponse Label Branding Image Patch Response

type LabelBrandingUploadRequest

type LabelBrandingUploadRequest struct {
	// ImageData The plaintext contents of an .svg file base64 encoded. The image must be less than 10kb in size.
	ImageData string `json:"imageData"`

	// ImageName An optional descriptor for the image.
	//
	// Additional requirements:
	// * No special characters or spaces
	// * No more than 50 characters in length
	ImageName *string `json:"imageName,omitempty"`
}

LabelBrandingUploadRequest Label Branding Image Upload Request

type LabelBrandingUploadResponse

type LabelBrandingUploadResponse struct {
	// ImageName The name of the image that was successfully uploaded.
	ImageName *string `json:"imageName,omitempty"`

	// ImageUUID The auto generated UUID of the image that was successfully uploaded.
	ImageUUID *string `json:"imageUUID,omitempty"`
}

LabelBrandingUploadResponse Label Branding Image Upload Response

type LabelMetadata

type LabelMetadata struct {
	// SKU Pricing SKU.
	SKU *string `json:"SKU,omitempty"`

	// BannerText Banner text printed on the label.
	BannerText *string `json:"bannerText,omitempty"`

	// Commitment The commitment and scheduled delivery date of the package.
	Commitment *Commitment `json:"commitment,omitempty"`

	// ConstructCode The barcode construct code associated with the tracking number.
	ConstructCode *string `json:"constructCode,omitempty"`

	// DimensionalWeight The dimensional weight of the package, if greater than specified in weight, in ounces.
	DimensionalWeight *float32 `json:"dimensionalWeight,omitempty"`

	// ExtraServices Extra services requested on the mailpiece.
	ExtraServices *ExtraServiceResponse `json:"extraServices,omitempty"`

	// Fees Fees associated with the package.
	Fees *[]struct {
		// SKU Pricing SKU.
		SKU *string `json:"SKU,omitempty"`

		// Name Name of the fee.
		Name *string `json:"name,omitempty"`

		// Price The price for the fee.
		Price *float32 `json:"price,omitempty"`
	} `json:"fees,omitempty"`

	// InductionType The permit holder induction type.
	InductionType *map[string]interface{} `json:"inductionType,omitempty"`

	// LabelAddress The address where the package is being shipped from. The ZIP Code™ in the `fromAddress` object is used to calculate pricing.
	//
	// Notes:
	// * The First and Last Name or Firm Name are always required.
	// * If the `returnAddress` is not provided, the `fromAddress` will be used as the `returnAddress`.
	// * If the `returnLabel` field is set to “true”, then the `fromAddress` ZIP Plus 4 is looked up by the API, unless the `ignoreBadAddress` field is set to true or the address cannot be found. If `ignoreBadAddress` field is true then ZIP Plus 4 is required.
	LabelAddress *DomesticLabelAddress `json:"labelAddress,omitempty"`

	// LabelBrokerID Unique Label Broker ID that can be used as an alternative to the Label Broker QR Code to retrieve the label at a Post Office. Will only be provided when an imageType of LABEL_BROKER is requested.
	LabelBrokerID *string `json:"labelBrokerID,omitempty"`

	// Links Hypermedia links to related resources.
	Links *Links `json:"links,omitempty"`

	// MailingDate The date on which the package will be mailed as provided in the request. If the time was not provided, it will be defaulted to 10:00 p.m. local time.
	MailingDate *time.Time `json:"mailingDate,omitempty"`

	// PermitHolderName The permit holder name.
	PermitHolderName *string `json:"permitHolderName,omitempty"`

	// Postage Amount of Postage Required, does not include insurance or other extra service fees.
	Postage *float32 `json:"postage,omitempty"`

	// RetailDistributionCode Retail Description Code associated with label.
	RetailDistributionCode *string `json:"retailDistributionCode,omitempty"`

	// ReturnReceiptTrackingNumber The human-readable version of the return Receipt tracking number.
	//
	// * Note: This will be included in the response when `packageOptions.returnReceiptTracking` is set to true in the request.
	ReturnReceiptTrackingNumber *string `json:"returnReceiptTrackingNumber,omitempty"`

	// RoutingInformation The "420" 3-digit GS1 Application Identifier and the 5 or 9 digit Destination ZIP Code&#8482;.
	RoutingInformation *string `json:"routingInformation,omitempty"`

	// ServiceTypeCode The Service Type Code associated with the package. A list of Service Type Codes can be found at: [https://postalpro.usps.com/IMPB_Service_Type_Codes](https://postalpro.usps.com/IMPB_Service_Type_Codes).
	ServiceTypeCode *string `json:"serviceTypeCode,omitempty"`

	// TrackingNumber The human-readable version of the package tracking number.
	TrackingNumber *string `json:"trackingNumber,omitempty"`

	// Warnings Warnings and additional details around the Label.
	Warnings *Warnings `json:"warnings,omitempty"`

	// Weight The package weight, in weightUOM. Items must weigh 70 pounds (1120 ounces) or less.
	Weight *float32 `json:"weight,omitempty"`

	// WeightUOM Weight Unit of Measurement
	//    * lb - Pounds
	WeightUOM *string `json:"weightUOM,omitempty"`

	// Zone Indicates the calculated zone used for pricing between the provided `originZIPCode` and `destinationZIPCode` for a given `mailClass`, `mailingDate`, `rateIndicator`, and `weight`.
	Zone                 *string                `json:"zone,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

LabelMetadata Label Metadata returned from label creation and label edit.

func (LabelMetadata) Get

func (a LabelMetadata) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for LabelMetadata. Returns the specified element and whether it was found

func (LabelMetadata) MarshalJSON

func (a LabelMetadata) MarshalJSON() ([]byte, error)

Override default JSON handling for LabelMetadata to handle AdditionalProperties

func (*LabelMetadata) Set

func (a *LabelMetadata) Set(fieldName string, value interface{})

Setter for additional properties for LabelMetadata

func (*LabelMetadata) UnmarshalJSON

func (a *LabelMetadata) UnmarshalJSON(b []byte) error

Override default JSON handling for LabelMetadata to handle AdditionalProperties

type LabelMultiPartResponse

type LabelMultiPartResponse struct {
	// LabelBrokerQR The Label Broker QR Code image, Base64 encoded file contents. Only provided if `imageType` in the `imageInfo` is set to `LABEL_BROKER`.
	LabelBrokerQR *[]byte `json:"labelBrokerQR,omitempty"`

	// LabelImage Contains the Base64-encoded file contents of the label image. Provided only when `imageInfo.imageType` is not `NONE`.
	//
	// Note:
	// - Not provided when Extra Service Code `415 - USPS Label Delivery` is requested, as no images are returned for this service.
	LabelImage *[]byte `json:"labelImage,omitempty"`

	// LabelMetadata Label Metadata returned from label creation and label edit.
	LabelMetadata *LabelMetadata `json:"labelMetadata,omitempty"`

	// ReceiptImage Contains the Base64-encoded file contents of the label receipt image. Provided only when `imageInfo.receiptOption` is `SEPARATE_PAGE`.
	//
	// Note:
	// - When `imageInfo.imageType` is `ZPL203DPI`, `ZPL300DPI`, or `EPL300DPI` and `imageInfo.receiptOption` is `SEPARATE_PAGE`, the receipt will be returned as an additional label segment within the single ZPL or EPL payload in `labelImage`. In this case, `receiptImage` will not be populated.
	// - Not provided when Extra Service Code `415 - USPS Label Delivery` is requested, as no images are returned for this service.
	ReceiptImage *[]byte `json:"receiptImage,omitempty"`

	// ReturnLabelImage Contains the Base64-encoded file contents of the return label image. Provided only when `imageInfo.returnLabel` is `true` and `imageInfo.imageType` is not `NONE`.
	ReturnLabelImage *[]byte `json:"returnLabelImage,omitempty"`

	// ReturnLabelMetadata Return Label Metadata
	ReturnLabelMetadata *ReturnLabelMetadata `json:"returnLabelMetadata,omitempty"`

	// ReturnReceiptImage Contains the Base64-encoded file contents of the return receipt image. Provided only when `imageInfo.returnLabel` is `true` and `imageInfo.receiptOption` is `SEPARATE_PAGE`.
	//
	// Note:
	// - When `imageInfo.imageType` is `ZPL203DPI` or `ZPL300DPI` and `imageInfo.receiptOption` is `SEPARATE_PAGE`, the receipt will be returned as an additional label segment within the single ZPL payload in `labelImage`. In this case, `receiptImage` will not be populated.
	ReturnReceiptImage *[]byte `json:"returnReceiptImage,omitempty"`
}

LabelMultiPartResponse defines model for LabelMultiPartResponse.

type LabelReprintDomesticOutboundResponse

type LabelReprintDomesticOutboundResponse struct {
	// LabelImage Contains the Base64-encoded file contents of the label image.
	LabelImage *[]byte `json:"labelImage,omitempty"`

	// LabelMetadata Label Metadata returned from label creation and label edit.
	LabelMetadata *LabelMetadata `json:"labelMetadata,omitempty"`

	// ReprintInfo Schema containing reprint information for a label.
	ReprintInfo *ReprintInfo `json:"reprintInfo,omitempty"`
}

LabelReprintDomesticOutboundResponse Response schema for outbound label reprint requests.

type LabelReprintDomesticReturnResponse

type LabelReprintDomesticReturnResponse struct {
	// ReprintInfo Schema containing reprint information for a label.
	ReprintInfo *ReprintInfo `json:"reprintInfo,omitempty"`

	// ReturnLabelImage Contains the Base64-encoded file contents of the return label image.
	ReturnLabelImage *[]byte `json:"returnLabelImage,omitempty"`

	// ReturnLabelMetadata Return Label Metadata
	ReturnLabelMetadata *ReturnLabelMetadata `json:"returnLabelMetadata,omitempty"`
}

LabelReprintDomesticReturnResponse Response schema for return label reprint requests.

type LabelReprintImageInfo

type LabelReprintImageInfo struct {
	// BrandingImageFormat The format of label branding images to be shown on the generated label image.
	//
	// Note:
	// * Label branding images will not be shown on labels with customs forms.
	// * Label branding images are not currently supported with an `imageType` of `ZPL203DPI`, `ZPL300DPI`, or `EPL300DPI`.
	// * Label branding images are not currently supported with a `labelType` of `4X4LABEL`.
	// * When a `brandingImageFormat` is provided with a Destination Entry Facility, the Drop-Off Location will not be displayed on the label.
	// * When a `brandingImageFormat` of `RECTANGLE` is provided, Customer Reference #3-#4 cannot be provided since they will not be shown.
	// * When a `brandingImageFormat` of `ONE_SQUARE` or `TWO_SQUARES` is provided, Customer Reference numbers will be shifted to the right to accommodate the image.
	// * When a `brandingImageFormat` of `RECTANGLE` is provided, Customer Reference numbers, package number, and total packages will not be displayed on the label.
	// * A `brandingImageFormat` of `ONE_SQUARE` is currently only supported with `labelType` of `4X6LABEL`, `4X5LABEL`, `6X4LABEL`, and `2X7LABEL` for both outbound and return labels.
	// * A `brandingImageFormat` of `TWO_SQUARES` is currently only supported with `labelType` of `4X6LABEL`, `4X5LABEL`, and `6X4LABEL` for both outbound and return labels.
	// * A `brandingImageFormat` of `RECTANGLE` is currently only supported with `labelType` of `4X6LABEL`, `4X5LABEL`, and `6X4LABEL` for outbound labels and `4X5LABEL` and `6X4LABEL` for return labels.
	BrandingImageFormat *LabelReprintImageInfoBrandingImageFormat `json:"brandingImageFormat,omitempty"`

	// BrandingImageUUIDs The UUIDs associated with custom images uploaded in the Logo Branding endpoint: /branding
	//
	// Note:
	// * These UUIDs must have been created with the same Payment Authorization Label Owner CRID in use when creating the label
	// * When using `ONE_SQUARE` or `RECTANGLE` the brandingImageUUIDs list should include only one imageUUID string.
	// * When using `TWO_SQUARES` the brandingImageUUIDs list should include only two imageUUID strings.
	BrandingImageUUIDs *[]string `json:"brandingImageUUIDs,omitempty"`

	// ImageType The type of label image requested. If omitted then the default image type is PDF.
	//
	// Note:
	// - Labels with customs forms only support formats of `PDF`, `TIFF`, `ZPL203DPI`, and `ZPL300DPI`.
	ImageType *LabelReprintImageInfoImageType `json:"imageType,omitempty"`

	// LabelType Ability to select the label image size. If omitted then the default label size is `4X6LABEL`.
	//
	// Note:
	//   * Currently, customs forms only support `4X6LABEL`.
	//   * The `labelType` of `2X7LABEL` is not supported with the `imageType` of `ZPL203DPI` or `ZPL300DPI`.
	//   * The `labelType` of `4X6LABEL` is the only supported format with the `imageType` of `EPL300DPI`.
	LabelType *LabelReprintImageInfoLabelType `json:"labelType,omitempty"`

	// PackageNumber The package number in a series such as 1 of 3, 2 of 3, etc.  If `totalPackages` is populated then `packageNumber` is required.  `packageNumber` must be less than or equal to `totalPackages`.  This feature is not supported on the 2x7 or 4x4 label format.
	//
	// Note:
	// * When `packageNumber` is provided with a Destination Entry Facility, the Drop-Off Location will not be displayed on the label.
	PackageNumber *int `json:"packageNumber,omitempty"`

	// SuppressMailDate Indicates if the `mailingDate` is printed on the label.  If omitted then the value will default to true.
	//
	// Note:
	//  * Mail Date cannot be suppressed on Domestic Customs Forms. The customs form will always display the Date of Mailing.
	//  * The date the label was created cannot be suppressed and will always print on the label.
	SuppressMailDate *bool `json:"suppressMailDate,omitempty"`

	// SuppressPostage Indicates if postage is printed on the label. If omitted then the request will be defaulted to true.
	SuppressPostage *bool `json:"suppressPostage,omitempty"`

	// TotalPackages The total number of packages in a series such as 999.  If packageNumber is populated then totalPackages is required.  totalPackages must be greater than or equal to packageNumber.  This feature is not supported by the 2x7 or 4x4 label format.
	TotalPackages *int `json:"totalPackages,omitempty"`
}

LabelReprintImageInfo Label Reprint Image Info

type LabelReprintImageInfoBrandingImageFormat

type LabelReprintImageInfoBrandingImageFormat string

LabelReprintImageInfoBrandingImageFormat The format of label branding images to be shown on the generated label image.

Note: * Label branding images will not be shown on labels with customs forms. * Label branding images are not currently supported with an `imageType` of `ZPL203DPI`, `ZPL300DPI`, or `EPL300DPI`. * Label branding images are not currently supported with a `labelType` of `4X4LABEL`. * When a `brandingImageFormat` is provided with a Destination Entry Facility, the Drop-Off Location will not be displayed on the label. * When a `brandingImageFormat` of `RECTANGLE` is provided, Customer Reference #3-#4 cannot be provided since they will not be shown. * When a `brandingImageFormat` of `ONE_SQUARE` or `TWO_SQUARES` is provided, Customer Reference numbers will be shifted to the right to accommodate the image. * When a `brandingImageFormat` of `RECTANGLE` is provided, Customer Reference numbers, package number, and total packages will not be displayed on the label. * A `brandingImageFormat` of `ONE_SQUARE` is currently only supported with `labelType` of `4X6LABEL`, `4X5LABEL`, `6X4LABEL`, and `2X7LABEL` for both outbound and return labels. * A `brandingImageFormat` of `TWO_SQUARES` is currently only supported with `labelType` of `4X6LABEL`, `4X5LABEL`, and `6X4LABEL` for both outbound and return labels. * A `brandingImageFormat` of `RECTANGLE` is currently only supported with `labelType` of `4X6LABEL`, `4X5LABEL`, and `6X4LABEL` for outbound labels and `4X5LABEL` and `6X4LABEL` for return labels.

const (
	LabelReprintImageInfoBrandingImageFormatNONE       LabelReprintImageInfoBrandingImageFormat = "NONE"
	LabelReprintImageInfoBrandingImageFormatONESQUARE  LabelReprintImageInfoBrandingImageFormat = "ONE_SQUARE"
	LabelReprintImageInfoBrandingImageFormatRECTANGLE  LabelReprintImageInfoBrandingImageFormat = "RECTANGLE"
	LabelReprintImageInfoBrandingImageFormatTWOSQUARES LabelReprintImageInfoBrandingImageFormat = "TWO_SQUARES"
)

Defines values for LabelReprintImageInfoBrandingImageFormat.

type LabelReprintImageInfoImageType

type LabelReprintImageInfoImageType string

LabelReprintImageInfoImageType The type of label image requested. If omitted then the default image type is PDF.

Note: - Labels with customs forms only support formats of `PDF`, `TIFF`, `ZPL203DPI`, and `ZPL300DPI`.

const (
	LabelReprintImageInfoImageTypeEPL300DPI LabelReprintImageInfoImageType = "EPL300DPI"
	LabelReprintImageInfoImageTypeGIF       LabelReprintImageInfoImageType = "GIF"
	LabelReprintImageInfoImageTypeJPG       LabelReprintImageInfoImageType = "JPG"
	LabelReprintImageInfoImageTypePDF       LabelReprintImageInfoImageType = "PDF"
	LabelReprintImageInfoImageTypePNG       LabelReprintImageInfoImageType = "PNG"
	LabelReprintImageInfoImageTypeSVG       LabelReprintImageInfoImageType = "SVG"
	LabelReprintImageInfoImageTypeTIFF      LabelReprintImageInfoImageType = "TIFF"
	LabelReprintImageInfoImageTypeZPL203DPI LabelReprintImageInfoImageType = "ZPL203DPI"
	LabelReprintImageInfoImageTypeZPL300DPI LabelReprintImageInfoImageType = "ZPL300DPI"
)

Defines values for LabelReprintImageInfoImageType.

type LabelReprintImageInfoLabelType

type LabelReprintImageInfoLabelType string

LabelReprintImageInfoLabelType Ability to select the label image size. If omitted then the default label size is `4X6LABEL`.

Note:

  • Currently, customs forms only support `4X6LABEL`.
  • The `labelType` of `2X7LABEL` is not supported with the `imageType` of `ZPL203DPI` or `ZPL300DPI`.
  • The `labelType` of `4X6LABEL` is the only supported format with the `imageType` of `EPL300DPI`.
const (
	LabelReprintImageInfoLabelTypeN2X7LABEL LabelReprintImageInfoLabelType = "2X7LABEL"
	LabelReprintImageInfoLabelTypeN4X4LABEL LabelReprintImageInfoLabelType = "4X4LABEL"
	LabelReprintImageInfoLabelTypeN4X5LABEL LabelReprintImageInfoLabelType = "4X5LABEL"
	LabelReprintImageInfoLabelTypeN4X6LABEL LabelReprintImageInfoLabelType = "4X6LABEL"
	LabelReprintImageInfoLabelTypeN6X4LABEL LabelReprintImageInfoLabelType = "6X4LABEL"
)

Defines values for LabelReprintImageInfoLabelType.

type LabelReprintMultiPartResponse

type LabelReprintMultiPartResponse struct {
	// LabelImage Contains the Base64-encoded file contents of the label image.
	LabelImage *[]byte `json:"labelImage,omitempty"`

	// LabelMetadata Label Metadata returned from label creation and label edit.
	LabelMetadata *LabelMetadata `json:"labelMetadata,omitempty"`

	// ReprintInfo Schema containing reprint information for a label.
	ReprintInfo *ReprintInfo `json:"reprintInfo,omitempty"`

	// ReturnLabelImage Contains the Base64-encoded file contents of the return label image.
	ReturnLabelImage *[]byte `json:"returnLabelImage,omitempty"`

	// ReturnLabelMetadata Return Label Metadata
	ReturnLabelMetadata *ReturnLabelMetadata `json:"returnLabelMetadata,omitempty"`
}

LabelReprintMultiPartResponse Label Reprint Multipart response. `labelMetadata` and `labelImage` are returned for outbound label reprint requests. `returnLabelMetadata` and `returnLabelImage` are returned for return label reprint requests.

type LabelReprintRequest

type LabelReprintRequest struct {
	// ImageInfo Label Reprint Image Info
	ImageInfo *LabelReprintImageInfo `json:"imageInfo,omitempty"`
}

LabelReprintRequest Request schema for reprinting a domestic label.

type LabelRequest

type LabelRequest struct {
	// CustomsForm Domestic Customs Form
	CustomsForm *DomesticCustomsForm `json:"customsForm,omitempty"`

	// FromAddress The address where the package is being shipped from. The ZIP Code™ in the `fromAddress` object is used to calculate pricing.
	//
	// Notes:
	// * The First and Last Name or Firm Name are always required.
	// * If the `returnAddress` is not provided, the `fromAddress` will be used as the `returnAddress`.
	// * If the `returnLabel` field is set to “true”, then the `fromAddress` ZIP Plus 4 is looked up by the API, unless the `ignoreBadAddress` field is set to true or the address cannot be found. If `ignoreBadAddress` field is true then ZIP Plus 4 is required.
	FromAddress DomesticLabelAddress `json:"fromAddress"`

	// ImageInfo Image Information
	ImageInfo *LabelRequest_ImageInfo `json:"imageInfo,omitempty"`

	// PackageDescription Package description
	PackageDescription LabelRequest_PackageDescription `json:"packageDescription"`

	// ReturnAddress The address where the package should be returned to if it is deemed undeliverable or returned to sender. This address will be printed in the return address block of the label.
	//
	// Note:
	// * The First and Last Name or Firm Name are always required.
	ReturnAddress *DomesticLabelAddress `json:"returnAddress,omitempty"`

	// SenderAddress The address of the business involved. The senderAddress can be different from the fromAddress when the business address is not where the package is being shipped from.
	//
	// Notes:
	// - The First and Last Name or Firm Name are always required.
	// - `senderAddress` is required when the `shipperVisibilityMethod` field is set to `SENDER_INFORMATION`.
	SenderAddress *DomesticLabelSenderAddress `json:"senderAddress,omitempty"`

	// ToAddress The address where the package is being shipped to. The ZIP Code™ in the `toAddress` object is used to calculate pricing.
	//
	// Notes:
	// * The First and Last Name or Firm are always required.
	// * Address elements `streetAddress`, `city`, `state`, `ZIPCode` are required unless a parcel locker is requested in which case the `facilityId`, Recipient Email, First and Last Name or Firm are required.
	// * If the `holdForPickup` field is set to `true` then the `toAddress` object `facilityID`, `email`, and `phone` fields as well as the `fromAddress` object `firstName`, `lastName`, `email`, and `phone` fields are required.
	ToAddress DomesticLabelToAddress `json:"toAddress"`
}

LabelRequest Destination address of the recipient. Used in pricing as the destination ZIP Code&#8482;.

type LabelRequestImageInfoBrandingImageFormat

type LabelRequestImageInfoBrandingImageFormat string

LabelRequestImageInfoBrandingImageFormat The format of label branding images to be shown on the generated label image.

Note: * Label branding images will not be shown on labels with customs forms. * Label branding images are not currently supported with an `imageType` of `ZPL203DPI`, `ZPL300DPI`, or `EPL300DPI`. * Label branding images are not currently supported with a `labelType` of `4X4LABEL`. * When a `brandingImageFormat` is provided with a Destination Entry Facility, the Drop-Off Location will not be displayed on the label. * When a `brandingImageFormat` of `RECTANGLE` is provided, Customer Reference #3-#4 cannot be provided since they will not be shown. * When a `brandingImageFormat` of `ONE_SQUARE` or `TWO_SQUARES` is provided, Customer Reference numbers will be shifted to the right to accommodate the image. * When a `brandingImageFormat` of `RECTANGLE` is provided, Customer Reference numbers, package number, and total packages will not be displayed on the label. * A `brandingImageFormat` of `ONE_SQUARE` is currently only supported with `labelType` of `4X6LABEL`, `4X5LABEL`, `6X4LABEL`, and `2X7LABEL` for both outbound and return labels. * A `brandingImageFormat` of `TWO_SQUARES` is currently only supported with `labelType` of `4X6LABEL`, `4X5LABEL`, and `6X4LABEL` for both outbound and return labels. * A `brandingImageFormat` of `RECTANGLE` is currently only supported with `labelType` of `4X6LABEL`, `4X5LABEL`, and `6X4LABEL` for outbound labels and `4X5LABEL` and `6X4LABEL` for return labels.

const (
	LabelRequestImageInfoBrandingImageFormatNONE       LabelRequestImageInfoBrandingImageFormat = "NONE"
	LabelRequestImageInfoBrandingImageFormatONESQUARE  LabelRequestImageInfoBrandingImageFormat = "ONE_SQUARE"
	LabelRequestImageInfoBrandingImageFormatRECTANGLE  LabelRequestImageInfoBrandingImageFormat = "RECTANGLE"
	LabelRequestImageInfoBrandingImageFormatTWOSQUARES LabelRequestImageInfoBrandingImageFormat = "TWO_SQUARES"
)

Defines values for LabelRequestImageInfoBrandingImageFormat.

type LabelRequestImageInfoImageType

type LabelRequestImageInfoImageType string

LabelRequestImageInfoImageType The type of label image requested. If omitted then the default image type is PDF. * `PDF` * `TIFF` * `JPG` * `PNG` * `GIF` * `SVG` * `ZPL203DPI` * `ZPL300DPI` * `EPL300DPI` * `LABEL_BROKER` - Request a USPS QR code to allow your customers with no access to a printer to print at participating Post Office Locations. All USPS API users and third-party integrators utilizing QR codes are subject to the [Label Broker terms and conditions](https://www.usps.com/terms-conditions/label-broker.htm). For more information please see the Label Broker guide available on [GitHub](https://github.com/USPS/api-examples/blob/main/USPS%20APIs%20Domestic%20Labels%20API%20Documentation_2023_0901%20Published.pdf) (Note: Only supports labelType of `4X6LABEL` or `6X4LABEL` and receiptOption of `NONE`). A USPS Label Broker QR code image will be returned in the API response instead of a label image. * `NONE`

Note: - Labels with customs forms only support formats of `PDF`, `TIFF`, `ZPL203DPI`, `ZPL300DPI`, `LABEL_BROKER`, and `NONE`. - Including Extra Service Code `415 - USPS Label Delivery` returns no images and is equivalent to requesting `NONE`. - `EPL300DPI` is not supported for Return Labels. - When the `imageType` is set to `LABEL_BROKER`, the QR code's embedded URL will be returned in the `links` array of the response.

const (
	LabelRequestImageInfoImageTypeEPL300DPI   LabelRequestImageInfoImageType = "EPL300DPI"
	LabelRequestImageInfoImageTypeGIF         LabelRequestImageInfoImageType = "GIF"
	LabelRequestImageInfoImageTypeJPG         LabelRequestImageInfoImageType = "JPG"
	LabelRequestImageInfoImageTypeLABELBROKER LabelRequestImageInfoImageType = "LABEL_BROKER"
	LabelRequestImageInfoImageTypeNONE        LabelRequestImageInfoImageType = "NONE"
	LabelRequestImageInfoImageTypePDF         LabelRequestImageInfoImageType = "PDF"
	LabelRequestImageInfoImageTypePNG         LabelRequestImageInfoImageType = "PNG"
	LabelRequestImageInfoImageTypeSVG         LabelRequestImageInfoImageType = "SVG"
	LabelRequestImageInfoImageTypeTIFF        LabelRequestImageInfoImageType = "TIFF"
	LabelRequestImageInfoImageTypeZPL203DPI   LabelRequestImageInfoImageType = "ZPL203DPI"
	LabelRequestImageInfoImageTypeZPL300DPI   LabelRequestImageInfoImageType = "ZPL300DPI"
)

Defines values for LabelRequestImageInfoImageType.

type LabelRequestImageInfoLabelType

type LabelRequestImageInfoLabelType string

LabelRequestImageInfoLabelType Ability to select the label image size. If omitted then the default label size is `4X6LABEL`.

Note:

  • Currently, customs forms only support `4X6LABEL`.
  • The `labelType` of `2X7LABEL` is not supported with the `imageType` of `ZPL203DPI` or `ZPL300DPI`.
  • The `labelType` of `4X6LABEL` is the only supported format with the `imageType` of `EPL300DPI`.
const (
	LabelRequestImageInfoLabelTypeN2X7LABEL LabelRequestImageInfoLabelType = "2X7LABEL"
	LabelRequestImageInfoLabelTypeN4X4LABEL LabelRequestImageInfoLabelType = "4X4LABEL"
	LabelRequestImageInfoLabelTypeN4X5LABEL LabelRequestImageInfoLabelType = "4X5LABEL"
	LabelRequestImageInfoLabelTypeN4X6LABEL LabelRequestImageInfoLabelType = "4X6LABEL"
	LabelRequestImageInfoLabelTypeN6X4LABEL LabelRequestImageInfoLabelType = "6X4LABEL"
)

Defines values for LabelRequestImageInfoLabelType.

type LabelRequestImageInfoReceiptOption

type LabelRequestImageInfoReceiptOption string

LabelRequestImageInfoReceiptOption Label & Receipt print out options: Enter `SAME_PAGE` to print the Label and the Receipt on a single page. Enter `SEPARATE_PAGE` to print the Label and the Receipt on separate pages. Enter `NONE` to print the Label only and no Receipt.

Note:

  • The `labelType` of `4X4LABEL` or `6X4LABEL` with the image `imageType` of `ZPL203DPI` or `ZPL300DPI` does not support a `receiptOption` of `SEPARATE_PAGE`.
  • When `imageType` is `ZPL203DPI`, `ZPL300DPI`, or `EPL300DPI`, a `receiptOption` of `SAME_PAGE` is not supported.
  • When `imageType` is `ZPL203DPI`, `ZPL300DPI`, or `EPL300DPI` and `receiptOption` is `SEPARATE_PAGE`, the receipt will be returned as an additional label segment within the single ZPL or EPL payload in `labelImage`. In this case, `receiptImage` will not be populated.
const (
	LabelRequestImageInfoReceiptOptionNONE         LabelRequestImageInfoReceiptOption = "NONE"
	LabelRequestImageInfoReceiptOptionSAMEPAGE     LabelRequestImageInfoReceiptOption = "SAME_PAGE"
	LabelRequestImageInfoReceiptOptionSEPARATEPAGE LabelRequestImageInfoReceiptOption = "SEPARATE_PAGE"
)

Defines values for LabelRequestImageInfoReceiptOption.

type LabelRequest_ImageInfo

type LabelRequest_ImageInfo struct {
	// AddImageComments Applicable only when `imageType` is `ZPL203DPI`, `ZPL300DPI`, or `EPL300DPI`.  When `addImageComments` is `true`, comments will be visible within the ZPL or EPL text response to the user to denote different sections of their label.  When `addImageComments` is `false`, no comments will be included in the ZPL or EPL text response.  This will be ignored for any other `imageType`.
	// Example of a ZPL comment:
	// `^FX Start of label. 123e4567-e89b-12d3-a456-426614174000 ^FS`
	AddImageComments *bool `json:"addImageComments,omitempty"`

	// AddZPLComments Note: This field has been deprecated in favor of `addImageComments`.
	//
	// Applicable only when `imageType` is `ZPL203DPI` or `ZPL300DPI`.  When `addZPLComments` is `true`, comments will be visible within the ZPL text response to the user to denote different sections of their label.  When `addZPLComments` is `false`, no comments will be included in the ZPL text response.  This will be ignored for any other `imageType`.
	//
	// Example of a ZPL comment:
	// `^FX Start of label. 123e4567-e89b-12d3-a456-426614174000 ^FS`
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	AddZPLComments *bool `json:"addZPLComments,omitempty"`

	// BrandingImageFormat The format of label branding images to be shown on the generated label image.
	//
	// Note:
	// * Label branding images will not be shown on labels with customs forms.
	// * Label branding images are not currently supported with an `imageType` of `ZPL203DPI`, `ZPL300DPI`, or `EPL300DPI`.
	// * Label branding images are not currently supported with a `labelType` of `4X4LABEL`.
	// * When a `brandingImageFormat` is provided with a Destination Entry Facility, the Drop-Off Location will not be displayed on the label.
	// * When a `brandingImageFormat` of `RECTANGLE` is provided, Customer Reference #3-#4 cannot be provided since they will not be shown.
	// * When a `brandingImageFormat` of `ONE_SQUARE` or `TWO_SQUARES` is provided, Customer Reference numbers will be shifted to the right to accommodate the image.
	// * When a `brandingImageFormat` of `RECTANGLE` is provided, Customer Reference numbers, package number, and total packages will not be displayed on the label.
	// * A `brandingImageFormat` of `ONE_SQUARE` is currently only supported with `labelType` of `4X6LABEL`, `4X5LABEL`, `6X4LABEL`, and `2X7LABEL` for both outbound and return labels.
	// * A `brandingImageFormat` of `TWO_SQUARES` is currently only supported with `labelType` of `4X6LABEL`, `4X5LABEL`, and `6X4LABEL` for both outbound and return labels.
	// * A `brandingImageFormat` of `RECTANGLE` is currently only supported with `labelType` of `4X6LABEL`, `4X5LABEL`, and `6X4LABEL` for outbound labels and `4X5LABEL` and `6X4LABEL` for return labels.
	BrandingImageFormat *LabelRequestImageInfoBrandingImageFormat `json:"brandingImageFormat,omitempty"`

	// BrandingImageUUIDs The UUIDs associated with custom images uploaded in the Logo Branding endpoint: /branding
	//
	// Note:
	// * These UUIDs must have been created with the same Payment Authorization Label Owner CRID in use when creating the label
	// * When using `ONE_SQUARE` or `RECTANGLE` the brandingImageUUIDs list should include only one imageUUID string.
	// * When using `TWO_SQUARES` the brandingImageUUIDs list should include only two imageUUID strings.
	BrandingImageUUIDs *[]string `json:"brandingImageUUIDs,omitempty"`

	// ImageType The type of label image requested.  If omitted then the default image type is PDF.
	// * `PDF`
	// * `TIFF`
	// * `JPG`
	// * `PNG`
	// * `GIF`
	// * `SVG`
	// * `ZPL203DPI`
	// * `ZPL300DPI`
	// * `EPL300DPI`
	// * `LABEL_BROKER` - Request a USPS QR code to allow your customers with no access to a printer to print at participating Post Office Locations. All USPS API users and third-party integrators utilizing QR codes are subject to the [Label Broker terms and conditions](https://www.usps.com/terms-conditions/label-broker.htm). For more information please see the Label Broker guide available on [GitHub](https://github.com/USPS/api-examples/blob/main/USPS%20APIs%20Domestic%20Labels%20API%20Documentation_2023_0901%20Published.pdf) (Note: Only supports labelType of `4X6LABEL` or `6X4LABEL` and receiptOption of `NONE`).  A USPS Label Broker QR code image will be returned in the API response instead of a label image.
	// * `NONE`
	//
	// Note:
	// - Labels with customs forms only support formats of `PDF`, `TIFF`, `ZPL203DPI`, `ZPL300DPI`, `LABEL_BROKER`, and `NONE`.
	// - Including Extra Service Code `415 - USPS Label Delivery` returns no images and is equivalent to requesting `NONE`.
	// - `EPL300DPI` is not supported for Return Labels.
	// - When the `imageType` is set to `LABEL_BROKER`, the QR code's embedded URL will be returned in the `links` array of the response.
	ImageType *LabelRequestImageInfoImageType `json:"imageType,omitempty"`

	// IncludeLabelBrokerPDF Applicable only when `imageType` is `LABEL_BROKER`. When `includeLabelBrokerPDF` is `true`, two label images will be returned in the multi-part and vendor response as `labelBrokerQR` and `labelImage`. `labelBrokerQR` will contain the base64 PNG of the Label Broker QR Code and `labelImage` will contain the base64 PDF of the Label stored in Label Broker. When `includeLabelBrokerPDF` is `false`, one image will be returned in the multi-part and vendor response as `labelImage` as the base64 PNG of the Label Broker QR Code.
	IncludeLabelBrokerPDF *bool `json:"includeLabelBrokerPDF,omitempty"`

	// LabelType Ability to select the label image size.  If omitted then the default label size is `4X6LABEL`.
	//
	// Note:
	//   * Currently, customs forms only support `4X6LABEL`.
	//   * The `labelType` of `2X7LABEL` is not supported with the `imageType` of `ZPL203DPI` or `ZPL300DPI`.
	//   * The `labelType` of `4X6LABEL` is the only supported format with the `imageType` of `EPL300DPI`.
	LabelType *LabelRequestImageInfoLabelType `json:"labelType,omitempty"`

	// PackageNumber The package number in a series such as 1 of 3, 2 of 3, etc.  If `totalPackages` is populated then `packageNumber` is required.  `packageNumber` must be less than or equal to `totalPackages`.  This feature is not supported on the 2x7 or 4x4 label format.
	//
	// Note:
	// * When `packageNumber` is provided with a Destination Entry Facility, the Drop-Off Location will not be displayed on the label.
	PackageNumber *int `json:"packageNumber,omitempty"`

	// ReceiptOption Label & Receipt print out options: Enter `SAME_PAGE` to print the Label and the Receipt on a single page. Enter `SEPARATE_PAGE` to print the Label and the Receipt on separate pages. Enter `NONE` to print the Label only and no Receipt.
	//
	// Note:
	//   * The `labelType` of `4X4LABEL` or `6X4LABEL` with the image `imageType` of `ZPL203DPI` or `ZPL300DPI` does not support a `receiptOption` of `SEPARATE_PAGE`.
	//   * When `imageType` is `ZPL203DPI`, `ZPL300DPI`, or `EPL300DPI`, a `receiptOption` of `SAME_PAGE` is not supported.
	//   * When `imageType` is `ZPL203DPI`, `ZPL300DPI`, or `EPL300DPI` and `receiptOption` is `SEPARATE_PAGE`, the receipt will be returned as an additional label segment within the single ZPL or EPL payload in `labelImage`. In this case, `receiptImage` will not be populated.
	ReceiptOption *LabelRequestImageInfoReceiptOption `json:"receiptOption,omitempty"`

	// ReturnLabel Indicates if a pay on use returns label is requested along with the outbound label.  If omitted then the request will be defaulted to false.
	//
	// The mail class of the generated return label will be based off of the mail class provided in `packageDescription.mailClass`.
	// * Priority Mail Express Return Service label will be generated with `packageDescription.mailClass` of `PRIORITY_MAIL_EXPRESS`.
	// * Priority Mail Return Service label will be generated with `packageDescription.mailClass` of `PRIORITY_MAIL`.
	// * USPS Ground Advantage Return Service label will be generated with all other `packageDescription.mailClass` enumerations.
	//
	// Note:
	//  * An `imageType` value of `LABEL_BROKER` is currently not supported when `returnLabel` is set to true.
	//  * A `packageDescription.mailClass` value of `USPS_CONNECT_MAIL` is currently not supported when `returnLabel` is set to true.
	//  * `returnLabel` cannot be set to `true` when generating customs forms.
	//  * `returnLabel` is not available when Extra Service Code `415 - USPS Label Delivery` is used.
	ReturnLabel *bool `json:"returnLabel,omitempty"`

	// ShipInfo indicates if revenue protection information is printed on the label. (true or false)
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	ShipInfo *bool `json:"shipInfo,omitempty"`

	// SuppressMailDate Indicates if the `mailingDate` is printed on the label.  If omitted then the value will default to true.
	//
	// Note:
	//  * Mail Date cannot be suppressed on Domestic Customs Forms. The customs form will always display the Date of Mailing.
	//  * The date the label was created cannot be suppressed and will always print on the label.
	SuppressMailDate *bool `json:"suppressMailDate,omitempty"`

	// SuppressPostage Indicates if postage is printed on the label.  If omitted then the request will be defaulted to true.
	SuppressPostage *bool `json:"suppressPostage,omitempty"`

	// TotalPackages The total number of packages in a series such as 999.  If packageNumber is populated then totalPackages is required.  totalPackages must be greater than or equal to packageNumber.  This feature is not supported by the 2x7 or 4x4 label format.
	TotalPackages        *int                   `json:"totalPackages,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

LabelRequest_ImageInfo defines model for LabelRequest.ImageInfo.

func (LabelRequest_ImageInfo) Get

func (a LabelRequest_ImageInfo) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for LabelRequest_ImageInfo. Returns the specified element and whether it was found

func (LabelRequest_ImageInfo) MarshalJSON

func (a LabelRequest_ImageInfo) MarshalJSON() ([]byte, error)

Override default JSON handling for LabelRequest_ImageInfo to handle AdditionalProperties

func (*LabelRequest_ImageInfo) Set

func (a *LabelRequest_ImageInfo) Set(fieldName string, value interface{})

Setter for additional properties for LabelRequest_ImageInfo

func (*LabelRequest_ImageInfo) UnmarshalJSON

func (a *LabelRequest_ImageInfo) UnmarshalJSON(b []byte) error

Override default JSON handling for LabelRequest_ImageInfo to handle AdditionalProperties

type LabelRequest_PackageDescription

type LabelRequest_PackageDescription struct {
	// contains filtered or unexported fields
}

LabelRequest_PackageDescription Package description

func (LabelRequest_PackageDescription) AsDomesticPackageDescription

func (t LabelRequest_PackageDescription) AsDomesticPackageDescription() (DomesticPackageDescription, error)

AsDomesticPackageDescription returns the union data inside the LabelRequest_PackageDescription as a DomesticPackageDescription

func (LabelRequest_PackageDescription) AsDomesticPackageDescriptionWithoutRateIndicator

func (t LabelRequest_PackageDescription) AsDomesticPackageDescriptionWithoutRateIndicator() (DomesticPackageDescriptionWithoutRateIndicator, error)

AsDomesticPackageDescriptionWithoutRateIndicator returns the union data inside the LabelRequest_PackageDescription as a DomesticPackageDescriptionWithoutRateIndicator

func (*LabelRequest_PackageDescription) FromDomesticPackageDescription

func (t *LabelRequest_PackageDescription) FromDomesticPackageDescription(v DomesticPackageDescription) error

FromDomesticPackageDescription overwrites any union data inside the LabelRequest_PackageDescription as the provided DomesticPackageDescription

func (*LabelRequest_PackageDescription) FromDomesticPackageDescriptionWithoutRateIndicator

func (t *LabelRequest_PackageDescription) FromDomesticPackageDescriptionWithoutRateIndicator(v DomesticPackageDescriptionWithoutRateIndicator) error

FromDomesticPackageDescriptionWithoutRateIndicator overwrites any union data inside the LabelRequest_PackageDescription as the provided DomesticPackageDescriptionWithoutRateIndicator

func (LabelRequest_PackageDescription) MarshalJSON

func (t LabelRequest_PackageDescription) MarshalJSON() ([]byte, error)

func (*LabelRequest_PackageDescription) MergeDomesticPackageDescription

func (t *LabelRequest_PackageDescription) MergeDomesticPackageDescription(v DomesticPackageDescription) error

MergeDomesticPackageDescription performs a merge with any union data inside the LabelRequest_PackageDescription, using the provided DomesticPackageDescription

func (*LabelRequest_PackageDescription) MergeDomesticPackageDescriptionWithoutRateIndicator

func (t *LabelRequest_PackageDescription) MergeDomesticPackageDescriptionWithoutRateIndicator(v DomesticPackageDescriptionWithoutRateIndicator) error

MergeDomesticPackageDescriptionWithoutRateIndicator performs a merge with any union data inside the LabelRequest_PackageDescription, using the provided DomesticPackageDescriptionWithoutRateIndicator

func (*LabelRequest_PackageDescription) UnmarshalJSON

func (t *LabelRequest_PackageDescription) UnmarshalJSON(b []byte) error

type LabelVendorResponse

type LabelVendorResponse struct {
	// SKU Pricing SKU.
	SKU *string `json:"SKU,omitempty"`

	// BannerText Banner text printed on the label.
	BannerText *string `json:"bannerText,omitempty"`

	// Commitment The commitment and scheduled delivery date of the package.
	Commitment *Commitment `json:"commitment,omitempty"`

	// ConstructCode The barcode construct code associated with the tracking number.
	ConstructCode *string `json:"constructCode,omitempty"`

	// DimensionalWeight The dimensional weight of the package, if greater than specified in weight, in ounces.
	DimensionalWeight *float32 `json:"dimensionalWeight,omitempty"`

	// ExtraServices Extra services requested on the mailpiece.
	ExtraServices *ExtraServiceResponse `json:"extraServices,omitempty"`

	// Fees Fees associated with the package.
	Fees *[]struct {
		// SKU Pricing SKU.
		SKU *string `json:"SKU,omitempty"`

		// Name Name of the fee.
		Name *string `json:"name,omitempty"`

		// Price The price for the fee.
		Price *float32 `json:"price,omitempty"`
	} `json:"fees,omitempty"`

	// InductionType The permit holder induction type.
	InductionType *map[string]interface{} `json:"inductionType,omitempty"`

	// LabelAddress The address where the package is being shipped from. The ZIP Code™ in the `fromAddress` object is used to calculate pricing.
	//
	// Notes:
	// * The First and Last Name or Firm Name are always required.
	// * If the `returnAddress` is not provided, the `fromAddress` will be used as the `returnAddress`.
	// * If the `returnLabel` field is set to “true”, then the `fromAddress` ZIP Plus 4 is looked up by the API, unless the `ignoreBadAddress` field is set to true or the address cannot be found. If `ignoreBadAddress` field is true then ZIP Plus 4 is required.
	LabelAddress *DomesticLabelAddress `json:"labelAddress,omitempty"`

	// LabelBrokerID Unique Label Broker ID that can be used as an alternative to the Label Broker QR Code to retrieve the label at a Post Office. Will only be provided when an imageType of LABEL_BROKER is requested.
	LabelBrokerID *string `json:"labelBrokerID,omitempty"`

	// LabelBrokerQR The Label Broker QR Code image, Base64 encoded file contents. Only provided if `imageType` in the `imageInfo` is set to `LABEL_BROKER`.
	LabelBrokerQR *[]byte `json:"labelBrokerQR,omitempty"`

	// LabelImage Contains the Base64-encoded file contents of the label image. Provided only when `imageInfo.imageType` is not `NONE`.
	//
	// Note:
	// - Not provided when Extra Service Code `415 - USPS Label Delivery` is requested, as no images are returned for this service.
	LabelImage *[]byte `json:"labelImage,omitempty"`

	// Links Hypermedia links to related resources.
	Links *Links `json:"links,omitempty"`

	// MailingDate The date on which the package will be mailed as provided in the request. If the time was not provided, it will be defaulted to 10:00 p.m. local time.
	MailingDate *time.Time `json:"mailingDate,omitempty"`

	// PermitHolderName The permit holder name.
	PermitHolderName *string `json:"permitHolderName,omitempty"`

	// Postage Amount of Postage Required, does not include insurance or other extra service fees.
	Postage *float32 `json:"postage,omitempty"`

	// ReceiptImage Contains the Base64-encoded file contents of the label receipt image. Provided only when `imageInfo.receiptOption` is `SEPARATE_PAGE`.
	//
	// Note:
	// - When `imageInfo.imageType` is `ZPL203DPI`, `ZPL300DPI`, or `EPL300DPI` and `imageInfo.receiptOption` is `SEPARATE_PAGE`, the receipt will be returned as an additional label segment within the single ZPL or EPL payload in `labelImage`. In this case, `receiptImage` will not be populated.
	// - Not provided when Extra Service Code `415 - USPS Label Delivery` is requested, as no images are returned for this service.
	ReceiptImage *[]byte `json:"receiptImage,omitempty"`

	// RetailDistributionCode Retail Description Code associated with label.
	RetailDistributionCode *string `json:"retailDistributionCode,omitempty"`

	// ReturnLabel Return label
	ReturnLabel *struct {
		// SKU Pricing SKU
		SKU *string `json:"SKU,omitempty"`

		// BannerText Banner text printed on the label
		BannerText *string `json:"bannerText,omitempty"`

		// DimensionalWeight The dimensional weight of package, if greater than specified in weight, in ounces.
		DimensionalWeight *float32 `json:"dimensionalWeight,omitempty"`

		// ExtraServices Extra services requested on the mailpiece.
		ExtraServices *ExtraServiceResponse `json:"extraServices,omitempty"`

		// Fees Fees associated to the package.
		Fees *[]struct {
			// SKU Pricing SKU
			SKU *string `json:"SKU,omitempty"`

			// Name Name of the fee.
			Name *string `json:"name,omitempty"`

			// Price The price for the fee.
			Price *float32 `json:"price,omitempty"`
		} `json:"fees,omitempty"`

		// LabelAddress The address where the package is being shipped from. The ZIP Code™ in the `fromAddress` object is used to calculate pricing.
		//
		// Notes:
		// * The First and Last Name or Firm Name are always required.
		// * If the `returnAddress` is not provided, the `fromAddress` will be used as the `returnAddress`.
		// * If the `returnLabel` field is set to “true”, then the `fromAddress` ZIP Plus 4 is looked up by the API, unless the `ignoreBadAddress` field is set to true or the address cannot be found. If `ignoreBadAddress` field is true then ZIP Plus 4 is required.
		LabelAddress *DomesticLabelAddress `json:"labelAddress,omitempty"`

		// LabelBrokerID Unique Label Broker ID that can be used as an alternative to the Label Broker QR Code to retrieve the label at a Post Office. Will only be provided when an imageType of LABEL_BROKER is requested.
		LabelBrokerID *string `json:"labelBrokerID,omitempty"`

		// LabelBrokerQR The Label Broker QR Code image, Base64 encoded file contents. Only provided if `imageType` in the `imageInfo` is set to `LABEL_BROKER`.
		LabelBrokerQR *[]byte `json:"labelBrokerQR,omitempty"`

		// Links Hypermedia links to related resources.
		Links *Links `json:"links,omitempty"`

		// MailingDate The date and time when the request was processed, with a two-hour offset applied.
		MailingDate *time.Time `json:"mailingDate,omitempty"`

		// Postage Amount of Postage Required, does not include insurance or other extra service fees.
		Postage *float32 `json:"postage,omitempty"`

		// RetailDistributionCode Retail Description Code associated with the label
		RetailDistributionCode *string `json:"retailDistributionCode,omitempty"`

		// ReturnLabelImage Contains the Base64-encoded file contents of the return label image. Provided only when `imageInfo.returnLabel` is `true` and `imageInfo.imageType` is not `NONE`.
		ReturnLabelImage *[]byte `json:"returnLabelImage,omitempty"`

		// ReturnReceiptImage Contains the Base64-encoded file contents of the return receipt image. Provided only when `imageInfo.returnLabel` is `true` and `imageInfo.receiptOption` is `SEPARATE_PAGE`.
		//
		// Note:
		// - When `imageInfo.imageType` is `ZPL203DPI` or `ZPL300DPI` and `imageInfo.receiptOption` is `SEPARATE_PAGE`, the receipt will be returned as an additional label segment within the single ZPL payload in `labelImage`. In this case, `receiptImage` will not be populated.
		ReturnReceiptImage *[]byte `json:"returnReceiptImage,omitempty"`

		// RoutingInformation The "420" 3-digit GS1 Application Identifier and the 5 or 9 digit Destination ZIP Code&#8482;
		RoutingInformation *string `json:"routingInformation,omitempty"`

		// ServiceTypeCode The Service Type Code associated with the package. A list of Service Type Codes can be found at: [https://postalpro.usps.com/IMPB_Service_Type_Codes](https://postalpro.usps.com/IMPB_Service_Type_Codes)
		ServiceTypeCode *string `json:"serviceTypeCode,omitempty"`

		// Sku Pricing SKU
		// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
		Sku *string `json:"sku,omitempty"`

		// TrackingNumber The human readable version of the package tracking number
		TrackingNumber *string `json:"trackingNumber,omitempty"`

		// Warnings Warnings and additional details around the Label.
		Warnings *Warnings `json:"warnings,omitempty"`

		// Weight The package weight, in weightUOM. Items must weigh 70 pounds (1120 ounces) or less.
		Weight *float32 `json:"weight,omitempty"`

		// WeightUOM Weight Unit of Measurement
		//    * lb - Pounds
		WeightUOM *string `json:"weightUOM,omitempty"`

		// Zone Indicates the calculated zone used for pricing between the provided `originZIPCode` and `destinationZIPCode` for a given `mailClass`, `mailingDate`, `rateIndicator`, and `weight`.
		Zone *string `json:"zone,omitempty"`
	} `json:"returnLabel,omitempty"`

	// ReturnReceiptTrackingNumber The human-readable version of the return Receipt tracking number.
	//
	// * Note: This will be included in the response when `packageOptions.returnReceiptTracking` is set to true in the request.
	ReturnReceiptTrackingNumber *string `json:"returnReceiptTrackingNumber,omitempty"`

	// RoutingInformation The "420" 3-digit GS1 Application Identifier and the 5 or 9 digit Destination ZIP Code&#8482;.
	RoutingInformation *string `json:"routingInformation,omitempty"`

	// ServiceTypeCode The Service Type Code associated with the package. A list of Service Type Codes can be found at: [https://postalpro.usps.com/IMPB_Service_Type_Codes](https://postalpro.usps.com/IMPB_Service_Type_Codes).
	ServiceTypeCode *string `json:"serviceTypeCode,omitempty"`

	// TrackingNumber The human-readable version of the package tracking number.
	TrackingNumber *string `json:"trackingNumber,omitempty"`

	// Warnings Warnings and additional details around the Label.
	Warnings *Warnings `json:"warnings,omitempty"`

	// Weight The package weight, in weightUOM. Items must weigh 70 pounds (1120 ounces) or less.
	Weight *float32 `json:"weight,omitempty"`

	// WeightUOM Weight Unit of Measurement
	//    * lb - Pounds
	WeightUOM *string `json:"weightUOM,omitempty"`

	// Zone Indicates the calculated zone used for pricing between the provided `originZIPCode` and `destinationZIPCode` for a given `mailClass`, `mailingDate`, `rateIndicator`, and `weight`.
	Zone                 *string                `json:"zone,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

LabelVendorResponse defines model for LabelVendorResponse.

func (LabelVendorResponse) Get

func (a LabelVendorResponse) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for LabelVendorResponse. Returns the specified element and whether it was found

func (LabelVendorResponse) MarshalJSON

func (a LabelVendorResponse) MarshalJSON() ([]byte, error)

Override default JSON handling for LabelVendorResponse to handle AdditionalProperties

func (*LabelVendorResponse) Set

func (a *LabelVendorResponse) Set(fieldName string, value interface{})

Setter for additional properties for LabelVendorResponse

func (*LabelVendorResponse) UnmarshalJSON

func (a *LabelVendorResponse) UnmarshalJSON(b []byte) error

Override default JSON handling for LabelVendorResponse to handle AdditionalProperties

type Links = []struct {
	// Href The URL to a related resource.
	Href string `json:"href"`

	// Method The HTTP method to use to access this link.
	Method *LinksMethod `json:"method,omitempty"`

	// Rel The short name(s) of the relationship corresponding to the link.
	Rel []string `json:"rel"`

	// SubmissionMediaType The media type of the resource request.
	SubmissionMediaType *string `json:"submissionMediaType,omitempty"`

	// TargetMediaType The media type of the resource response.
	TargetMediaType *string `json:"targetMediaType,omitempty"`

	// Title A human-readable description of the link relationship.
	Title *string `json:"title,omitempty"`
}

Links Hypermedia links to related resources.

type LinksMethod

type LinksMethod string

LinksMethod The HTTP method to use to access this link.

const (
	DELETE LinksMethod = "DELETE"
	GET    LinksMethod = "GET"
	POST   LinksMethod = "POST"
	PUT    LinksMethod = "PUT"
)

Defines values for LinksMethod.

type MailingDate

type MailingDate = openapi_types.Date

MailingDate The date the package will be mailed.

The mailing date may be today plus 0 to 7 days in advance.

The time will default to 10 p.m. local time (based on the induction location of the package) for calculating the commitment and scheduled delivery date of the package.

Enter the date in the full-date notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6).

type MailingDateIndicia

type MailingDateIndicia = openapi_types.Date

MailingDateIndicia The date the letter, flat, or card will be mailed. The mailing date may be today plus 0 to 7 days in advance. Enter the date in the full-date notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6).

type MailingDateIndiciaOptions

type MailingDateIndiciaOptions = string

MailingDateIndiciaOptions Mailing Date Indicia Options

type MailingDateTime

type MailingDateTime = time.Time

MailingDateTime The date and time a package will be mailed.

The mailing date may be today plus 0 to 7 days in advance.

Enter the date in the date-time notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6).

type MailingDateTimeIndicia

type MailingDateTimeIndicia = time.Time

MailingDateTimeIndicia The date and time the letter, flat, or card will be mailed. The mailing date may be today plus 0 to 7 days in advance. Enter the date in the date-time notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6).

type Nonprofit

type Nonprofit = bool

Nonprofit Used to specify if the shipment is a nonprofit mailing. Shippers must be authorized for nonprofit mailings to qualify for nonprofit pricing. All nonprofit mailings must not be used for product fulfillment. For more details on Nonprofit Mailers, visit [Nonprofit Mailers](https://pe.usps.com/BusinessMail101?ViewName=NonprofitPrices).

When `nonprofit` is `true` and `mailClass` is `MARKETING_MAIL_PARCELS`, nonprofit rates will be applied. When using `rateIndicator` values, the `rateIndicator` must also be `NN` or `PN`.

When `nonprofit` is `false` and `mailClass` is `MARKETING_MAIL_PARCELS`, standard rates will be applied.

`nonprofit` is not supported for any other mail class.

type PackageDescription

type PackageDescription struct {
	// DimensionsUOM Dimensions unit of measure
	// * in - Inches
	DimensionsUOM *PackageDescriptionDimensionsUOM `json:"dimensionsUOM,omitempty"`

	// Girth The girth of the container, in dimensionsUOM. If partial dimensions are provided, an error response will return. Length, Width, Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. In addition, Girth is required only for a non- rectangular package in addition to Length, Width, Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non- rectangular packages.
	Girth *float32 `json:"girth,omitempty"`

	// HasNonstandardCharacteristics Package is nonstandard. Nonstandard packages include cylindrical tubes and rolls, certain high-density items, cartons containing more than 24 ounces of liquids in one or more glass containers, cartons containing 1 gallon or more of liquid in metal or plastic containers, and items in [201.7.6.2](https://pe.usps.com/text/dmm300/201.htm#7.6.2).
	HasNonstandardCharacteristics *bool `json:"hasNonstandardCharacteristics,omitempty"`

	// Height The height of the container, in dimensionsUOM. If partial dimensions are provided, an error response will return. Length, Width, and Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. Girth is required only for a non-rectangular package in addition to Length, Width, and Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non-rectangular packages.
	Height *float32 `json:"height,omitempty"`

	// Length The length of the container, in dimensionsUOM. If partial dimensions are provided, an error response will return. Length, Width, and Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. Girth is required only for a non-rectangular package in addition to Length, Width, and Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non-rectangular packages.
	Length *float32 `json:"length,omitempty"`

	// Weight The package weight, in weightUOM (Unit Of Measure). Items must weigh 70 pounds (1120 ounces) or less.
	Weight *float32 `json:"weight,omitempty"`

	// WeightUOM Weight Unit of Measurement
	//   * lb - Pounds
	WeightUOM *PackageDescriptionWeightUOM `json:"weightUOM,omitempty"`

	// Width The width of the container, in dimensionsUOM. If partial dimensions are provided, an error response will return. Length, Width, and Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. Girth is required only for a non-rectangular package in addition to Length, Width, and Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non- rectangular packages.
	Width                *float32               `json:"width,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

PackageDescription Package Definitions

func (PackageDescription) Get

func (a PackageDescription) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for PackageDescription. Returns the specified element and whether it was found

func (PackageDescription) MarshalJSON

func (a PackageDescription) MarshalJSON() ([]byte, error)

Override default JSON handling for PackageDescription to handle AdditionalProperties

func (*PackageDescription) Set

func (a *PackageDescription) Set(fieldName string, value interface{})

Setter for additional properties for PackageDescription

func (*PackageDescription) UnmarshalJSON

func (a *PackageDescription) UnmarshalJSON(b []byte) error

Override default JSON handling for PackageDescription to handle AdditionalProperties

type PackageDescriptionDimensionsUOM

type PackageDescriptionDimensionsUOM string

PackageDescriptionDimensionsUOM Dimensions unit of measure * in - Inches

const (
	PackageDescriptionDimensionsUOMIn PackageDescriptionDimensionsUOM = "in"
)

Defines values for PackageDescriptionDimensionsUOM.

type PackageDescriptionWeightUOM

type PackageDescriptionWeightUOM string

PackageDescriptionWeightUOM Weight Unit of Measurement

  • lb - Pounds
const (
	PackageDescriptionWeightUOMLb PackageDescriptionWeightUOM = "lb"
)

Defines values for PackageDescriptionWeightUOM.

type PackageOptions

type PackageOptions struct {
	// NonDeliveryOption Requested action in the case a package is undeliverable:
	//   - `RETURN` for package to be returned to `fromAddress`.
	//   - `REDIRECT` to return package to address specified in the `redirectAddress`.
	//   - `ABANDON` to dispose of undeliverable package
	//
	// Note:
	//   * `REDIRECT` and `ABANDON` will not impact the domestic package endpoint. Please use ancillary service endorsements instead.
	//   * An address must be provided in `redirectAddress` when a value of `REDIRECT` is provided.
	NonDeliveryOption *PackageOptionsNonDeliveryOption `json:"nonDeliveryOption,omitempty"`

	// Omas Fields specific to Official Mail Accounting System (OMAS).  Used for Federal Agencies.
	Omas *struct {
		// ChargebackCode Code used with OMAS transactions.
		ChargebackCode *string `json:"chargebackCode,omitempty"`
	} `json:"omas,omitempty"`

	// PackageValue The merchandise value of the package, in US dollars. Used as the declared value for Insurance and for fee calculation when provided.
	//
	//  Note:
	//   * `packageValue` is required when `extraServices` includes `930` or `931`.
	PackageValue         *float32               `json:"packageValue,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

PackageOptions defines model for PackageOptions.

func (PackageOptions) Get

func (a PackageOptions) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for PackageOptions. Returns the specified element and whether it was found

func (PackageOptions) MarshalJSON

func (a PackageOptions) MarshalJSON() ([]byte, error)

Override default JSON handling for PackageOptions to handle AdditionalProperties

func (*PackageOptions) Set

func (a *PackageOptions) Set(fieldName string, value interface{})

Setter for additional properties for PackageOptions

func (*PackageOptions) UnmarshalJSON

func (a *PackageOptions) UnmarshalJSON(b []byte) error

Override default JSON handling for PackageOptions to handle AdditionalProperties

type PackageOptionsNonDeliveryOption

type PackageOptionsNonDeliveryOption string

PackageOptionsNonDeliveryOption Requested action in the case a package is undeliverable:

  • `RETURN` for package to be returned to `fromAddress`.
  • `REDIRECT` to return package to address specified in the `redirectAddress`.
  • `ABANDON` to dispose of undeliverable package

Note:

  • `REDIRECT` and `ABANDON` will not impact the domestic package endpoint. Please use ancillary service endorsements instead.
  • An address must be provided in `redirectAddress` when a value of `REDIRECT` is provided.
const (
	PackageOptionsNonDeliveryOptionABANDON  PackageOptionsNonDeliveryOption = "ABANDON"
	PackageOptionsNonDeliveryOptionREDIRECT PackageOptionsNonDeliveryOption = "REDIRECT"
	PackageOptionsNonDeliveryOptionRETURN   PackageOptionsNonDeliveryOption = "RETURN"
)

Defines values for PackageOptionsNonDeliveryOption.

type PatchLabelBrandingJSONRequestBody

type PatchLabelBrandingJSONRequestBody = BrandingPatchRequest

PatchLabelBrandingJSONRequestBody defines body for PatchLabelBranding for application/json ContentType.

type PatchLabelBrandingParams

type PatchLabelBrandingParams struct {
	// XPaymentAuthorizationToken Payment Authorization Token from the payments API Call.
	XPaymentAuthorizationToken XPaymentAuthorizationToken `json:"X-Payment-Authorization-Token"`
}

PatchLabelBrandingParams defines parameters for PatchLabelBranding.

type PatchLabelBrandingResponse

type PatchLabelBrandingResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *LabelBrandingPatchResponse
	XML200       *LabelBrandingPatchResponse
	JSON400      *ErrorMessage
	XML400       *ErrorMessage
	JSON401      *ErrorMessage
	XML401       *ErrorMessage
	JSON403      *ErrorMessage
	XML403       *ErrorMessage
	JSON429      *ErrorMessage
	XML429       *ErrorMessage
	JSON503      *ErrorMessage
	XML503       *ErrorMessage
}

func ParsePatchLabelBrandingResponse

func ParsePatchLabelBrandingResponse(rsp *http.Response) (*PatchLabelBrandingResponse, error)

ParsePatchLabelBrandingResponse parses an HTTP response from a PatchLabelBrandingWithResponse call

func (PatchLabelBrandingResponse) Status

Status returns HTTPResponse.Status

func (PatchLabelBrandingResponse) StatusCode

func (r PatchLabelBrandingResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PatchLabelEditJSONRequestBody

type PatchLabelEditJSONRequestBody = PatchRequest

PatchLabelEditJSONRequestBody defines body for PatchLabelEdit for application/json ContentType.

type PatchLabelEditParams

type PatchLabelEditParams struct {
	// XPaymentAuthorizationToken Payment Authorization Token from the payments API Call.
	XPaymentAuthorizationToken XPaymentAuthorizationToken `json:"X-Payment-Authorization-Token"`
}

PatchLabelEditParams defines parameters for PatchLabelEdit.

type PatchLabelEditResponse

type PatchLabelEditResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *LabelMetadata
	XML200       *LabelMetadata
	JSON400      *ErrorMessage
	XML400       *ErrorMessage
	JSON401      *ErrorMessage
	XML401       *ErrorMessage
	JSON403      *ErrorMessage
	XML403       *ErrorMessage
	JSON429      *ErrorMessage
	XML429       *ErrorMessage
	JSON503      *ErrorMessage
	XML503       *ErrorMessage
}

func ParsePatchLabelEditResponse

func ParsePatchLabelEditResponse(rsp *http.Response) (*PatchLabelEditResponse, error)

ParsePatchLabelEditResponse parses an HTTP response from a PatchLabelEditWithResponse call

func (PatchLabelEditResponse) Status

func (r PatchLabelEditResponse) Status() string

Status returns HTTPResponse.Status

func (PatchLabelEditResponse) StatusCode

func (r PatchLabelEditResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PatchRequest

type PatchRequest = []struct {
	// Op The operation to perform on the resource.
	Op PatchRequestOp `json:"op"`

	// Path The object or array location to perform the update to the resource. Must be a JSON pointer value.
	Path PatchRequestPath `json:"path"`

	// Value Can be anything: string, number, array, object, etc. (except `null`)
	Value *AnyValue `json:"value,omitempty"`
}

PatchRequest IETF JSON PATCH, https://datatracker.ietf.org/doc/html/rfc6902

type PatchRequestOp

type PatchRequestOp string

PatchRequestOp The operation to perform on the resource.

const (
	PatchRequestOpReplace PatchRequestOp = "replace"
)

Defines values for PatchRequestOp.

type PatchRequestPath

type PatchRequestPath string

PatchRequestPath The object or array location to perform the update to the resource. Must be a JSON pointer value.

const (
	PackageDescriptioncontainers         PatchRequestPath = "/packageDescription/containers"
	PackageDescriptiongirth              PatchRequestPath = "/packageDescription/girth"
	PackageDescriptionheight             PatchRequestPath = "/packageDescription/height"
	PackageDescriptionlength             PatchRequestPath = "/packageDescription/length"
	PackageDescriptionprocessingCategory PatchRequestPath = "/packageDescription/processingCategory"
	PackageDescriptionrateIndicator      PatchRequestPath = "/packageDescription/rateIndicator"
	PackageDescriptionweight             PatchRequestPath = "/packageDescription/weight"
	PackageDescriptionwidth              PatchRequestPath = "/packageDescription/width"
)

Defines values for PatchRequestPath.

type Phone

type Phone = string

Phone The phone number, including the country extension and area code or the local national format, with no punctuation.

type PostIndiciaImbJSONRequestBody

type PostIndiciaImbJSONRequestBody = IndiciaImbRequest

PostIndiciaImbJSONRequestBody defines body for PostIndiciaImb for application/json ContentType.

type PostIndiciaImbParams

type PostIndiciaImbParams struct {
	// XPaymentAuthorizationToken Payment Authorization Token from the payments API Call.
	XPaymentAuthorizationToken XPaymentAuthorizationToken `json:"X-Payment-Authorization-Token"`
}

PostIndiciaImbParams defines parameters for PostIndiciaImb.

type PostIndiciaImbResponse

type PostIndiciaImbResponse struct {
	Body                            []byte
	HTTPResponse                    *http.Response
	JSON201                         *IndiciaImbResponse
	ApplicationvndUspsLabelsJSON201 *IndiciaImbResponse
	XML201                          *IndiciaImbResponse
	JSON400                         *ErrorMessage
	XML400                          *ErrorMessage
	JSON401                         *ErrorMessage
	XML401                          *ErrorMessage
	JSON403                         *ErrorMessage
	XML403                          *ErrorMessage
	JSON429                         *ErrorMessage
	XML429                          *ErrorMessage
	JSON503                         *ErrorMessage
	XML503                          *ErrorMessage
}

func ParsePostIndiciaImbResponse

func ParsePostIndiciaImbResponse(rsp *http.Response) (*PostIndiciaImbResponse, error)

ParsePostIndiciaImbResponse parses an HTTP response from a PostIndiciaImbWithResponse call

func (PostIndiciaImbResponse) Status

func (r PostIndiciaImbResponse) Status() string

Status returns HTTPResponse.Status

func (PostIndiciaImbResponse) StatusCode

func (r PostIndiciaImbResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostLabelBrandingJSONRequestBody

type PostLabelBrandingJSONRequestBody = LabelBrandingUploadRequest

PostLabelBrandingJSONRequestBody defines body for PostLabelBranding for application/json ContentType.

type PostLabelBrandingParams

type PostLabelBrandingParams struct {
	// XPaymentAuthorizationToken Payment Authorization Token from the payments API Call.
	XPaymentAuthorizationToken XPaymentAuthorizationToken `json:"X-Payment-Authorization-Token"`
}

PostLabelBrandingParams defines parameters for PostLabelBranding.

type PostLabelBrandingResponse

type PostLabelBrandingResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *LabelBrandingUploadResponse
	XML201       *LabelBrandingUploadResponse
	JSON400      *ErrorMessage
	XML400       *ErrorMessage
	JSON401      *ErrorMessage
	XML401       *ErrorMessage
	JSON403      *ErrorMessage
	XML403       *ErrorMessage
	JSON429      *ErrorMessage
	XML429       *ErrorMessage
	JSON503      *ErrorMessage
	XML503       *ErrorMessage
}

func ParsePostLabelBrandingResponse

func ParsePostLabelBrandingResponse(rsp *http.Response) (*PostLabelBrandingResponse, error)

ParsePostLabelBrandingResponse parses an HTTP response from a PostLabelBrandingWithResponse call

func (PostLabelBrandingResponse) Status

func (r PostLabelBrandingResponse) Status() string

Status returns HTTPResponse.Status

func (PostLabelBrandingResponse) StatusCode

func (r PostLabelBrandingResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostLabelIndiciaJSONRequestBody

type PostLabelIndiciaJSONRequestBody = IndiciaRequest

PostLabelIndiciaJSONRequestBody defines body for PostLabelIndicia for application/json ContentType.

type PostLabelIndiciaParams

type PostLabelIndiciaParams struct {
	// XPaymentAuthorizationToken Payment Authorization Token from the payments API Call.
	XPaymentAuthorizationToken XPaymentAuthorizationToken `json:"X-Payment-Authorization-Token"`
}

PostLabelIndiciaParams defines parameters for PostLabelIndicia.

type PostLabelIndiciaResponse

type PostLabelIndiciaResponse struct {
	Body                            []byte
	HTTPResponse                    *http.Response
	JSON201                         *IndiciaResponse
	ApplicationvndUspsLabelsJSON201 *IndiciaResponse
	XML201                          *IndiciaResponse
	JSON400                         *ErrorMessage
	XML400                          *ErrorMessage
	JSON401                         *ErrorMessage
	XML401                          *ErrorMessage
	JSON403                         *ErrorMessage
	XML403                          *ErrorMessage
	JSON429                         *ErrorMessage
	XML429                          *ErrorMessage
	JSON503                         *ErrorMessage
	XML503                          *ErrorMessage
}

func ParsePostLabelIndiciaResponse

func ParsePostLabelIndiciaResponse(rsp *http.Response) (*PostLabelIndiciaResponse, error)

ParsePostLabelIndiciaResponse parses an HTTP response from a PostLabelIndiciaWithResponse call

func (PostLabelIndiciaResponse) Status

func (r PostLabelIndiciaResponse) Status() string

Status returns HTTPResponse.Status

func (PostLabelIndiciaResponse) StatusCode

func (r PostLabelIndiciaResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostLabelJSONRequestBody

type PostLabelJSONRequestBody = LabelRequest

PostLabelJSONRequestBody defines body for PostLabel for application/json ContentType.

type PostLabelParams

type PostLabelParams struct {
	// XPaymentAuthorizationToken Payment Authorization Token from the payments API Call.
	XPaymentAuthorizationToken XPaymentAuthorizationToken `json:"X-Payment-Authorization-Token"`

	// XIdempotencyKey A client-created, randomly generated UUID that uniquely identifies a label request. The value must be unique across all label requests for each customer (CRID) and serves as the idempotency key for downstream reprint and cancellation operations.
	//
	// **Usage**:
	// - *Reprint requests*: Submitting the idempotency key to the reprint endpoint returns the original label image and metadata.
	// - *Cancellation requests*: Submitting the idempotency key to the cancel endpoint cancels an unused label or initiates a refund.
	// - *Label endpoint*: Not idempotent. Resubmission of a previously used UUID will generate a new label and may result in multiple labels bound to the same UUID.  If a previously used UUID is resubmitted, the reprint and cancellation requests will reference the most recent instance of the UUID.
	//
	// The UUID is included in the electronic manifest data (Shipping Services File, D5 record) transmitted to Postal systems.  This will be reflected in the Package Transaction Details Report through IV-MTR as the `External Reference ID`.
	XIdempotencyKey *XIdempotencyKey `json:"X-Idempotency-Key,omitempty"`
}

PostLabelParams defines parameters for PostLabel.

type PostLabelReprintByIdempotencyJSONRequestBody

type PostLabelReprintByIdempotencyJSONRequestBody = LabelReprintRequest

PostLabelReprintByIdempotencyJSONRequestBody defines body for PostLabelReprintByIdempotency for application/json ContentType.

type PostLabelReprintByIdempotencyParams

type PostLabelReprintByIdempotencyParams struct {
	// XPaymentAuthorizationToken Payment Authorization Token from the payments API Call.
	XPaymentAuthorizationToken XPaymentAuthorizationToken `json:"X-Payment-Authorization-Token"`

	// XIdempotencyKey A client-created, randomly generated UUID that uniquely identifies a label request. The value must be unique across all label requests for each customer (CRID) and serves as the idempotency key for downstream reprint and cancellation operations.
	//
	// **Usage**:
	// - *Reprint requests*: Submitting the idempotency key to the reprint endpoint returns the original label image and metadata.
	// - *Cancellation requests*: Submitting the idempotency key to the cancel endpoint cancels an unused label or initiates a refund.
	// - *Label endpoint*: Not idempotent. Resubmission of a previously used UUID will generate a new label and may result in multiple labels bound to the same UUID.  If a previously used UUID is resubmitted, the reprint and cancellation requests will reference the most recent instance of the UUID.
	//
	// The UUID is included in the electronic manifest data (Shipping Services File, D5 record) transmitted to Postal systems.  This will be reflected in the Package Transaction Details Report through IV-MTR as the `External Reference ID`.
	XIdempotencyKey *XIdempotencyKey `json:"X-Idempotency-Key,omitempty"`
}

PostLabelReprintByIdempotencyParams defines parameters for PostLabelReprintByIdempotency.

type PostLabelReprintByIdempotencyResponse

type PostLabelReprintByIdempotencyResponse struct {
	Body                            []byte
	HTTPResponse                    *http.Response
	JSON200                         *LabelReprintMultiPartResponse
	ApplicationvndUspsLabelsJSON200 *struct {
		// contains filtered or unexported fields
	}
	XML200  *LabelReprintMultiPartResponse
	JSON400 *ErrorMessage
	XML400  *ErrorMessage
	JSON401 *ErrorMessage
	XML401  *ErrorMessage
	JSON403 *ErrorMessage
	XML403  *ErrorMessage
	JSON429 *ErrorMessage
	XML429  *ErrorMessage
	JSON503 *ErrorMessage
	XML503  *ErrorMessage
}

func ParsePostLabelReprintByIdempotencyResponse

func ParsePostLabelReprintByIdempotencyResponse(rsp *http.Response) (*PostLabelReprintByIdempotencyResponse, error)

ParsePostLabelReprintByIdempotencyResponse parses an HTTP response from a PostLabelReprintByIdempotencyWithResponse call

func (PostLabelReprintByIdempotencyResponse) Status

Status returns HTTPResponse.Status

func (PostLabelReprintByIdempotencyResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type PostLabelReprintByTrackingJSONRequestBody

type PostLabelReprintByTrackingJSONRequestBody = LabelReprintRequest

PostLabelReprintByTrackingJSONRequestBody defines body for PostLabelReprintByTracking for application/json ContentType.

type PostLabelReprintByTrackingParams

type PostLabelReprintByTrackingParams struct {
	// XPaymentAuthorizationToken Payment Authorization Token from the payments API Call.
	XPaymentAuthorizationToken XPaymentAuthorizationToken `json:"X-Payment-Authorization-Token"`
}

PostLabelReprintByTrackingParams defines parameters for PostLabelReprintByTracking.

type PostLabelReprintByTrackingResponse

type PostLabelReprintByTrackingResponse struct {
	Body                            []byte
	HTTPResponse                    *http.Response
	JSON200                         *LabelReprintMultiPartResponse
	ApplicationvndUspsLabelsJSON200 *struct {
		// contains filtered or unexported fields
	}
	XML200  *LabelReprintMultiPartResponse
	JSON400 *ErrorMessage
	XML400  *ErrorMessage
	JSON401 *ErrorMessage
	XML401  *ErrorMessage
	JSON403 *ErrorMessage
	XML403  *ErrorMessage
	JSON429 *ErrorMessage
	XML429  *ErrorMessage
	JSON503 *ErrorMessage
	XML503  *ErrorMessage
}

func ParsePostLabelReprintByTrackingResponse

func ParsePostLabelReprintByTrackingResponse(rsp *http.Response) (*PostLabelReprintByTrackingResponse, error)

ParsePostLabelReprintByTrackingResponse parses an HTTP response from a PostLabelReprintByTrackingWithResponse call

func (PostLabelReprintByTrackingResponse) Status

Status returns HTTPResponse.Status

func (PostLabelReprintByTrackingResponse) StatusCode

func (r PostLabelReprintByTrackingResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostLabelResponse

type PostLabelResponse struct {
	Body                            []byte
	HTTPResponse                    *http.Response
	JSON200                         *LabelMultiPartResponse
	ApplicationvndUspsLabelsJSON200 *LabelVendorResponse
	XML200                          *LabelMultiPartResponse
	JSON400                         *ErrorMessage
	XML400                          *ErrorMessage
	JSON401                         *ErrorMessage
	XML401                          *ErrorMessage
	JSON403                         *ErrorMessage
	XML403                          *ErrorMessage
	JSON429                         *ErrorMessage
	XML429                          *ErrorMessage
	JSON503                         *ErrorMessage
	XML503                          *ErrorMessage
}

func ParsePostLabelResponse

func ParsePostLabelResponse(rsp *http.Response) (*PostLabelResponse, error)

ParsePostLabelResponse parses an HTTP response from a PostLabelWithResponse call

func (PostLabelResponse) Status

func (r PostLabelResponse) Status() string

Status returns HTTPResponse.Status

func (PostLabelResponse) StatusCode

func (r PostLabelResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostReturnLabelJSONRequestBody

type PostReturnLabelJSONRequestBody = ReturnLabelRequest

PostReturnLabelJSONRequestBody defines body for PostReturnLabel for application/json ContentType.

type PostReturnLabelParams

type PostReturnLabelParams struct {
	// XPaymentAuthorizationToken Payment Authorization Token from the payments API Call.
	XPaymentAuthorizationToken XPaymentAuthorizationToken `json:"X-Payment-Authorization-Token"`

	// XIdempotencyKey A client-created, randomly generated UUID that uniquely identifies a label request. The value must be unique across all label requests for each customer (CRID) and serves as the idempotency key for downstream reprint and cancellation operations.
	//
	// **Usage**:
	// - *Reprint requests*: Submitting the idempotency key to the reprint endpoint returns the original label image and metadata.
	// - *Cancellation requests*: Submitting the idempotency key to the cancel endpoint cancels an unused label or initiates a refund.
	// - *Label endpoint*: Not idempotent. Resubmission of a previously used UUID will generate a new label and may result in multiple labels bound to the same UUID.  If a previously used UUID is resubmitted, the reprint and cancellation requests will reference the most recent instance of the UUID.
	//
	// The UUID is included in the electronic manifest data (Shipping Services File, D5 record) transmitted to Postal systems.  This will be reflected in the Package Transaction Details Report through IV-MTR as the `External Reference ID`.
	XIdempotencyKey *XIdempotencyKey `json:"X-Idempotency-Key,omitempty"`
}

PostReturnLabelParams defines parameters for PostReturnLabel.

type PostReturnLabelResponse

type PostReturnLabelResponse struct {
	Body                            []byte
	HTTPResponse                    *http.Response
	JSON200                         *ReturnLabelMultiPartResponse
	ApplicationvndUspsLabelsJSON200 *ReturnLabelVendorResponse
	XML200                          *ReturnLabelMultiPartResponse
	JSON400                         *ErrorMessage
	XML400                          *ErrorMessage
	JSON401                         *ErrorMessage
	XML401                          *ErrorMessage
	JSON403                         *ErrorMessage
	XML403                          *ErrorMessage
	JSON429                         *ErrorMessage
	XML429                          *ErrorMessage
	JSON503                         *ErrorMessage
	XML503                          *ErrorMessage
}

func ParsePostReturnLabelResponse

func ParsePostReturnLabelResponse(rsp *http.Response) (*PostReturnLabelResponse, error)

ParsePostReturnLabelResponse parses an HTTP response from a PostReturnLabelWithResponse call

func (PostReturnLabelResponse) Status

func (r PostReturnLabelResponse) Status() string

Status returns HTTPResponse.Status

func (PostReturnLabelResponse) StatusCode

func (r PostReturnLabelResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ReprintInfo

type ReprintInfo struct {
	// ReprintLimit Maximum number of reprints permitted for the label.
	ReprintLimit *int `json:"reprintLimit,omitempty"`

	// ReprintNumber Count of reprints made for the label.
	ReprintNumber *int `json:"reprintNumber,omitempty"`
}

ReprintInfo Schema containing reprint information for a label.

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type ReturnLabelMetadata

type ReturnLabelMetadata struct {
	// SKU Pricing SKU
	SKU *string `json:"SKU,omitempty"`

	// BannerText Banner text printed on the label
	BannerText *string `json:"bannerText,omitempty"`

	// DimensionalWeight The dimensional weight of package, if greater than specified in weight, in ounces.
	DimensionalWeight *float32 `json:"dimensionalWeight,omitempty"`

	// ExtraServices Extra services requested on the mailpiece.
	ExtraServices *ExtraServiceResponse `json:"extraServices,omitempty"`

	// Fees Fees associated to the package.
	Fees *[]struct {
		// SKU Pricing SKU
		SKU *string `json:"SKU,omitempty"`

		// Name Name of the fee.
		Name *string `json:"name,omitempty"`

		// Price The price for the fee.
		Price *float32 `json:"price,omitempty"`
	} `json:"fees,omitempty"`

	// LabelAddress The address where the package is being shipped from. The ZIP Code™ in the `fromAddress` object is used to calculate pricing.
	//
	// Notes:
	// * The First and Last Name or Firm Name are always required.
	// * If the `returnAddress` is not provided, the `fromAddress` will be used as the `returnAddress`.
	// * If the `returnLabel` field is set to “true”, then the `fromAddress` ZIP Plus 4 is looked up by the API, unless the `ignoreBadAddress` field is set to true or the address cannot be found. If `ignoreBadAddress` field is true then ZIP Plus 4 is required.
	LabelAddress *DomesticLabelAddress `json:"labelAddress,omitempty"`

	// LabelBrokerID Unique Label Broker ID that can be used as an alternative to the Label Broker QR Code to retrieve the label at a Post Office. Will only be provided when an imageType of LABEL_BROKER is requested.
	LabelBrokerID *string `json:"labelBrokerID,omitempty"`

	// Links Hypermedia links to related resources.
	Links *Links `json:"links,omitempty"`

	// MailingDate The date and time when the request was processed, with a two-hour offset applied.
	MailingDate *time.Time `json:"mailingDate,omitempty"`

	// Postage Amount of Postage Required, does not include insurance or other extra service fees.
	Postage *float32 `json:"postage,omitempty"`

	// RetailDistributionCode Retail Description Code associated with the label
	RetailDistributionCode *string `json:"retailDistributionCode,omitempty"`

	// RoutingInformation The "420" 3-digit GS1 Application Identifier and the 5 or 9 digit Destination ZIP Code&#8482;
	RoutingInformation *string `json:"routingInformation,omitempty"`

	// ServiceTypeCode The Service Type Code associated with the package. A list of Service Type Codes can be found at: [https://postalpro.usps.com/IMPB_Service_Type_Codes](https://postalpro.usps.com/IMPB_Service_Type_Codes)
	ServiceTypeCode *string `json:"serviceTypeCode,omitempty"`

	// Sku Pricing SKU
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	Sku *string `json:"sku,omitempty"`

	// TrackingNumber The human readable version of the package tracking number
	TrackingNumber *string `json:"trackingNumber,omitempty"`

	// Warnings Warnings and additional details around the Label.
	Warnings *Warnings `json:"warnings,omitempty"`

	// Weight The package weight, in weightUOM. Items must weigh 70 pounds (1120 ounces) or less.
	Weight *float32 `json:"weight,omitempty"`

	// WeightUOM Weight Unit of Measurement
	//    * lb - Pounds
	WeightUOM *string `json:"weightUOM,omitempty"`

	// Zone Indicates the calculated zone used for pricing between the provided `originZIPCode` and `destinationZIPCode` for a given `mailClass`, `mailingDate`, `rateIndicator`, and `weight`.
	Zone *string `json:"zone,omitempty"`
}

ReturnLabelMetadata Return Label Metadata

type ReturnLabelMultiPartResponse

type ReturnLabelMultiPartResponse struct {
	// LabelBrokerQR The Label Broker QR Code image, Base64 encoded file contents. Only provided if `imageType` in the `imageInfo` is set to `LABEL_BROKER`.
	LabelBrokerQR *[]byte `json:"labelBrokerQR,omitempty"`

	// ReturnLabelImage Contains the Base64-encoded file contents of the return label image. Provided only when `imageInfo.imageType` is not `NONE`.
	//
	// Note:
	// - Not provided when Extra Service Code `415 - USPS Label Delivery` is requested, as no images are returned for this service.
	ReturnLabelImage *[]byte `json:"returnLabelImage,omitempty"`

	// ReturnLabelMetadata Return Label Metadata
	ReturnLabelMetadata *ReturnLabelMetadata `json:"returnLabelMetadata,omitempty"`

	// ReturnReceiptImage Contains the Base64-encoded file contents of the return receipt image. Provided only when `imageInfo.receiptOption` is `SEPARATE_PAGE`.
	//
	// Note:
	// - When `imageInfo.imageType` is `ZPL203DPI` or `ZPL300DPI` and `imageInfo.receiptOption` is `SEPARATE_PAGE`, the receipt will be returned as an additional label segment within the single ZPL payload in `labelImage`. In this case, `receiptImage` will not be populated.
	// - Not provided when Extra Service Code `415 - USPS Label Delivery` is requested, as no images are returned for this service.
	ReturnReceiptImage *[]byte `json:"returnReceiptImage,omitempty"`
}

ReturnLabelMultiPartResponse defines model for ReturnLabelMultiPartResponse.

type ReturnLabelRequest

type ReturnLabelRequest struct {
	// CustomsForm Domestic Returns Custom Form
	CustomsForm *DomesticReturnsCustomsForm `json:"customsForm,omitempty"`

	// FromAddress The address where the return package is being shipped from. The ZIP Code™ in the `fromAddress` object is used to calculate pricing.
	//
	// Notes:
	// * The First and Last Name or Firm Name are always required.
	// * If the `returnAddress` is not provided, the `fromAddress` will be used as the `returnAddress`.
	FromAddress DomesticLabelAddress `json:"fromAddress"`

	// ImageInfo Image information
	ImageInfo *ReturnLabelRequest_ImageInfo `json:"imageInfo,omitempty"`

	// PackageDescription package description
	PackageDescription ReturnLabelRequest_PackageDescription `json:"packageDescription"`

	// ReturnAddress The address where the package should be returned to if it is deemed undeliverable or returned to sender. This address will be printed in the return address block of the label. This could be a secondary return address in case the toAddress is deemed undeliverable or returned to sender.
	//
	// Note:
	// * The First and Last Name or Firm Name are always required.
	ReturnAddress *DomesticLabelAddress `json:"returnAddress,omitempty"`

	// SenderAddress The address of the business involved (typically the sender of the original package). The `senderAddress` can be different from the `toAddress` when the business address is not where the package is being shipped to.
	//
	// Notes:
	// * The First and Last Name or Firm Name are always required.
	// * `senderAddress` is required when the `shipperVisibilityMethod` field is set to `SENDER_INFORMATION`.
	SenderAddress *DomesticLabelSenderAddress `json:"senderAddress,omitempty"`

	// ToAddress The address where the return package is being shipped to. The ZIP Code™ in the `toAddress` object is used to calculate pricing.
	//
	// Notes:
	// * The First and Last Name or Firm Name are always required.
	// * For return labels, the `toAddress` ZIP Plus 4 is looked up by the API, unless the `ignoreBadAddress` field is set to true or the address cannot be found. If `ignoreBadAddress` field is true then ZIP Plus 4 is required.
	ToAddress DomesticLabelAddress `json:"toAddress"`
}

ReturnLabelRequest Domestic Package Request

type ReturnLabelRequestImageInfoBrandingImageFormat

type ReturnLabelRequestImageInfoBrandingImageFormat string

ReturnLabelRequestImageInfoBrandingImageFormat The format of label branding images to be shown on the generated label image.

Note: * Label branding images will not be shown on labels with customs forms. * Label branding images are not currently supported with an `imageType` of `ZPL203DPI`, `ZPL300DPI`, or `EPL300DPI`. * Label branding images are not currently supported with a `labelType` of `4X4LABEL`. * When a `brandingImageFormat` is provided with a Destination Entry Facility, the Drop-Off Location will not be displayed on the label. * When a `brandingImageFormat` of `RECTANGLE` is provided, Customer Reference #3-#4 cannot be provided since they will not be shown. * When a `brandingImageFormat` of `ONE_SQUARE` or `TWO_SQUARES` is provided, Customer Reference numbers will be shifted to the right to accommodate the image. * When a `brandingImageFormat` of `RECTANGLE` is provided, Customer Reference numbers, package number, and total packages will not be displayed on the label. * A `brandingImageFormat` of `ONE_SQUARE` is currently only supported with `labelType` of `4X6LABEL`, `4X5LABEL`, `6X4LABEL`, and `2X7LABEL` for both outbound and return labels. * A `brandingImageFormat` of `TWO_SQUARES` is currently only supported with `labelType` of `4X6LABEL`, `4X5LABEL`, and `6X4LABEL` for both outbound and return labels. * A `brandingImageFormat` of `RECTANGLE` is currently only supported with `labelType` of `4X6LABEL`, `4X5LABEL`, and `6X4LABEL` for outbound labels and `4X5LABEL` and `6X4LABEL` for return labels.

const (
	ReturnLabelRequestImageInfoBrandingImageFormatNONE       ReturnLabelRequestImageInfoBrandingImageFormat = "NONE"
	ReturnLabelRequestImageInfoBrandingImageFormatONESQUARE  ReturnLabelRequestImageInfoBrandingImageFormat = "ONE_SQUARE"
	ReturnLabelRequestImageInfoBrandingImageFormatRECTANGLE  ReturnLabelRequestImageInfoBrandingImageFormat = "RECTANGLE"
	ReturnLabelRequestImageInfoBrandingImageFormatTWOSQUARES ReturnLabelRequestImageInfoBrandingImageFormat = "TWO_SQUARES"
)

Defines values for ReturnLabelRequestImageInfoBrandingImageFormat.

type ReturnLabelRequestImageInfoImageType

type ReturnLabelRequestImageInfoImageType string

ReturnLabelRequestImageInfoImageType The type of label image requested. If omitted then the default image type is PDF. * `PDF` * `TIFF` * `JPG` * `PNG` * `GIF` * `SVG` * `ZPL203DPI` * `ZPL300DPI` * `EPL300DPI` * `LABEL_BROKER` - Request a USPS QR code to allow your customers with no access to a printer to print at participating Post Office Locations. All USPS API users and third-party integrators utilizing QR codes are subject to the [Label Broker terms and conditions](https://www.usps.com/terms-conditions/label-broker.htm). For more information please see the Label Broker guide available on [GitHub](https://github.com/USPS/api-examples/blob/main/USPS%20APIs%20Domestic%20Labels%20API%20Documentation_2023_0901%20Published.pdf) (Note: Only supports labelType of `4X6LABEL` or `6X4LABEL` and receiptOption of `NONE`). A USPS Label Broker QR code image will be returned in the API response instead of a label image. * `NONE`

Note: - Labels with customs forms only support formats of `PDF`, `TIFF`, `ZPL203DPI`, `ZPL300DPI`, `LABEL_BROKER`, and `NONE`. - Including Extra Service Code `415 - USPS Label Delivery` returns no images and is equivalent to requesting `NONE`. - `EPL300DPI` is not supported for Return Labels. - When the `imageType` is set to `LABEL_BROKER`, the QR code's embedded URL will be returned in the `links` array of the response.

Defines values for ReturnLabelRequestImageInfoImageType.

type ReturnLabelRequestImageInfoLabelType

type ReturnLabelRequestImageInfoLabelType string

ReturnLabelRequestImageInfoLabelType Ability to select the label image size. If omitted then the default label size is `4X6LABEL`.

Note:

  • Currently, customs forms only support `4X6LABEL`.
  • The `labelType` of `2X7LABEL` is not supported with the `imageType` of `ZPL203DPI` or `ZPL300DPI`.
  • The `labelType` of `4X6LABEL` is the only supported format with the `imageType` of `EPL300DPI`.
const (
	N2X7LABEL ReturnLabelRequestImageInfoLabelType = "2X7LABEL"
	N4X4LABEL ReturnLabelRequestImageInfoLabelType = "4X4LABEL"
	N4X5LABEL ReturnLabelRequestImageInfoLabelType = "4X5LABEL"
	N4X6LABEL ReturnLabelRequestImageInfoLabelType = "4X6LABEL"
	N6X4LABEL ReturnLabelRequestImageInfoLabelType = "6X4LABEL"
)

Defines values for ReturnLabelRequestImageInfoLabelType.

type ReturnLabelRequest_ImageInfo

type ReturnLabelRequest_ImageInfo struct {
	// AddImageComments Applicable only when `imageType` is `ZPL203DPI`, `ZPL300DPI`, or `EPL300DPI`.  When `addImageComments` is `true`, comments will be visible within the ZPL or EPL text response to the user to denote different sections of their label.  When `addImageComments` is `false`, no comments will be included in the ZPL or EPL text response.  This will be ignored for any other `imageType`.
	// Example of a ZPL comment:
	// `^FX Start of label. 123e4567-e89b-12d3-a456-426614174000 ^FS`
	AddImageComments *bool `json:"addImageComments,omitempty"`

	// AddZPLComments Note: This field has been deprecated in favor of `addImageComments`.
	//
	// Applicable only when `imageType` is `ZPL203DPI` or `ZPL300DPI`.  When `addZPLComments` is `true`, comments will be visible within the ZPL text response to the user to denote different sections of their label.  When `addZPLComments` is `false`, no comments will be included in the ZPL text response.  This will be ignored for any other `imageType`.
	//
	// Example of a ZPL comment:
	// `^FX Start of label. 123e4567-e89b-12d3-a456-426614174000 ^FS`
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	AddZPLComments *bool `json:"addZPLComments,omitempty"`

	// BrandingImageFormat The format of label branding images to be shown on the generated label image.
	//
	// Note:
	// * Label branding images will not be shown on labels with customs forms.
	// * Label branding images are not currently supported with an `imageType` of `ZPL203DPI`, `ZPL300DPI`, or `EPL300DPI`.
	// * Label branding images are not currently supported with a `labelType` of `4X4LABEL`.
	// * When a `brandingImageFormat` is provided with a Destination Entry Facility, the Drop-Off Location will not be displayed on the label.
	// * When a `brandingImageFormat` of `RECTANGLE` is provided, Customer Reference #3-#4 cannot be provided since they will not be shown.
	// * When a `brandingImageFormat` of `ONE_SQUARE` or `TWO_SQUARES` is provided, Customer Reference numbers will be shifted to the right to accommodate the image.
	// * When a `brandingImageFormat` of `RECTANGLE` is provided, Customer Reference numbers, package number, and total packages will not be displayed on the label.
	// * A `brandingImageFormat` of `ONE_SQUARE` is currently only supported with `labelType` of `4X6LABEL`, `4X5LABEL`, `6X4LABEL`, and `2X7LABEL` for both outbound and return labels.
	// * A `brandingImageFormat` of `TWO_SQUARES` is currently only supported with `labelType` of `4X6LABEL`, `4X5LABEL`, and `6X4LABEL` for both outbound and return labels.
	// * A `brandingImageFormat` of `RECTANGLE` is currently only supported with `labelType` of `4X6LABEL`, `4X5LABEL`, and `6X4LABEL` for outbound labels and `4X5LABEL` and `6X4LABEL` for return labels.
	BrandingImageFormat *ReturnLabelRequestImageInfoBrandingImageFormat `json:"brandingImageFormat,omitempty"`

	// BrandingImageUUIDs The UUIDs associated with custom images uploaded in the Logo Branding endpoint: /branding
	//
	// Note:
	// * These UUIDs must have been created with the same Payment Authorization Label Owner CRID in use when creating the label
	// * When using `ONE_SQUARE` or `RECTANGLE` the brandingImageUUIDs list should include only one imageUUID string.
	// * When using `TWO_SQUARES` the brandingImageUUIDs list should include only two imageUUID strings.
	BrandingImageUUIDs *[]string `json:"brandingImageUUIDs,omitempty"`

	// ImageType The type of label image requested.  If omitted then the default image type is PDF.
	// * `PDF`
	// * `TIFF`
	// * `JPG`
	// * `PNG`
	// * `GIF`
	// * `SVG`
	// * `ZPL203DPI`
	// * `ZPL300DPI`
	// * `EPL300DPI`
	// * `LABEL_BROKER` - Request a USPS QR code to allow your customers with no access to a printer to print at participating Post Office Locations. All USPS API users and third-party integrators utilizing QR codes are subject to the [Label Broker terms and conditions](https://www.usps.com/terms-conditions/label-broker.htm). For more information please see the Label Broker guide available on [GitHub](https://github.com/USPS/api-examples/blob/main/USPS%20APIs%20Domestic%20Labels%20API%20Documentation_2023_0901%20Published.pdf) (Note: Only supports labelType of `4X6LABEL` or `6X4LABEL` and receiptOption of `NONE`).  A USPS Label Broker QR code image will be returned in the API response instead of a label image.
	// * `NONE`
	//
	// Note:
	// - Labels with customs forms only support formats of `PDF`, `TIFF`, `ZPL203DPI`, `ZPL300DPI`, `LABEL_BROKER`, and `NONE`.
	// - Including Extra Service Code `415 - USPS Label Delivery` returns no images and is equivalent to requesting `NONE`.
	// - `EPL300DPI` is not supported for Return Labels.
	// - When the `imageType` is set to `LABEL_BROKER`, the QR code's embedded URL will be returned in the `links` array of the response.
	ImageType *ReturnLabelRequestImageInfoImageType `json:"imageType,omitempty"`

	// IncludeLabelBrokerPDF Applicable only when `imageType` is `LABEL_BROKER`. When `includeLabelBrokerPDF` is `true`, two label images will be returned in the multi-part and vendor response as `labelBrokerQR` and `labelImage`. `labelBrokerQR` will contain the base64 PNG of the Label Broker QR Code and `labelImage` will contain the base64 PDF of the Label stored in Label Broker. When `includeLabelBrokerPDF` is `false`, one image will be returned in the multi-part and vendor response as `labelImage` as the base64 PNG of the Label Broker QR Code.
	IncludeLabelBrokerPDF *bool `json:"includeLabelBrokerPDF,omitempty"`

	// LabelType Ability to select the label image size.  If omitted then the default label size is `4X6LABEL`.
	//
	// Note:
	//   * Currently, customs forms only support `4X6LABEL`.
	//   * The `labelType` of `2X7LABEL` is not supported with the `imageType` of `ZPL203DPI` or `ZPL300DPI`.
	//   * The `labelType` of `4X6LABEL` is the only supported format with the `imageType` of `EPL300DPI`.
	LabelType *ReturnLabelRequestImageInfoLabelType `json:"labelType,omitempty"`

	// ReceiptOption Receipt Option
	ReceiptOption *string `json:"receiptOption,omitempty"`

	// ReturnLabel This field has been deprecated.  A return label cannot be generated with a return label.  This field will be ignored in the request.
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	ReturnLabel *bool `json:"returnLabel,omitempty"`

	// ShipInfo indicates if revenue protection information is printed on the label. (true or false)
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	ShipInfo *bool `json:"shipInfo,omitempty"`

	// SuppressMailDate This field has been deprecated.
	//
	// Note:
	//  * Mail Date will not be printed on Return Labels without a customs form.
	//  * Mail Date will be printed on Domestic Customs Forms. The customs form will always display the Date of Mailing.
	//  * The date the label was created cannot be suppressed and will always print on the label.
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	SuppressMailDate *bool `json:"suppressMailDate,omitempty"`

	// SuppressPostage This field has been deprecated.  Postage value is not printed on Return Labels.
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	SuppressPostage      *bool                  `json:"suppressPostage,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

ReturnLabelRequest_ImageInfo defines model for ReturnLabelRequest.ImageInfo.

func (ReturnLabelRequest_ImageInfo) Get

func (a ReturnLabelRequest_ImageInfo) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for ReturnLabelRequest_ImageInfo. Returns the specified element and whether it was found

func (ReturnLabelRequest_ImageInfo) MarshalJSON

func (a ReturnLabelRequest_ImageInfo) MarshalJSON() ([]byte, error)

Override default JSON handling for ReturnLabelRequest_ImageInfo to handle AdditionalProperties

func (*ReturnLabelRequest_ImageInfo) Set

func (a *ReturnLabelRequest_ImageInfo) Set(fieldName string, value interface{})

Setter for additional properties for ReturnLabelRequest_ImageInfo

func (*ReturnLabelRequest_ImageInfo) UnmarshalJSON

func (a *ReturnLabelRequest_ImageInfo) UnmarshalJSON(b []byte) error

Override default JSON handling for ReturnLabelRequest_ImageInfo to handle AdditionalProperties

type ReturnLabelRequest_PackageDescription

type ReturnLabelRequest_PackageDescription struct {
	// contains filtered or unexported fields
}

ReturnLabelRequest_PackageDescription package description

func (ReturnLabelRequest_PackageDescription) AsReturnsPackageDescription

func (t ReturnLabelRequest_PackageDescription) AsReturnsPackageDescription() (ReturnsPackageDescription, error)

AsReturnsPackageDescription returns the union data inside the ReturnLabelRequest_PackageDescription as a ReturnsPackageDescription

func (ReturnLabelRequest_PackageDescription) AsReturnsPackageDescriptionWithoutRateIndicator

func (t ReturnLabelRequest_PackageDescription) AsReturnsPackageDescriptionWithoutRateIndicator() (ReturnsPackageDescriptionWithoutRateIndicator, error)

AsReturnsPackageDescriptionWithoutRateIndicator returns the union data inside the ReturnLabelRequest_PackageDescription as a ReturnsPackageDescriptionWithoutRateIndicator

func (*ReturnLabelRequest_PackageDescription) FromReturnsPackageDescription

func (t *ReturnLabelRequest_PackageDescription) FromReturnsPackageDescription(v ReturnsPackageDescription) error

FromReturnsPackageDescription overwrites any union data inside the ReturnLabelRequest_PackageDescription as the provided ReturnsPackageDescription

func (*ReturnLabelRequest_PackageDescription) FromReturnsPackageDescriptionWithoutRateIndicator

func (t *ReturnLabelRequest_PackageDescription) FromReturnsPackageDescriptionWithoutRateIndicator(v ReturnsPackageDescriptionWithoutRateIndicator) error

FromReturnsPackageDescriptionWithoutRateIndicator overwrites any union data inside the ReturnLabelRequest_PackageDescription as the provided ReturnsPackageDescriptionWithoutRateIndicator

func (ReturnLabelRequest_PackageDescription) MarshalJSON

func (t ReturnLabelRequest_PackageDescription) MarshalJSON() ([]byte, error)

func (*ReturnLabelRequest_PackageDescription) MergeReturnsPackageDescription

func (t *ReturnLabelRequest_PackageDescription) MergeReturnsPackageDescription(v ReturnsPackageDescription) error

MergeReturnsPackageDescription performs a merge with any union data inside the ReturnLabelRequest_PackageDescription, using the provided ReturnsPackageDescription

func (*ReturnLabelRequest_PackageDescription) MergeReturnsPackageDescriptionWithoutRateIndicator

func (t *ReturnLabelRequest_PackageDescription) MergeReturnsPackageDescriptionWithoutRateIndicator(v ReturnsPackageDescriptionWithoutRateIndicator) error

MergeReturnsPackageDescriptionWithoutRateIndicator performs a merge with any union data inside the ReturnLabelRequest_PackageDescription, using the provided ReturnsPackageDescriptionWithoutRateIndicator

func (*ReturnLabelRequest_PackageDescription) UnmarshalJSON

func (t *ReturnLabelRequest_PackageDescription) UnmarshalJSON(b []byte) error

type ReturnLabelVendorResponse

type ReturnLabelVendorResponse struct {
	// SKU Pricing SKU
	SKU *string `json:"SKU,omitempty"`

	// BannerText Banner text printed on the label
	BannerText *string `json:"bannerText,omitempty"`

	// DimensionalWeight The dimensional weight of package, if greater than specified in weight, in ounces.
	DimensionalWeight *float32 `json:"dimensionalWeight,omitempty"`

	// ExtraServices Extra services requested on the mailpiece.
	ExtraServices *ExtraServiceResponse `json:"extraServices,omitempty"`

	// Fees Fees associated to the package.
	Fees *[]struct {
		// SKU Pricing SKU
		SKU *string `json:"SKU,omitempty"`

		// Name Name of the fee.
		Name *string `json:"name,omitempty"`

		// Price The price for the fee.
		Price *float32 `json:"price,omitempty"`
	} `json:"fees,omitempty"`

	// LabelAddress The address where the package is being shipped from. The ZIP Code™ in the `fromAddress` object is used to calculate pricing.
	//
	// Notes:
	// * The First and Last Name or Firm Name are always required.
	// * If the `returnAddress` is not provided, the `fromAddress` will be used as the `returnAddress`.
	// * If the `returnLabel` field is set to “true”, then the `fromAddress` ZIP Plus 4 is looked up by the API, unless the `ignoreBadAddress` field is set to true or the address cannot be found. If `ignoreBadAddress` field is true then ZIP Plus 4 is required.
	LabelAddress *DomesticLabelAddress `json:"labelAddress,omitempty"`

	// LabelBrokerID Unique Label Broker ID that can be used as an alternative to the Label Broker QR Code to retrieve the label at a Post Office. Will only be provided when an imageType of LABEL_BROKER is requested.
	LabelBrokerID *string `json:"labelBrokerID,omitempty"`

	// LabelBrokerQR The Label Broker QR Code image, Base64 encoded file contents. Only provided if `imageType` in the `imageInfo` is set to `LABEL_BROKER`.
	LabelBrokerQR *[]byte `json:"labelBrokerQR,omitempty"`

	// Links Hypermedia links to related resources.
	Links *Links `json:"links,omitempty"`

	// MailingDate The date and time when the request was processed, with a two-hour offset applied.
	MailingDate *time.Time `json:"mailingDate,omitempty"`

	// Postage Amount of Postage Required, does not include insurance or other extra service fees.
	Postage *float32 `json:"postage,omitempty"`

	// RetailDistributionCode Retail Description Code associated with the label
	RetailDistributionCode *string `json:"retailDistributionCode,omitempty"`

	// ReturnLabelImage Contains the Base64-encoded file contents of the return label image. Provided only when `imageInfo.imageType` is not `NONE`.
	//
	// Note:
	// - Not provided when Extra Service Code `415 - USPS Label Delivery` is requested, as no images are returned for this service.
	ReturnLabelImage *[]byte `json:"returnLabelImage,omitempty"`

	// ReturnReceiptImage Contains the Base64-encoded file contents of the return receipt image. Provided only when `imageInfo.receiptOption` is `SEPARATE_PAGE`.
	//
	// Note:
	// - When `imageInfo.imageType` is `ZPL203DPI` or `ZPL300DPI` and `imageInfo.receiptOption` is `SEPARATE_PAGE`, the receipt will be returned as an additional label segment within the single ZPL payload in `labelImage`. In this case, `receiptImage` will not be populated.
	// - Not provided when Extra Service Code `415 - USPS Label Delivery` is requested, as no images are returned for this service.
	ReturnReceiptImage *[]byte `json:"returnReceiptImage,omitempty"`

	// RoutingInformation The "420" 3-digit GS1 Application Identifier and the 5 or 9 digit Destination ZIP Code&#8482;
	RoutingInformation *string `json:"routingInformation,omitempty"`

	// ServiceTypeCode The Service Type Code associated with the package. A list of Service Type Codes can be found at: [https://postalpro.usps.com/IMPB_Service_Type_Codes](https://postalpro.usps.com/IMPB_Service_Type_Codes)
	ServiceTypeCode *string `json:"serviceTypeCode,omitempty"`

	// Sku Pricing SKU
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	Sku *string `json:"sku,omitempty"`

	// TrackingNumber The human readable version of the package tracking number
	TrackingNumber *string `json:"trackingNumber,omitempty"`

	// Warnings Warnings and additional details around the Label.
	Warnings *Warnings `json:"warnings,omitempty"`

	// Weight The package weight, in weightUOM. Items must weigh 70 pounds (1120 ounces) or less.
	Weight *float32 `json:"weight,omitempty"`

	// WeightUOM Weight Unit of Measurement
	//    * lb - Pounds
	WeightUOM *string `json:"weightUOM,omitempty"`

	// Zone Indicates the calculated zone used for pricing between the provided `originZIPCode` and `destinationZIPCode` for a given `mailClass`, `mailingDate`, `rateIndicator`, and `weight`.
	Zone *string `json:"zone,omitempty"`
}

ReturnLabelVendorResponse defines model for ReturnLabelVendorResponse.

type ReturnsPackageDescription

type ReturnsPackageDescription struct {
	// CustomerReference Used for shippers to print a value on a label and included in the Shipping Services Files.
	CustomerReference *[]DomesticCustomerReference `json:"customerReference,omitempty"`

	// DestinationEntryFacilityAddress Destination entry facility address
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	DestinationEntryFacilityAddress *DomesticAddress `json:"destinationEntryFacilityAddress,omitempty"`

	// DimensionsUOM Dimensions unit of measure
	// * in - Inches
	DimensionsUOM *ReturnsPackageDescriptionDimensionsUOM `json:"dimensionsUOM,omitempty"`

	// ExtraServices Extra Service Code requested.
	// * 365 - Global Direct Entry
	// * 415 - USPS Label Delivery
	// * 480 - Tracking Plus 6 Months
	// * 481 - Tracking Plus 1 Year
	// * 482 - Tracking Plus 3 Years
	// * 483 - Tracking Plus 5 Years
	// * 484 - Tracking Plus 7 Years
	// * 485 - Tracking Plus 10 Years
	// * 486 - Tracking Plus Signature 3 Years
	// * 487 - Tracking Plus Signature 5 Years
	// * 488 - Tracking Plus Signature 7 Years
	// * 489 - Tracking Plus Signature 10 Years
	// * 810 - HAZMAT Air Eligible Ethanol Package
	// * 811 - HAZMAT Class 1 - Toy Propellant/Safety Fuse Package
	// * 812 - HAZMAT Class 3 – Flammable Liquid Package
	// * 813 - HAZMAT Class 7 - Radioactive Materials Package
	// * 814 - HAZMAT Class 8 - Corrosive Materials Package
	// * 815 - HAZMAT Class 8 - Nonspillable Wet Battery Package
	// * 816 - HAZMAT Class 9 - Lithium Battery Marked - Ground Only Package
	// * 817 - HAZMAT Class 9 - Lithium Battery - Returns Package
	// * 818 - HAZMAT Class 9 - Lithium batteries, marked package
	// * 819 - HAZMAT Class 9 - Dry Ice Package
	// * 820 - HAZMAT Class 9 - Lithium batteries, unmarked package
	// * 821 - HAZMAT Class 9 - Magnetized Materials Package
	// * 822 - HAZMAT Division 4.1 – Flammable Solids or Safety Matches Package
	// * 823 - HAZMAT Division 5.1 - Oxidizers Package
	// * 824 - HAZMAT Division 5.2 - Organic Peroxides Package
	// * 825 - HAZMAT Division 6.1 – Toxic Materials Package
	// * 826 - HAZMAT Division 6.2 – Infectious Substances Package
	// * 827 - HAZMAT Excepted Quantity Provision Package
	// * 828 - HAZMAT Ground Only
	// * 829 - HAZMAT ID8000 Consumer Commodity Package
	// * 830 - HAZMAT Lighters Package
	// * 831 - HAZMAT LTD QTY Ground Package
	// * 832 - HAZMAT Small Quantity Provision Package
	// * 857 - Hazardous Material
	// * 910 - Certified Mail
	// * 911 - Certified Mail Restricted Delivery
	// * 912 - Certified Mail Adult Signature Required
	// * 913 - Certified Mail Adult Signature Restricted Delivery
	// * 920 - USPS Tracking
	// * 921 - Signature Confirmation
	// * 922 - Adult Signature Required 21 or Over
	// * 923 - Adult Signature Restricted Delivery 21 or Over
	// * 924 - Signature Confirmation Restricted Delivery
	// * 925 - Priority Mail Express Merchandise Insurance
	// * 930 - Insurance <= $500
	// * 931 - Insurance > $500
	// * 934 - Insurance Restricted Delivery
	// * 955 - Return Receipt
	// * 957 - Return Receipt Electronic
	// * 981 - Signature Requested (PRIORITY_MAIL_EXPRESS only)
	// * 986 - PO to Addressee (PRIORITY_MAIL_EXPRESS only)
	// * 991 - Sunday Delivery
	//
	// Note:
	//  * When the extra service code "930" is provided in the request, if the item value is over $500, "930" will automatically be replaced with "931" - Insurance (Greater than $500).
	//  * USPS Label Delivery (Extra Service Code "415"): When requesting this service, no images will be returned in the API response. The label and receipt will be printed and mailed to the `fromAddress` provided. The mailed label will always include a receipt on the page. This service is not available at all locations.
	//  * Some service codes require a combination with extra services such as "955" and "957". For all valid combinations, visit [https://postalpro.usps.com/IMPB_Service_Type_Codes](https://postalpro.usps.com/IMPB_Service_Type_Codes).
	ExtraServices *[]ExtraService `json:"extraServices,omitempty"`

	// Girth The girth of the container, in dimensionsUOM. If partial dimensions are provided, an error response will return. Length, Width, Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. In addition, Girth is required only for a non- rectangular package in addition to Length, Width, Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non- rectangular packages.
	Girth *float32 `json:"girth,omitempty"`

	// HasNonstandardCharacteristics Package is nonstandard. Nonstandard packages include cylindrical tubes and rolls, certain high-density items, cartons containing more than 24 ounces of liquids in one or more glass containers, cartons containing 1 gallon or more of liquid in metal or plastic containers, and items in [201.7.6.2](https://pe.usps.com/text/dmm300/201.htm#7.6.2).
	HasNonstandardCharacteristics *bool `json:"hasNonstandardCharacteristics,omitempty"`

	// Height The height of the container, in dimensionsUOM. If partial dimensions are provided, an error response will return. Length, Width, and Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. Girth is required only for a non-rectangular package in addition to Length, Width, and Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non-rectangular packages.
	Height float32 `json:"height"`

	// InductionZIPCode The 5-Digit ZIP Code representing the location where the package is being inducted (i.e. dropped off) into the mailstream.  When provided, this ZIP Code will be used for pricing instead of `fromAddress.ZIPCode`.
	InductionZIPCode *InductionZIPCode `json:"inductionZIPCode,omitempty"`

	// Length The length of the container, in dimensionsUOM. If partial dimensions are provided, an error response will return. Length, Width, and Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. Girth is required only for a non-rectangular package in addition to Length, Width, and Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non-rectangular packages.
	Length float32 `json:"length"`

	// MailClass The mail service requested.
	//
	// Note:
	// - `FIRST-CLASS_PACKAGE_RETURN_SERVICE` is deprecated and will convert to `USPS_GROUND_ADVANTAGE_RETURN_SERVICE`
	// - `GROUND_RETURN_SERVICE` is deprecated and will convert to `USPS_GROUND_ADVANTAGE_RETURN_SERVICE`
	MailClass ReturnsPackageDescriptionMailClass `json:"mailClass"`

	// PackageOptions Options added to packages that are less frequently used
	PackageOptions *DomesticPackageReturnOptions `json:"packageOptions,omitempty"`

	// ProcessingCategory Value designates if the shipment is `MACHINABLE`, `NONSTANDARD`, `LETTERS`, or `FLATS`.
	//
	// Note:
	// * The processing category `LETTERS` is only valid when the mail class is `PRIORITY_MAIL_RETURN_SERVICE` or `PRIORITY_MAIL_EXPRESS_RETURN_SERVICE` for returns shipments.
	// * The processing category `FLATS` is not valid for mail class `USPS_GROUND_ADVANTAGE_RETURN_SERVICE`.
	// * `IRREGULAR` is deprecated and will convert to `NONSTANDARD` as of 01/19/2025.
	// * `NON_MACHINABLE` is deprecated and will convert to `NONSTANDARD` as of 01/19/2025.
	ProcessingCategory ReturnsPackageDescriptionProcessingCategory `json:"processingCategory"`

	// RateIndicator Use to specify USPS containers/packaging or container attributes that may affect postage.
	//
	// Note:
	//   * Effective 07/12/2026:  Rate indicators `Q6`, `Q7`, `Q8`, `Q9`, and `Q0` are no longer supported.  The dimensions for Cubic Soft Pack tiers `P5`, `P6`, `P7`, `P8`, and `P9` will be updated to include the dimensions for Tiers 6-10.  For updated tiers and more information, please view the [Postal Bulletin](https://about.usps.com/postal-bulletin/2026/pb22705/html/updt_001.htm).
	//
	// Rate indicator list:
	//  * CP - Cubic Parcel
	//  * DN - Dimensional Nonrectangular
	//  * DR - Dimensional Rectangular
	//  * E4 - Priority Mail Express Flat Rate Envelope - Post Office To Addressee
	//  * E6 - Priority Mail Express Legal Flat Rate Envelope
	//  * FA - Legal Flat Rate Envelope
	//  * FB - Medium Flat Rate Box/Large Flat Rate Bag
	//  * FE - Flat Rate Envelope
	//  * FP - Padded Flat Rate Envelope
	//  * FS - Small Flat Rate Box
	//  * OS - Oversized
	//  * P5 - Cubic Soft Pack Tier 1
	//  * P6 - Cubic Soft Pack Tier 2
	//  * P7 - Cubic Soft Pack Tier 3
	//  * P8 - Cubic Soft Pack Tier 4
	//  * P9 - Cubic Soft Pack Tier 5
	//  * Q6 - Cubic Soft Pack Tier 6
	//  * Q7 - Cubic Soft Pack Tier 7
	//  * Q8 - Cubic Soft Pack Tier 8
	//  * Q9 - Cubic Soft Pack Tier 9
	//  * Q0 - Cubic Soft Pack Tier 10
	//  * PA - Priority Mail Express Single Piece
	//  * PL - Large Flat Rate Box
	//  * PM - Large Flat Rate Box APO/FPO/DPO
	//  * SP - Single Piece
	RateIndicator ReturnsPackageDescriptionRateIndicator `json:"rateIndicator"`

	// ShipperVisibilityMethod When generating labels for a third party shipper the label provider must capture and provide contact details of the individual or entity to whom they provide the label. For return labels, there is one method for reporting shipper information to USPS:
	//
	// 1. An alternative method allows for the label provider to assign a unique alphanumeric value known as a `platformUserId` to each shipper and to report the `platformUserId` together with the required shipper contact details. When using this method the shipper contact details are required in the `senderAddress` object (including `streetAddress`, `city`, `state`, `ZIPCode`, `phone`, `email`, `platformUserId` & `firstName`/`lastName` or `firm`) and this field should be populated with 'SENDER_INFORMATION'.
	ShipperVisibilityMethod *ReturnsPackageDescriptionShipperVisibilityMethod `json:"shipperVisibilityMethod,omitempty"`

	// Weight The package weight, in weightUOM (Unit Of Measure). Items must weigh 70 pounds (1120 ounces) or less.
	Weight float32 `json:"weight"`

	// WeightUOM Weight Unit of Measurement
	//   * lb - Pounds
	WeightUOM *ReturnsPackageDescriptionWeightUOM `json:"weightUOM,omitempty"`

	// Width The width of the container, in dimensionsUOM. If partial dimensions are provided, an error response will return. Length, Width, and Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. Girth is required only for a non-rectangular package in addition to Length, Width, and Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non- rectangular packages.
	Width                float32                `json:"width"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

ReturnsPackageDescription defines model for ReturnsPackageDescription.

func (ReturnsPackageDescription) Get

func (a ReturnsPackageDescription) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for ReturnsPackageDescription. Returns the specified element and whether it was found

func (ReturnsPackageDescription) MarshalJSON

func (a ReturnsPackageDescription) MarshalJSON() ([]byte, error)

Override default JSON handling for ReturnsPackageDescription to handle AdditionalProperties

func (*ReturnsPackageDescription) Set

func (a *ReturnsPackageDescription) Set(fieldName string, value interface{})

Setter for additional properties for ReturnsPackageDescription

func (*ReturnsPackageDescription) UnmarshalJSON

func (a *ReturnsPackageDescription) UnmarshalJSON(b []byte) error

Override default JSON handling for ReturnsPackageDescription to handle AdditionalProperties

type ReturnsPackageDescriptionDimensionsUOM

type ReturnsPackageDescriptionDimensionsUOM string

ReturnsPackageDescriptionDimensionsUOM Dimensions unit of measure * in - Inches

const (
	ReturnsPackageDescriptionDimensionsUOMIn ReturnsPackageDescriptionDimensionsUOM = "in"
)

Defines values for ReturnsPackageDescriptionDimensionsUOM.

type ReturnsPackageDescriptionMailClass

type ReturnsPackageDescriptionMailClass string

ReturnsPackageDescriptionMailClass The mail service requested.

Note: - `FIRST-CLASS_PACKAGE_RETURN_SERVICE` is deprecated and will convert to `USPS_GROUND_ADVANTAGE_RETURN_SERVICE` - `GROUND_RETURN_SERVICE` is deprecated and will convert to `USPS_GROUND_ADVANTAGE_RETURN_SERVICE`

const (
	ReturnsPackageDescriptionMailClassFIRSTCLASSPACKAGERETURNSERVICE   ReturnsPackageDescriptionMailClass = "FIRST-CLASS_PACKAGE_RETURN_SERVICE"
	ReturnsPackageDescriptionMailClassGROUNDRETURNSERVICE              ReturnsPackageDescriptionMailClass = "GROUND_RETURN_SERVICE"
	ReturnsPackageDescriptionMailClassPRIORITYMAILEXPRESSRETURNSERVICE ReturnsPackageDescriptionMailClass = "PRIORITY_MAIL_EXPRESS_RETURN_SERVICE"
	ReturnsPackageDescriptionMailClassPRIORITYMAILRETURNSERVICE        ReturnsPackageDescriptionMailClass = "PRIORITY_MAIL_RETURN_SERVICE"
	ReturnsPackageDescriptionMailClassUSPSGROUNDADVANTAGERETURNSERVICE ReturnsPackageDescriptionMailClass = "USPS_GROUND_ADVANTAGE_RETURN_SERVICE"
)

Defines values for ReturnsPackageDescriptionMailClass.

type ReturnsPackageDescriptionProcessingCategory

type ReturnsPackageDescriptionProcessingCategory string

ReturnsPackageDescriptionProcessingCategory Value designates if the shipment is `MACHINABLE`, `NONSTANDARD`, `LETTERS`, or `FLATS`.

Note: * The processing category `LETTERS` is only valid when the mail class is `PRIORITY_MAIL_RETURN_SERVICE` or `PRIORITY_MAIL_EXPRESS_RETURN_SERVICE` for returns shipments. * The processing category `FLATS` is not valid for mail class `USPS_GROUND_ADVANTAGE_RETURN_SERVICE`. * `IRREGULAR` is deprecated and will convert to `NONSTANDARD` as of 01/19/2025. * `NON_MACHINABLE` is deprecated and will convert to `NONSTANDARD` as of 01/19/2025.

const (
	ReturnsPackageDescriptionProcessingCategoryFLATS         ReturnsPackageDescriptionProcessingCategory = "FLATS"
	ReturnsPackageDescriptionProcessingCategoryIRREGULAR     ReturnsPackageDescriptionProcessingCategory = "IRREGULAR"
	ReturnsPackageDescriptionProcessingCategoryLETTERS       ReturnsPackageDescriptionProcessingCategory = "LETTERS"
	ReturnsPackageDescriptionProcessingCategoryMACHINABLE    ReturnsPackageDescriptionProcessingCategory = "MACHINABLE"
	ReturnsPackageDescriptionProcessingCategoryNONMACHINABLE ReturnsPackageDescriptionProcessingCategory = "NON_MACHINABLE"
	ReturnsPackageDescriptionProcessingCategoryNONSTANDARD   ReturnsPackageDescriptionProcessingCategory = "NONSTANDARD"
)

Defines values for ReturnsPackageDescriptionProcessingCategory.

type ReturnsPackageDescriptionRateIndicator

type ReturnsPackageDescriptionRateIndicator string

ReturnsPackageDescriptionRateIndicator Use to specify USPS containers/packaging or container attributes that may affect postage.

Note:

  • Effective 07/12/2026: Rate indicators `Q6`, `Q7`, `Q8`, `Q9`, and `Q0` are no longer supported. The dimensions for Cubic Soft Pack tiers `P5`, `P6`, `P7`, `P8`, and `P9` will be updated to include the dimensions for Tiers 6-10. For updated tiers and more information, please view the [Postal Bulletin](https://about.usps.com/postal-bulletin/2026/pb22705/html/updt_001.htm).

Rate indicator list:

  • CP - Cubic Parcel
  • DN - Dimensional Nonrectangular
  • DR - Dimensional Rectangular
  • E4 - Priority Mail Express Flat Rate Envelope - Post Office To Addressee
  • E6 - Priority Mail Express Legal Flat Rate Envelope
  • FA - Legal Flat Rate Envelope
  • FB - Medium Flat Rate Box/Large Flat Rate Bag
  • FE - Flat Rate Envelope
  • FP - Padded Flat Rate Envelope
  • FS - Small Flat Rate Box
  • OS - Oversized
  • P5 - Cubic Soft Pack Tier 1
  • P6 - Cubic Soft Pack Tier 2
  • P7 - Cubic Soft Pack Tier 3
  • P8 - Cubic Soft Pack Tier 4
  • P9 - Cubic Soft Pack Tier 5
  • Q6 - Cubic Soft Pack Tier 6
  • Q7 - Cubic Soft Pack Tier 7
  • Q8 - Cubic Soft Pack Tier 8
  • Q9 - Cubic Soft Pack Tier 9
  • Q0 - Cubic Soft Pack Tier 10
  • PA - Priority Mail Express Single Piece
  • PL - Large Flat Rate Box
  • PM - Large Flat Rate Box APO/FPO/DPO
  • SP - Single Piece
const (
	ReturnsPackageDescriptionRateIndicatorCP ReturnsPackageDescriptionRateIndicator = "CP"
	ReturnsPackageDescriptionRateIndicatorDN ReturnsPackageDescriptionRateIndicator = "DN"
	ReturnsPackageDescriptionRateIndicatorDR ReturnsPackageDescriptionRateIndicator = "DR"
	ReturnsPackageDescriptionRateIndicatorE4 ReturnsPackageDescriptionRateIndicator = "E4"
	ReturnsPackageDescriptionRateIndicatorE6 ReturnsPackageDescriptionRateIndicator = "E6"
	ReturnsPackageDescriptionRateIndicatorFA ReturnsPackageDescriptionRateIndicator = "FA"
	ReturnsPackageDescriptionRateIndicatorFB ReturnsPackageDescriptionRateIndicator = "FB"
	ReturnsPackageDescriptionRateIndicatorFE ReturnsPackageDescriptionRateIndicator = "FE"
	ReturnsPackageDescriptionRateIndicatorFP ReturnsPackageDescriptionRateIndicator = "FP"
	ReturnsPackageDescriptionRateIndicatorFS ReturnsPackageDescriptionRateIndicator = "FS"
	ReturnsPackageDescriptionRateIndicatorOS ReturnsPackageDescriptionRateIndicator = "OS"
	ReturnsPackageDescriptionRateIndicatorP5 ReturnsPackageDescriptionRateIndicator = "P5"
	ReturnsPackageDescriptionRateIndicatorP6 ReturnsPackageDescriptionRateIndicator = "P6"
	ReturnsPackageDescriptionRateIndicatorP7 ReturnsPackageDescriptionRateIndicator = "P7"
	ReturnsPackageDescriptionRateIndicatorP8 ReturnsPackageDescriptionRateIndicator = "P8"
	ReturnsPackageDescriptionRateIndicatorP9 ReturnsPackageDescriptionRateIndicator = "P9"
	ReturnsPackageDescriptionRateIndicatorPA ReturnsPackageDescriptionRateIndicator = "PA"
	ReturnsPackageDescriptionRateIndicatorPL ReturnsPackageDescriptionRateIndicator = "PL"
	ReturnsPackageDescriptionRateIndicatorPM ReturnsPackageDescriptionRateIndicator = "PM"
	ReturnsPackageDescriptionRateIndicatorQ0 ReturnsPackageDescriptionRateIndicator = "Q0"
	ReturnsPackageDescriptionRateIndicatorQ6 ReturnsPackageDescriptionRateIndicator = "Q6"
	ReturnsPackageDescriptionRateIndicatorQ7 ReturnsPackageDescriptionRateIndicator = "Q7"
	ReturnsPackageDescriptionRateIndicatorQ8 ReturnsPackageDescriptionRateIndicator = "Q8"
	ReturnsPackageDescriptionRateIndicatorQ9 ReturnsPackageDescriptionRateIndicator = "Q9"
	ReturnsPackageDescriptionRateIndicatorSP ReturnsPackageDescriptionRateIndicator = "SP"
)

Defines values for ReturnsPackageDescriptionRateIndicator.

type ReturnsPackageDescriptionShipperVisibilityMethod

type ReturnsPackageDescriptionShipperVisibilityMethod string

ReturnsPackageDescriptionShipperVisibilityMethod When generating labels for a third party shipper the label provider must capture and provide contact details of the individual or entity to whom they provide the label. For return labels, there is one method for reporting shipper information to USPS:

1. An alternative method allows for the label provider to assign a unique alphanumeric value known as a `platformUserId` to each shipper and to report the `platformUserId` together with the required shipper contact details. When using this method the shipper contact details are required in the `senderAddress` object (including `streetAddress`, `city`, `state`, `ZIPCode`, `phone`, `email`, `platformUserId` & `firstName`/`lastName` or `firm`) and this field should be populated with 'SENDER_INFORMATION'.

const (
	ReturnsPackageDescriptionShipperVisibilityMethodSENDERINFORMATION ReturnsPackageDescriptionShipperVisibilityMethod = "SENDER_INFORMATION"
)

Defines values for ReturnsPackageDescriptionShipperVisibilityMethod.

type ReturnsPackageDescriptionWeightUOM

type ReturnsPackageDescriptionWeightUOM string

ReturnsPackageDescriptionWeightUOM Weight Unit of Measurement

  • lb - Pounds
const (
	ReturnsPackageDescriptionWeightUOMLb ReturnsPackageDescriptionWeightUOM = "lb"
)

Defines values for ReturnsPackageDescriptionWeightUOM.

type ReturnsPackageDescriptionWithoutRateIndicator

type ReturnsPackageDescriptionWithoutRateIndicator struct {
	// CustomerReference Used for shippers to print a value on a label and included in the Shipping Services Files.
	CustomerReference *[]DomesticCustomerReference `json:"customerReference,omitempty"`

	// DestinationEntryFacilityAddress Destination entry facility address
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	DestinationEntryFacilityAddress *DomesticAddress `json:"destinationEntryFacilityAddress,omitempty"`

	// DimensionsUOM Dimensions unit of measure
	// * in - Inches
	DimensionsUOM *ReturnsPackageDescriptionWithoutRateIndicatorDimensionsUOM `json:"dimensionsUOM,omitempty"`

	// ExtraServices Extra Service Code requested.
	// * 365 - Global Direct Entry
	// * 415 - USPS Label Delivery
	// * 480 - Tracking Plus 6 Months
	// * 481 - Tracking Plus 1 Year
	// * 482 - Tracking Plus 3 Years
	// * 483 - Tracking Plus 5 Years
	// * 484 - Tracking Plus 7 Years
	// * 485 - Tracking Plus 10 Years
	// * 486 - Tracking Plus Signature 3 Years
	// * 487 - Tracking Plus Signature 5 Years
	// * 488 - Tracking Plus Signature 7 Years
	// * 489 - Tracking Plus Signature 10 Years
	// * 810 - HAZMAT Air Eligible Ethanol Package
	// * 811 - HAZMAT Class 1 - Toy Propellant/Safety Fuse Package
	// * 812 - HAZMAT Class 3 – Flammable Liquid Package
	// * 813 - HAZMAT Class 7 - Radioactive Materials Package
	// * 814 - HAZMAT Class 8 - Corrosive Materials Package
	// * 815 - HAZMAT Class 8 - Nonspillable Wet Battery Package
	// * 816 - HAZMAT Class 9 - Lithium Battery Marked - Ground Only Package
	// * 817 - HAZMAT Class 9 - Lithium Battery - Returns Package
	// * 818 - HAZMAT Class 9 - Lithium batteries, marked package
	// * 819 - HAZMAT Class 9 - Dry Ice Package
	// * 820 - HAZMAT Class 9 - Lithium batteries, unmarked package
	// * 821 - HAZMAT Class 9 - Magnetized Materials Package
	// * 822 - HAZMAT Division 4.1 – Flammable Solids or Safety Matches Package
	// * 823 - HAZMAT Division 5.1 - Oxidizers Package
	// * 824 - HAZMAT Division 5.2 - Organic Peroxides Package
	// * 825 - HAZMAT Division 6.1 – Toxic Materials Package
	// * 826 - HAZMAT Division 6.2 – Infectious Substances Package
	// * 827 - HAZMAT Excepted Quantity Provision Package
	// * 828 - HAZMAT Ground Only
	// * 829 - HAZMAT ID8000 Consumer Commodity Package
	// * 830 - HAZMAT Lighters Package
	// * 831 - HAZMAT LTD QTY Ground Package
	// * 832 - HAZMAT Small Quantity Provision Package
	// * 857 - Hazardous Material
	// * 910 - Certified Mail
	// * 911 - Certified Mail Restricted Delivery
	// * 912 - Certified Mail Adult Signature Required
	// * 913 - Certified Mail Adult Signature Restricted Delivery
	// * 920 - USPS Tracking
	// * 921 - Signature Confirmation
	// * 922 - Adult Signature Required 21 or Over
	// * 923 - Adult Signature Restricted Delivery 21 or Over
	// * 924 - Signature Confirmation Restricted Delivery
	// * 925 - Priority Mail Express Merchandise Insurance
	// * 930 - Insurance <= $500
	// * 931 - Insurance > $500
	// * 934 - Insurance Restricted Delivery
	// * 955 - Return Receipt
	// * 957 - Return Receipt Electronic
	// * 981 - Signature Requested (PRIORITY_MAIL_EXPRESS only)
	// * 986 - PO to Addressee (PRIORITY_MAIL_EXPRESS only)
	// * 991 - Sunday Delivery
	//
	// Note:
	//  * When the extra service code "930" is provided in the request, if the item value is over $500, "930" will automatically be replaced with "931" - Insurance (Greater than $500).
	//  * USPS Label Delivery (Extra Service Code "415"): When requesting this service, no images will be returned in the API response. The label and receipt will be printed and mailed to the `fromAddress` provided. The mailed label will always include a receipt on the page. This service is not available at all locations.
	//  * Some service codes require a combination with extra services such as "955" and "957". For all valid combinations, visit [https://postalpro.usps.com/IMPB_Service_Type_Codes](https://postalpro.usps.com/IMPB_Service_Type_Codes).
	ExtraServices *[]ExtraService `json:"extraServices,omitempty"`

	// Girth The girth of the container, in dimensionsUOM. If partial dimensions are provided, an error response will return. Length, Width, Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. In addition, Girth is required only for a non- rectangular package in addition to Length, Width, Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non- rectangular packages.
	Girth *float32 `json:"girth,omitempty"`

	// HasNonstandardCharacteristics Package is nonstandard. Nonstandard packages include cylindrical tubes and rolls, certain high-density items, cartons containing more than 24 ounces of liquids in one or more glass containers, cartons containing 1 gallon or more of liquid in metal or plastic containers, and items in [201.7.6.2](https://pe.usps.com/text/dmm300/201.htm#7.6.2).
	HasNonstandardCharacteristics *bool `json:"hasNonstandardCharacteristics,omitempty"`

	// Height The height of the container, in dimensionsUOM. If partial dimensions are provided, an error response will return. Length, Width, and Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. Girth is required only for a non-rectangular package in addition to Length, Width, and Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non-rectangular packages.
	Height float32 `json:"height"`

	// InductionZIPCode The 5-Digit ZIP Code representing the location where the package is being inducted (i.e. dropped off) into the mailstream.  When provided, this ZIP Code will be used for pricing instead of `fromAddress.ZIPCode`.
	InductionZIPCode *InductionZIPCode `json:"inductionZIPCode,omitempty"`

	// Length The length of the container, in dimensionsUOM. If partial dimensions are provided, an error response will return. Length, Width, and Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. Girth is required only for a non-rectangular package in addition to Length, Width, and Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non-rectangular packages.
	Length float32 `json:"length"`

	// MailClass The mail service requested.
	//
	// Note:
	// - `FIRST-CLASS_PACKAGE_RETURN_SERVICE` is deprecated and will convert to `USPS_GROUND_ADVANTAGE_RETURN_SERVICE`
	// - `GROUND_RETURN_SERVICE` is deprecated and will convert to `USPS_GROUND_ADVANTAGE_RETURN_SERVICE`
	MailClass ReturnsPackageDescriptionWithoutRateIndicatorMailClass `json:"mailClass"`

	// PackageOptions Options added to packages that are less frequently used
	PackageOptions *DomesticPackageReturnOptions `json:"packageOptions,omitempty"`

	// PackagingType USPS packaging or container attributes that may affect postage. If the packaging is customer provided, use `VARIABLE`.
	PackagingType ReturnsPackageDescriptionWithoutRateIndicatorPackagingType `json:"packagingType"`

	// ProcessingCategory Value designates if the shipment is `MACHINABLE`, `NONSTANDARD`, `LETTERS`, or `FLATS`.
	//
	// Note:
	// * The processing category `LETTERS` is only valid when the mail class is `PRIORITY_MAIL_RETURN_SERVICE` or `PRIORITY_MAIL_EXPRESS_RETURN_SERVICE` for returns shipments.
	// * The processing category `FLATS` is not valid for mail class `USPS_GROUND_ADVANTAGE_RETURN_SERVICE`.
	// * `IRREGULAR` is deprecated and will convert to `NONSTANDARD` as of 01/19/2025.
	// * `NON_MACHINABLE` is deprecated and will convert to `NONSTANDARD` as of 01/19/2025.
	ProcessingCategory ReturnsPackageDescriptionWithoutRateIndicatorProcessingCategory `json:"processingCategory"`

	// Shape The shape of the package
	Shape ReturnsPackageDescriptionWithoutRateIndicatorShape `json:"shape"`

	// ShipperVisibilityMethod When generating labels for a third party shipper the label provider must capture and provide contact details of the individual or entity to whom they provide the label. For return labels, there is one method for reporting shipper information to USPS:
	//
	// 1. An alternative method allows for the label provider to assign a unique alphanumeric value known as a `platformUserId` to each shipper and to report the `platformUserId` together with the required shipper contact details. When using this method the shipper contact details are required in the `senderAddress` object (including `streetAddress`, `city`, `state`, `ZIPCode`, `phone`, `email`, `platformUserId` & `firstName`/`lastName` or `firm`) and this field should be populated with 'SENDER_INFORMATION'.
	ShipperVisibilityMethod *ReturnsPackageDescriptionWithoutRateIndicatorShipperVisibilityMethod `json:"shipperVisibilityMethod,omitempty"`

	// Weight The package weight, in weightUOM (Unit Of Measure). Items must weigh 70 pounds (1120 ounces) or less.
	Weight float32 `json:"weight"`

	// WeightUOM Weight Unit of Measurement
	//   * lb - Pounds
	WeightUOM *ReturnsPackageDescriptionWithoutRateIndicatorWeightUOM `json:"weightUOM,omitempty"`

	// Width The width of the container, in dimensionsUOM. If partial dimensions are provided, an error response will return. Length, Width, and Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. Girth is required only for a non-rectangular package in addition to Length, Width, and Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non- rectangular packages.
	Width                float32                `json:"width"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

ReturnsPackageDescriptionWithoutRateIndicator defines model for ReturnsPackageDescriptionWithoutRateIndicator.

func (ReturnsPackageDescriptionWithoutRateIndicator) Get

func (a ReturnsPackageDescriptionWithoutRateIndicator) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for ReturnsPackageDescriptionWithoutRateIndicator. Returns the specified element and whether it was found

func (ReturnsPackageDescriptionWithoutRateIndicator) MarshalJSON

Override default JSON handling for ReturnsPackageDescriptionWithoutRateIndicator to handle AdditionalProperties

func (*ReturnsPackageDescriptionWithoutRateIndicator) Set

func (a *ReturnsPackageDescriptionWithoutRateIndicator) Set(fieldName string, value interface{})

Setter for additional properties for ReturnsPackageDescriptionWithoutRateIndicator

func (*ReturnsPackageDescriptionWithoutRateIndicator) UnmarshalJSON

Override default JSON handling for ReturnsPackageDescriptionWithoutRateIndicator to handle AdditionalProperties

type ReturnsPackageDescriptionWithoutRateIndicatorDimensionsUOM

type ReturnsPackageDescriptionWithoutRateIndicatorDimensionsUOM string

ReturnsPackageDescriptionWithoutRateIndicatorDimensionsUOM Dimensions unit of measure * in - Inches

Defines values for ReturnsPackageDescriptionWithoutRateIndicatorDimensionsUOM.

type ReturnsPackageDescriptionWithoutRateIndicatorMailClass

type ReturnsPackageDescriptionWithoutRateIndicatorMailClass string

ReturnsPackageDescriptionWithoutRateIndicatorMailClass The mail service requested.

Note: - `FIRST-CLASS_PACKAGE_RETURN_SERVICE` is deprecated and will convert to `USPS_GROUND_ADVANTAGE_RETURN_SERVICE` - `GROUND_RETURN_SERVICE` is deprecated and will convert to `USPS_GROUND_ADVANTAGE_RETURN_SERVICE`

const (
	FIRSTCLASSPACKAGERETURNSERVICE   ReturnsPackageDescriptionWithoutRateIndicatorMailClass = "FIRST-CLASS_PACKAGE_RETURN_SERVICE"
	GROUNDRETURNSERVICE              ReturnsPackageDescriptionWithoutRateIndicatorMailClass = "GROUND_RETURN_SERVICE"
	PRIORITYMAILEXPRESSRETURNSERVICE ReturnsPackageDescriptionWithoutRateIndicatorMailClass = "PRIORITY_MAIL_EXPRESS_RETURN_SERVICE"
	PRIORITYMAILRETURNSERVICE        ReturnsPackageDescriptionWithoutRateIndicatorMailClass = "PRIORITY_MAIL_RETURN_SERVICE"
	USPSGROUNDADVANTAGERETURNSERVICE ReturnsPackageDescriptionWithoutRateIndicatorMailClass = "USPS_GROUND_ADVANTAGE_RETURN_SERVICE"
)

Defines values for ReturnsPackageDescriptionWithoutRateIndicatorMailClass.

type ReturnsPackageDescriptionWithoutRateIndicatorPackagingType

type ReturnsPackageDescriptionWithoutRateIndicatorPackagingType string

ReturnsPackageDescriptionWithoutRateIndicatorPackagingType USPS packaging or container attributes that may affect postage. If the packaging is customer provided, use `VARIABLE`.

const (
	ReturnsPackageDescriptionWithoutRateIndicatorPackagingTypeBASICPRESORT           ReturnsPackageDescriptionWithoutRateIndicatorPackagingType = "BASIC_PRESORT"
	ReturnsPackageDescriptionWithoutRateIndicatorPackagingTypeCUBICPARCELS           ReturnsPackageDescriptionWithoutRateIndicatorPackagingType = "CUBIC_PARCELS"
	ReturnsPackageDescriptionWithoutRateIndicatorPackagingTypeCUBICSOFTPACK          ReturnsPackageDescriptionWithoutRateIndicatorPackagingType = "CUBIC_SOFT_PACK"
	ReturnsPackageDescriptionWithoutRateIndicatorPackagingTypeFLATRATEENVELOPE       ReturnsPackageDescriptionWithoutRateIndicatorPackagingType = "FLAT_RATE_ENVELOPE"
	ReturnsPackageDescriptionWithoutRateIndicatorPackagingTypeLEGALFLATRATEENVELOPE  ReturnsPackageDescriptionWithoutRateIndicatorPackagingType = "LEGAL_FLAT_RATE_ENVELOPE"
	ReturnsPackageDescriptionWithoutRateIndicatorPackagingTypeLGFLATRATEBOX          ReturnsPackageDescriptionWithoutRateIndicatorPackagingType = "LG_FLAT_RATE_BOX"
	ReturnsPackageDescriptionWithoutRateIndicatorPackagingTypeMDFLATRATEBOX          ReturnsPackageDescriptionWithoutRateIndicatorPackagingType = "MD_FLAT_RATE_BOX"
	ReturnsPackageDescriptionWithoutRateIndicatorPackagingTypeN5DIGITPRESORT         ReturnsPackageDescriptionWithoutRateIndicatorPackagingType = "5-DIGIT_PRESORT"
	ReturnsPackageDescriptionWithoutRateIndicatorPackagingTypePADDEDFLATRATEENVELOPE ReturnsPackageDescriptionWithoutRateIndicatorPackagingType = "PADDED_FLAT_RATE_ENVELOPE"
	ReturnsPackageDescriptionWithoutRateIndicatorPackagingTypeSMFLATRATEBOX          ReturnsPackageDescriptionWithoutRateIndicatorPackagingType = "SM_FLAT_RATE_BOX"
	ReturnsPackageDescriptionWithoutRateIndicatorPackagingTypeVARIABLE               ReturnsPackageDescriptionWithoutRateIndicatorPackagingType = "VARIABLE"
)

Defines values for ReturnsPackageDescriptionWithoutRateIndicatorPackagingType.

type ReturnsPackageDescriptionWithoutRateIndicatorProcessingCategory

type ReturnsPackageDescriptionWithoutRateIndicatorProcessingCategory string

ReturnsPackageDescriptionWithoutRateIndicatorProcessingCategory Value designates if the shipment is `MACHINABLE`, `NONSTANDARD`, `LETTERS`, or `FLATS`.

Note: * The processing category `LETTERS` is only valid when the mail class is `PRIORITY_MAIL_RETURN_SERVICE` or `PRIORITY_MAIL_EXPRESS_RETURN_SERVICE` for returns shipments. * The processing category `FLATS` is not valid for mail class `USPS_GROUND_ADVANTAGE_RETURN_SERVICE`. * `IRREGULAR` is deprecated and will convert to `NONSTANDARD` as of 01/19/2025. * `NON_MACHINABLE` is deprecated and will convert to `NONSTANDARD` as of 01/19/2025.

const (
	ReturnsPackageDescriptionWithoutRateIndicatorProcessingCategoryFLATS         ReturnsPackageDescriptionWithoutRateIndicatorProcessingCategory = "FLATS"
	ReturnsPackageDescriptionWithoutRateIndicatorProcessingCategoryIRREGULAR     ReturnsPackageDescriptionWithoutRateIndicatorProcessingCategory = "IRREGULAR"
	ReturnsPackageDescriptionWithoutRateIndicatorProcessingCategoryLETTERS       ReturnsPackageDescriptionWithoutRateIndicatorProcessingCategory = "LETTERS"
	ReturnsPackageDescriptionWithoutRateIndicatorProcessingCategoryMACHINABLE    ReturnsPackageDescriptionWithoutRateIndicatorProcessingCategory = "MACHINABLE"
	ReturnsPackageDescriptionWithoutRateIndicatorProcessingCategoryNONMACHINABLE ReturnsPackageDescriptionWithoutRateIndicatorProcessingCategory = "NON_MACHINABLE"
	ReturnsPackageDescriptionWithoutRateIndicatorProcessingCategoryNONSTANDARD   ReturnsPackageDescriptionWithoutRateIndicatorProcessingCategory = "NONSTANDARD"
)

Defines values for ReturnsPackageDescriptionWithoutRateIndicatorProcessingCategory.

type ReturnsPackageDescriptionWithoutRateIndicatorShape

type ReturnsPackageDescriptionWithoutRateIndicatorShape string

ReturnsPackageDescriptionWithoutRateIndicatorShape The shape of the package

const (
	ReturnsPackageDescriptionWithoutRateIndicatorShapeNONRECTANGULAR ReturnsPackageDescriptionWithoutRateIndicatorShape = "NON_RECTANGULAR"
	ReturnsPackageDescriptionWithoutRateIndicatorShapeRECTANGULAR    ReturnsPackageDescriptionWithoutRateIndicatorShape = "RECTANGULAR"
)

Defines values for ReturnsPackageDescriptionWithoutRateIndicatorShape.

type ReturnsPackageDescriptionWithoutRateIndicatorShipperVisibilityMethod

type ReturnsPackageDescriptionWithoutRateIndicatorShipperVisibilityMethod string

ReturnsPackageDescriptionWithoutRateIndicatorShipperVisibilityMethod When generating labels for a third party shipper the label provider must capture and provide contact details of the individual or entity to whom they provide the label. For return labels, there is one method for reporting shipper information to USPS:

1. An alternative method allows for the label provider to assign a unique alphanumeric value known as a `platformUserId` to each shipper and to report the `platformUserId` together with the required shipper contact details. When using this method the shipper contact details are required in the `senderAddress` object (including `streetAddress`, `city`, `state`, `ZIPCode`, `phone`, `email`, `platformUserId` & `firstName`/`lastName` or `firm`) and this field should be populated with 'SENDER_INFORMATION'.

const (
	ReturnsPackageDescriptionWithoutRateIndicatorShipperVisibilityMethodSENDERINFORMATION ReturnsPackageDescriptionWithoutRateIndicatorShipperVisibilityMethod = "SENDER_INFORMATION"
)

Defines values for ReturnsPackageDescriptionWithoutRateIndicatorShipperVisibilityMethod.

type ReturnsPackageDescriptionWithoutRateIndicatorWeightUOM

type ReturnsPackageDescriptionWithoutRateIndicatorWeightUOM string

ReturnsPackageDescriptionWithoutRateIndicatorWeightUOM Weight Unit of Measurement

  • lb - Pounds
const (
	ReturnsPackageDescriptionWithoutRateIndicatorWeightUOMLb ReturnsPackageDescriptionWithoutRateIndicatorWeightUOM = "lb"
)

Defines values for ReturnsPackageDescriptionWithoutRateIndicatorWeightUOM.

type SerialNumberFormat

type SerialNumberFormat string

SerialNumberFormat Used to specify the barcode construct used for the generated tracking number. For details on barcode constructs, reference Appendix J in [Pub 199](https://postalpro.usps.com/pub199).

`STANDARD` - Will generate a `C01`, `C03`, `C05`, or `C07` barcode construct, based on the Label Owner's `MID` in the Payment Authorization Token.

`EXTENDED` - Will generate a `C02` or `C06` barcode construct, based on the Label Owner's `MID` in the Payment Authorization Token.

const (
	EXTENDED SerialNumberFormat = "EXTENDED"
	STANDARD SerialNumberFormat = "STANDARD"
)

Defines values for SerialNumberFormat.

type ShippingContents

type ShippingContents struct {
	// HSTariffNumber For commercial items only. The HS tariff number is based on the Harmonized Commodity Description and Coding System developed by the World Customs Organization.
	// Providing this value is strongly recommended for faster processing. If not supplied, USPS will attempt to look up the HS tariff number, which may result in longer response times.
	// The value should follow the pattern: `^\.*(?:[A-Za-z\d]\.*){6,14}$`.
	// For more information, see: [https://hts.usitc.gov/current](https://hts.usitc.gov/current).
	HSTariffNumber *string `json:"HSTariffNumber,omitempty"`

	// CountryofOrigin 2 digit Alpha Country Code defined by ISO is required for international address.
	CountryofOrigin *string `json:"countryofOrigin,omitempty"`

	// ItemCategory Category of the item being shipped.
	ItemCategory *string `json:"itemCategory,omitempty"`

	// ItemDescription Description of the item.  It is important to note that the following descriptions, regardless of case sensitivity, are not considered valid: None, Not Applicable, N/A, Null, Gift, and Merchandise.
	ItemDescription *string `json:"itemDescription,omitempty"`

	// ItemQuantity Quantity of the item. Integer value required.
	ItemQuantity *int `json:"itemQuantity,omitempty"`

	// ItemSubcategory Subcategory of the item being shipped.
	ItemSubcategory *string `json:"itemSubcategory,omitempty"`

	// ItemTotalValue The total item value, in USD, of the items matching the `itemDescription`.
	ItemTotalValue *float32 `json:"itemTotalValue,omitempty"`

	// ItemTotalWeight Provide the total weight in `weightUOM` for the all items matching the `itemDescription`.
	ItemTotalWeight *float32 `json:"itemTotalWeight,omitempty"`

	// ItemValue Value of the individual item in USD.
	//
	// Note:
	// * This field has been deprecated in favor of `itemTotalValue` and will be removed in a future release. Please transition to using `itemTotalValue`.
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	ItemValue *float32 `json:"itemValue,omitempty"`

	// ItemWeight Provide the weight in `weightUOM` for the individual item listed with `itemDescription`.
	//
	// Note:
	// * This field has been deprecated in favor of `itemTotalWeight` and will be removed in a future release. Please transition to using `itemTotalWeight`.
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	ItemWeight *float32 `json:"itemWeight,omitempty"`

	// WeightUOM Weight Unit of Measurement
	//   * lb - Pounds
	WeightUOM            *ShippingContentsWeightUOM `json:"weightUOM,omitempty"`
	AdditionalProperties map[string]interface{}     `json:"-"`
}

ShippingContents Required repeating up to 30 times if generating an Integrated Customs Form, otherwise not required.

func (ShippingContents) Get

func (a ShippingContents) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for ShippingContents. Returns the specified element and whether it was found

func (ShippingContents) MarshalJSON

func (a ShippingContents) MarshalJSON() ([]byte, error)

Override default JSON handling for ShippingContents to handle AdditionalProperties

func (*ShippingContents) Set

func (a *ShippingContents) Set(fieldName string, value interface{})

Setter for additional properties for ShippingContents

func (*ShippingContents) UnmarshalJSON

func (a *ShippingContents) UnmarshalJSON(b []byte) error

Override default JSON handling for ShippingContents to handle AdditionalProperties

type ShippingContentsWeightUOM

type ShippingContentsWeightUOM string

ShippingContentsWeightUOM Weight Unit of Measurement

  • lb - Pounds
const (
	ShippingContentsWeightUOMLb ShippingContentsWeightUOM = "lb"
)

Defines values for ShippingContentsWeightUOM.

type State

type State = string

State This is the two-character state code of the address.

type TrackingNumber

type TrackingNumber = string

TrackingNumber defines model for TrackingNumber.

type Warnings

type Warnings = []struct {
	// WarningCode Code corresponding to the warning
	WarningCode *string `json:"warningCode,omitempty"`

	// WarningDescription Warning or additional information regarding the Label.
	WarningDescription *string `json:"warningDescription,omitempty"`
}

Warnings Warnings and additional details around the Label.

type XIdempotencyKey

type XIdempotencyKey = openapi_types.UUID

XIdempotencyKey defines model for X-Idempotency-Key.

type XPaymentAuthorizationToken

type XPaymentAuthorizationToken = string

XPaymentAuthorizationToken defines model for X-Payment-Authorization-Token.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL