internationallabels

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 internationallabels 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 NewDeleteInternationalLabelByIdempotencyRequest

func NewDeleteInternationalLabelByIdempotencyRequest(server string, params *DeleteInternationalLabelByIdempotencyParams) (*http.Request, error)

NewDeleteInternationalLabelByIdempotencyRequest generates requests for DeleteInternationalLabelByIdempotency

func NewDeleteInternationalLabelByTrackingRequest

func NewDeleteInternationalLabelByTrackingRequest(server string, trackingNumber TrackingNumber, params *DeleteInternationalLabelByTrackingParams) (*http.Request, error)

NewDeleteInternationalLabelByTrackingRequest generates requests for DeleteInternationalLabelByTracking

func NewPostInternationalIndiciaRequest

func NewPostInternationalIndiciaRequest(server string, params *PostInternationalIndiciaParams, body PostInternationalIndiciaJSONRequestBody) (*http.Request, error)

NewPostInternationalIndiciaRequest calls the generic PostInternationalIndicia builder with application/json body

func NewPostInternationalIndiciaRequestWithBody

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

NewPostInternationalIndiciaRequestWithBody generates requests for PostInternationalIndicia with any type of body

func NewPostInternationalLabelRequest

func NewPostInternationalLabelRequest(server string, params *PostInternationalLabelParams, body PostInternationalLabelJSONRequestBody) (*http.Request, error)

NewPostInternationalLabelRequest calls the generic PostInternationalLabel builder with application/json body

func NewPostInternationalLabelRequestWithBody

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

NewPostInternationalLabelRequestWithBody generates requests for PostInternationalLabel 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

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 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 BadRequest

type BadRequest = ErrorMessage

BadRequest Standard error message response.

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 Response information for a label cancellation request including the tracking number, status, and dispute ID if applicable.

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 (
	CANCELED CancelResponseStatus = "CANCELED"
	DISPUTED 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) DeleteInternationalLabelByIdempotency

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

func (*Client) DeleteInternationalLabelByTracking

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

func (*Client) PostInternationalIndicia

func (c *Client) PostInternationalIndicia(ctx context.Context, params *PostInternationalIndiciaParams, body PostInternationalIndiciaJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostInternationalIndiciaWithBody

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

func (*Client) PostInternationalLabel

func (c *Client) PostInternationalLabel(ctx context.Context, params *PostInternationalLabelParams, body PostInternationalLabelJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostInternationalLabelWithBody

func (c *Client) PostInternationalLabelWithBody(ctx context.Context, params *PostInternationalLabelParams, 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)

type ClientInterface

type ClientInterface interface {
	// PostInternationalIndiciaWithBody request with any body
	PostInternationalIndiciaWithBody(ctx context.Context, params *PostInternationalIndiciaParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PostInternationalIndicia(ctx context.Context, params *PostInternationalIndiciaParams, body PostInternationalIndiciaJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

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

	PostInternationalLabel(ctx context.Context, params *PostInternationalLabelParams, body PostInternationalLabelJSONRequestBody, 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)

	// DeleteInternationalLabelByTracking request
	DeleteInternationalLabelByTracking(ctx context.Context, trackingNumber TrackingNumber, params *DeleteInternationalLabelByTrackingParams, 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) DeleteInternationalLabelByIdempotencyWithResponse

func (c *ClientWithResponses) DeleteInternationalLabelByIdempotencyWithResponse(ctx context.Context, params *DeleteInternationalLabelByIdempotencyParams, reqEditors ...RequestEditorFn) (*DeleteInternationalLabelByIdempotencyResponse, error)

DeleteInternationalLabelByIdempotencyWithResponse request returning *DeleteInternationalLabelByIdempotencyResponse

func (*ClientWithResponses) DeleteInternationalLabelByTrackingWithResponse

func (c *ClientWithResponses) DeleteInternationalLabelByTrackingWithResponse(ctx context.Context, trackingNumber TrackingNumber, params *DeleteInternationalLabelByTrackingParams, reqEditors ...RequestEditorFn) (*DeleteInternationalLabelByTrackingResponse, error)

DeleteInternationalLabelByTrackingWithResponse request returning *DeleteInternationalLabelByTrackingResponse

func (*ClientWithResponses) PostInternationalIndiciaWithBodyWithResponse

func (c *ClientWithResponses) PostInternationalIndiciaWithBodyWithResponse(ctx context.Context, params *PostInternationalIndiciaParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostInternationalIndiciaResponse, error)

PostInternationalIndiciaWithBodyWithResponse request with arbitrary body returning *PostInternationalIndiciaResponse

func (*ClientWithResponses) PostInternationalLabelWithBodyWithResponse

func (c *ClientWithResponses) PostInternationalLabelWithBodyWithResponse(ctx context.Context, params *PostInternationalLabelParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostInternationalLabelResponse, error)

PostInternationalLabelWithBodyWithResponse request with arbitrary body returning *PostInternationalLabelResponse

func (*ClientWithResponses) PostInternationalLabelWithResponse

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

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// PostInternationalIndiciaWithBodyWithResponse request with any body
	PostInternationalIndiciaWithBodyWithResponse(ctx context.Context, params *PostInternationalIndiciaParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostInternationalIndiciaResponse, error)

	PostInternationalIndiciaWithResponse(ctx context.Context, params *PostInternationalIndiciaParams, body PostInternationalIndiciaJSONRequestBody, reqEditors ...RequestEditorFn) (*PostInternationalIndiciaResponse, error)

	// DeleteInternationalLabelByIdempotencyWithResponse request
	DeleteInternationalLabelByIdempotencyWithResponse(ctx context.Context, params *DeleteInternationalLabelByIdempotencyParams, reqEditors ...RequestEditorFn) (*DeleteInternationalLabelByIdempotencyResponse, error)

	// PostInternationalLabelWithBodyWithResponse request with any body
	PostInternationalLabelWithBodyWithResponse(ctx context.Context, params *PostInternationalLabelParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostInternationalLabelResponse, error)

	PostInternationalLabelWithResponse(ctx context.Context, params *PostInternationalLabelParams, body PostInternationalLabelJSONRequestBody, reqEditors ...RequestEditorFn) (*PostInternationalLabelResponse, 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)

	// DeleteInternationalLabelByTrackingWithResponse request
	DeleteInternationalLabelByTrackingWithResponse(ctx context.Context, trackingNumber TrackingNumber, params *DeleteInternationalLabelByTrackingParams, reqEditors ...RequestEditorFn) (*DeleteInternationalLabelByTrackingResponse, error)
}

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

type CustomerReference

type CustomerReference struct {
	// ReferenceNumber A user-assigned number for internal use, such as Order, Invoice,  Customer, or Return Merchandise Authorization Numbers. These values will be included in the Shipping Services File.
	//
	// Note:
	// - Customer Reference numbers are not displayed with Customs Forms.
	ReferenceNumber      *string                `json:"referenceNumber,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

CustomerReference User-assigned reference numbers for internal tracking purposes such as order, invoice, or customer numbers.

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 USPS requires the ITN **_or_** the Exemption.
	//
	// * **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 International shipments.

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 CustomsReference

type CustomsReference struct {
	// Contact Contact information for customs reference.  When multiple contact methods are provided, the customs form will prioritize printing phone number, then email address, then the fax number.  All contact methods will be manifested electronically.
	Contact *struct {
		// Email Email address used for redirect notification via email.
		Email *Email `json:"email,omitempty"`

		// Fax The phone number, including the country extension and area code or the local national format, with no punctuation.
		Fax *Phone `json:"fax,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"`
	} `json:"contact,omitempty"`

	// Reference Customs Reference.
	Reference *string `json:"reference,omitempty"`

	// ReferenceType The type of reference number being provided.
	ReferenceType *CustomsReferenceReferenceType `json:"referenceType,omitempty"`
}

CustomsReference Reference information for customs processing including tax codes, VAT numbers, importer codes, and contact details.

type CustomsReferenceReferenceType

type CustomsReferenceReferenceType string

CustomsReferenceReferenceType The type of reference number being provided.

const (
	IMPORTERCODE CustomsReferenceReferenceType = "IMPORTER_CODE"
	TAXCODE      CustomsReferenceReferenceType = "TAX_CODE"
	VATNUMBER    CustomsReferenceReferenceType = "VAT_NUMBER"
)

Defines values for CustomsReferenceReferenceType.

type DeleteInternationalLabelByIdempotencyParams

type DeleteInternationalLabelByIdempotencyParams struct {
	// 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"`

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

DeleteInternationalLabelByIdempotencyParams defines parameters for DeleteInternationalLabelByIdempotency.

type DeleteInternationalLabelByIdempotencyResponse

type DeleteInternationalLabelByIdempotencyResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *CancelResponse
	XML200       *CancelResponse
	JSON400      *BadRequest
	XML400       *BadRequest
	JSON401      *Unauthorized
	XML401       *Unauthorized
	JSON403      *Forbidden
	XML403       *Forbidden
	JSON429      *TooManyRequests
	XML429       *TooManyRequests
	JSON503      *ServiceUnavailable
	XML503       *ServiceUnavailable
}

func ParseDeleteInternationalLabelByIdempotencyResponse

func ParseDeleteInternationalLabelByIdempotencyResponse(rsp *http.Response) (*DeleteInternationalLabelByIdempotencyResponse, error)

ParseDeleteInternationalLabelByIdempotencyResponse parses an HTTP response from a DeleteInternationalLabelByIdempotencyWithResponse call

func (DeleteInternationalLabelByIdempotencyResponse) Status

Status returns HTTPResponse.Status

func (DeleteInternationalLabelByIdempotencyResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type DeleteInternationalLabelByTrackingParams

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

DeleteInternationalLabelByTrackingParams defines parameters for DeleteInternationalLabelByTracking.

type DeleteInternationalLabelByTrackingResponse

type DeleteInternationalLabelByTrackingResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *CancelResponse
	XML200       *CancelResponse
	JSON400      *BadRequest
	XML400       *BadRequest
	JSON401      *Unauthorized
	XML401       *Unauthorized
	JSON403      *Forbidden
	XML403       *Forbidden
	JSON429      *TooManyRequests
	XML429       *TooManyRequests
	JSON503      *ServiceUnavailable
	XML503       *ServiceUnavailable
}

func ParseDeleteInternationalLabelByTrackingResponse

func ParseDeleteInternationalLabelByTrackingResponse(rsp *http.Response) (*DeleteInternationalLabelByTrackingResponse, error)

ParseDeleteInternationalLabelByTrackingResponse parses an HTTP response from a DeleteInternationalLabelByTrackingWithResponse call

func (DeleteInternationalLabelByTrackingResponse) Status

Status returns HTTPResponse.Status

func (DeleteInternationalLabelByTrackingResponse) StatusCode

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 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 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 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 EUProductIDFields

type EUProductIDFields struct {
	// MerchantProductIdentifier European Union Merchant Product Identifier.  Required for all shipments with `customsForm.incoterm` value of `1` (Business to Consumer) going to the European Union.
	//
	// Assigned by the online seller, marketplace, or platform. It uniquely identifies the product within that platform (e.g., Product ID, internal SKU)
	MerchantProductIdentifier string `json:"merchantProductIdentifier"`

	// NonstandardizedManufacturerProductIdentifier European Union Non-standardized Manufacturer Product Identifier.  Required for all shipments with `customsForm.incoterm` value of `1` (Business to Consumer) going to the European Union.
	//
	// Assigned by the manufacturer, producer, or supplier. It does not rely on an international standard; if none exists, the manufacturer must create one.
	NonstandardizedManufacturerProductIdentifier string `json:"nonstandardizedManufacturerProductIdentifier"`

	// StandardizedManufacturerProductIdentifier European Union Standardized Manufacturer Product Identifier.
	//
	// A globally recognized identifier such as a UPC or ISBN, when available.  Required only when available and when shipping with `customsForm.incoterm` value of `1` (Business to Consumer) going to the European Union.  If unavailable, this field is not required.
	StandardizedManufacturerProductIdentifier *string `json:"standardizedManufacturerProductIdentifier,omitempty"`
}

EUProductIDFields Additional values specific to European Union Shipments. Required when shipping `customsContentType` of `MERCHANDISE` or `COMMERCIAL_SAMPLE` to European Union destinations with `incoterm` value of `1`.

If `incoterm` is not provided, these fields should not be populated.

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 *[]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 Available extra service codes

const (
	N480 ExtraService = 480
	N481 ExtraService = 481
	N482 ExtraService = 482
	N483 ExtraService = 483
	N484 ExtraService = 484
	N486 ExtraService = 486
	N487 ExtraService = 487
	N488 ExtraService = 488
	N813 ExtraService = 813
	N820 ExtraService = 820
	N826 ExtraService = 826
	N857 ExtraService = 857
	N930 ExtraService = 930
	N931 ExtraService = 931
	N955 ExtraService = 955
)

Defines values for ExtraService.

type ExtraServiceResponse

type ExtraServiceResponse = []struct {
	// Price The price for the extra service.
	Price *float32 `json:"price,omitempty"`

	// ServiceID The unique identifier of the extra service.
	ServiceID *string `json:"serviceID,omitempty"`

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

	// Sku SKU of the extra service.
	Sku *string `json:"sku,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 Forbidden

type Forbidden = ErrorMessage

Forbidden Standard error message response.

type HttpRequestDoer

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

Doer performs HTTP requests.

The standard http.Client implements this interface.

type ImageInfo

type ImageInfo struct {
	// AddZPLComments 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`
	AddZPLComments *bool `json:"addZPLComments,omitempty"`

	// HoldForManifest This field is deprecated and will be removed in a future release.
	// By default, all international packages are manifested at the end of the day.
	// Use `packageDescription.packageOptions.immediateManifest` to trigger an immediate manifest.
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	HoldForManifest *bool `json:"holdForManifest,omitempty"`

	// ImageType The type of label image requested.
	//  * '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).
	//  * 'PDF'
	//  * 'TIFF'
	//  * 'ZPL203DPI'
	//  * 'ZPL300DPI'
	//  * 'NONE'
	//
	// Note:
	//  - 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 The requested label image size to generate.
	LabelType *ImageInfoLabelType `json:"labelType,omitempty"`

	// SuppressPostage Indicates if Insured Fees and Postal Charges/Fees should be
	// omitted from the label image.  If true, Insured Fees and Postal
	// Charges/Fees values will be removed.
	SuppressPostage *bool `json:"suppressPostage,omitempty"`
}

ImageInfo The Image Object defines label characteristics

type ImageInfoImageType

type ImageInfoImageType string

ImageInfoImageType The type of label image requested.

Note:

  • 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 (
	ImageInfoImageTypeLABELBROKER ImageInfoImageType = "LABEL_BROKER"
	ImageInfoImageTypeNONE        ImageInfoImageType = "NONE"
	ImageInfoImageTypePDF         ImageInfoImageType = "PDF"
	ImageInfoImageTypeTIFF        ImageInfoImageType = "TIFF"
	ImageInfoImageTypeZPL203DPI   ImageInfoImageType = "ZPL203DPI"
	ImageInfoImageTypeZPL300DPI   ImageInfoImageType = "ZPL300DPI"
)

Defines values for ImageInfoImageType.

type ImageInfoLabelType

type ImageInfoLabelType string

ImageInfoLabelType The requested label image size to generate.

const (
	ImageInfoLabelTypeN4X6LABEL ImageInfoLabelType = "4X6LABEL"
)

Defines values for ImageInfoLabelType.

type IndiciaIMI

type IndiciaIMI = []byte

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

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.
		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.
		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 Mail International letter, flat, or card.
	IndiciaDescription   IndiciaRequestDescription `json:"indiciaDescription"`
	AdditionalProperties map[string]interface{}    `json:"-"`
}

IndiciaRequest Indicia request for letters, flats, and cards First-Class Mail International 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 {
	// DestinationCountryCode The 2-digit country code of the destination.
	DestinationCountryCode string `json:"destinationCountryCode"`

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

	// 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 The date or date and time the letter, flat, or card will be mailed. Accepts either a date-only format or a date-time format. The mailing date may be today plus 0 to 7 days in advance.
	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) and [International Mail Manual](https://pe.usps.com/text/imm/immc2_017.htm#:~:text=241.21%20Physical%20Standards%20%E2%80%94%20Letters).
	//
	// * 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) and the [International Mail Manual](https://pe.usps.com/text/imm/immc2_017.htm#:~:text=241.23%20Physical%20Standards%20%E2%80%94%20Large%20Envelopes%20(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) and the [International Mail Manual](https://pe.usps.com/text/imm/immc2_017.htm#:~:text=241.22%20Physical%20Standards%20%E2%80%94%20Cards).
	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 Mail International 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) and [International Mail Manual](https://pe.usps.com/text/imm/immc2_017.htm#:~:text=241.21%20Physical%20Standards%20%E2%80%94%20Letters).

* 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) and the [International Mail Manual](https://pe.usps.com/text/imm/immc2_017.htm#:~:text=241.23%20Physical%20Standards%20%E2%80%94%20Large%20Envelopes%20(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) and the [International Mail Manual](https://pe.usps.com/text/imm/immc2_017.htm#:~:text=241.22%20Physical%20Standards%20%E2%80%94%20Cards).
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"
)

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.

const (
	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.

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 Mail International indicia.

type InternationalAddress

type InternationalAddress struct {
	// 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"`

	// Country This is the country name used in an international address.
	Country *string `json:"country,omitempty"`

	// CountryISOAlpha2Code ISO 3166-1 alpha-2 codes are two-letter country codes defined in ISO 3166-1, part of the ISO 3166 standard[1] published by the International Organization for Standardization (ISO), to represent countries, dependent territories, and special areas of geographical interest. They are the most widely used of the country codes published by ISO (the others being alpha-3 and numeric), and are used most prominently for the Internet's country code top-level domains (with a few exceptions). They are also used as country identifiers extending the postal code when appropriate within the international postal system for paper mail, and have replaced the previous one consisting of one-letter codes. They were first included as part of the ISO 3166 standard in its first edition in 1974.
	CountryISOAlpha2Code *string `json:"countryISOAlpha2Code,omitempty"`

	// PostalCode This is the Postal Code used for international addresses.
	//
	// Note:
	// - When shipping to Canada, this field must start with a letter (A-Z)
	// - Different shipping destinations may require a postal code for shipping.  For more details, review the [Individual Country Listing](https://pe.usps.com/text/imm/immctry.htm) for your shipping destination
	PostalCode *string `json:"postalCode,omitempty"`

	// Province This is the province used for international addresses.
	Province *string `json:"province,omitempty"`

	// ProvinceISOAlpha2Code The 2 letter abbreviation representing the destination province. Required for select destination countries when `prepayDutiesTaxesFees` is `true`.
	ProvinceISOAlpha2Code *ProvinceISOAlpha2Code `json:"provinceISOAlpha2Code,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:"-"`
}

InternationalAddress defines model for InternationalAddress.

func (InternationalAddress) Get

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

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

func (InternationalAddress) MarshalJSON

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

Override default JSON handling for InternationalAddress to handle AdditionalProperties

func (*InternationalAddress) Set

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

Setter for additional properties for InternationalAddress

func (*InternationalAddress) UnmarshalJSON

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

Override default JSON handling for InternationalAddress to handle AdditionalProperties

type InternationalCustomsForm

type InternationalCustomsForm struct {
	// AESITN USPS requires the ITN **_or_** the Exemption.
	//
	// * **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"`

	// 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.
	//
	// Note:
	// - One of either `itemValue` and `itemWeight` or `itemTotalValue` and `itemTotalWeight` are required.
	Contents []InternationalShippingContents `json:"contents"`

	// CustomsContentType Specifies the content of the package or envelope.
	//
	// Note:
	// * `CREMATED_REMAINS` is only supported by mailClass `PRIORITY_MAIL_EXPRESS_INTERNATIONAL`
	// * `customsContentType` `DANGEROUS_GOODS` will be deprecated on 1/17/2027 and will no longer be a valid enumeration.
	CustomsContentType InternationalCustomsFormCustomsContentType `json:"customsContentType"`

	// ExportersReference Reference information for customs processing including tax codes, VAT numbers, importer codes, and contact details.
	ExportersReference *CustomsReference `json:"exportersReference,omitempty"`

	// ImportersReference Reference information for customs processing including tax codes, VAT numbers, importer codes, and contact details.
	ImportersReference *CustomsReference `json:"importersReference,omitempty"`

	// Incoterm Shipment classification for international transactions.  Required for commercial shipments to the European Union.  If neither, the field should be omitted from the request.
	//
	// * `1` - Business to Consumer
	// * `2` - Business to Business
	Incoterm *InternationalCustomsFormIncoterm `json:"incoterm"`

	// 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      *InternationalCustomsFormRestrictionType `json:"restrictionType,omitempty"`
	AdditionalProperties map[string]interface{}                   `json:"-"`
}

InternationalCustomsForm defines model for InternationalCustomsForm.

func (InternationalCustomsForm) Get

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

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

func (InternationalCustomsForm) MarshalJSON

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

Override default JSON handling for InternationalCustomsForm to handle AdditionalProperties

func (*InternationalCustomsForm) Set

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

Setter for additional properties for InternationalCustomsForm

func (*InternationalCustomsForm) UnmarshalJSON

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

Override default JSON handling for InternationalCustomsForm to handle AdditionalProperties

type InternationalCustomsFormCustomsContentType

type InternationalCustomsFormCustomsContentType string

InternationalCustomsFormCustomsContentType Specifies the content of the package or envelope.

Note: * `CREMATED_REMAINS` is only supported by mailClass `PRIORITY_MAIL_EXPRESS_INTERNATIONAL` * `customsContentType` `DANGEROUS_GOODS` will be deprecated on 1/17/2027 and will no longer be a valid enumeration.

const (
	InternationalCustomsFormCustomsContentTypeCOMMERCIALSAMPLE      InternationalCustomsFormCustomsContentType = "COMMERCIAL_SAMPLE"
	InternationalCustomsFormCustomsContentTypeCREMATEDREMAINS       InternationalCustomsFormCustomsContentType = "CREMATED_REMAINS"
	InternationalCustomsFormCustomsContentTypeDANGEROUSGOODS        InternationalCustomsFormCustomsContentType = "DANGEROUS_GOODS"
	InternationalCustomsFormCustomsContentTypeDOCUMENT              InternationalCustomsFormCustomsContentType = "DOCUMENT"
	InternationalCustomsFormCustomsContentTypeGIFT                  InternationalCustomsFormCustomsContentType = "GIFT"
	InternationalCustomsFormCustomsContentTypeHUMANITARIANDONATIONS InternationalCustomsFormCustomsContentType = "HUMANITARIAN_DONATIONS"
	InternationalCustomsFormCustomsContentTypeMEDICALSUPPLIES       InternationalCustomsFormCustomsContentType = "MEDICAL_SUPPLIES"
	InternationalCustomsFormCustomsContentTypeMERCHANDISE           InternationalCustomsFormCustomsContentType = "MERCHANDISE"
	InternationalCustomsFormCustomsContentTypeNONNEGOTIABLEDOCUMENT InternationalCustomsFormCustomsContentType = "NON_NEGOTIABLE_DOCUMENT"
	InternationalCustomsFormCustomsContentTypeOTHER                 InternationalCustomsFormCustomsContentType = "OTHER"
	InternationalCustomsFormCustomsContentTypePHARMACEUTICALS       InternationalCustomsFormCustomsContentType = "PHARMACEUTICALS"
	InternationalCustomsFormCustomsContentTypeRETURNEDGOODS         InternationalCustomsFormCustomsContentType = "RETURNED_GOODS"
)

Defines values for InternationalCustomsFormCustomsContentType.

type InternationalCustomsFormIncoterm

type InternationalCustomsFormIncoterm string

InternationalCustomsFormIncoterm Shipment classification for international transactions. Required for commercial shipments to the European Union. If neither, the field should be omitted from the request.

* `1` - Business to Consumer * `2` - Business to Business

Defines values for InternationalCustomsFormIncoterm.

type InternationalCustomsFormRestrictionType

type InternationalCustomsFormRestrictionType string

InternationalCustomsFormRestrictionType Restriction Types.

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

Defines values for InternationalCustomsFormRestrictionType.

type InternationalLabelAddress

type InternationalLabelAddress struct {
	// 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"`

	// Country This is the country name used in an international address.
	Country *string `json:"country,omitempty"`

	// CountryISOAlpha2Code ISO 3166-1 alpha-2 codes are two-letter country codes defined in ISO 3166-1, part of the ISO 3166 standard[1] published by the International Organization for Standardization (ISO), to represent countries, dependent territories, and special areas of geographical interest. They are the most widely used of the country codes published by ISO (the others being alpha-3 and numeric), and are used most prominently for the Internet's country code top-level domains (with a few exceptions). They are also used as country identifiers extending the postal code when appropriate within the international postal system for paper mail, and have replaced the previous one consisting of one-letter codes. They were first included as part of the ISO 3166 standard in its first edition in 1974.
	CountryISOAlpha2Code *string `json:"countryISOAlpha2Code,omitempty"`

	// Firm Firm 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"`

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

	// PostalCode This is the Postal Code used for international addresses.
	//
	// Note:
	// - When shipping to Canada, this field must start with a letter (A-Z)
	// - Different shipping destinations may require a postal code for shipping.  For more details, review the [Individual Country Listing](https://pe.usps.com/text/imm/immctry.htm) for your shipping destination
	PostalCode *string `json:"postalCode,omitempty"`

	// Province This is the province used for international addresses.
	Province *string `json:"province,omitempty"`

	// ProvinceISOAlpha2Code The 2 letter abbreviation representing the destination province. Required for select destination countries when `prepayDutiesTaxesFees` is `true`.
	ProvinceISOAlpha2Code *ProvinceISOAlpha2Code `json:"provinceISOAlpha2Code,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:"-"`
}

InternationalLabelAddress defines model for InternationalLabelAddress.

func (InternationalLabelAddress) Get

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

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

func (InternationalLabelAddress) MarshalJSON

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

Override default JSON handling for InternationalLabelAddress to handle AdditionalProperties

func (*InternationalLabelAddress) Set

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

Setter for additional properties for InternationalLabelAddress

func (*InternationalLabelAddress) UnmarshalJSON

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

Override default JSON handling for InternationalLabelAddress to handle AdditionalProperties

type InternationalLabelMetadata

type InternationalLabelMetadata struct {
	// SKU Pricing SKU
	SKU *string `json:"SKU,omitempty"`

	// ConstructCode The barcode construct code associated with the international tracking number
	ConstructCode *string `json:"constructCode,omitempty"`

	// DimensionalWeight The dimensional weight of the package in pounds, if greater than the value specified in `weight`.
	DimensionalWeight *string `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 of 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"`

	// InternationalPriceGroup Indicates the price group for a given `countryISOAlpha2Code`, `mailClass`, `mailingDate`, and `rateIndicator`.
	InternationalPriceGroup *string `json:"internationalPriceGroup,omitempty"`

	// InternationalTrackingNumber International Package Tracking number
	InternationalTrackingNumber *string `json:"internationalTrackingNumber,omitempty"`

	// LabelAddress Uses for:
	//
	// The international address where the package is being mailed to. The destination Country Code is used for calculating pricing.
	//
	// For guidelines on acceptable international addresses, please reference [Section 122 of the International Mail Manual](https://pe.usps.com/text/imm/immc1_008.htm).
	//
	// Note:
	// - The First and Last Name or Firm Name are always required.
	LabelAddress *InternationalLabelAddress `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.
	MailingDate *openapi_types.Date `json:"mailingDate,omitempty"`

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

	// Weight The calculated weight for the package based on user input. The greater of `dimensionalWeight` and `weight` will be used to calculate the rate.
	Weight *Weight `json:"weight,omitempty"`

	// WeightUOM Weight Unit of Measurement.
	//   * lb - Pounds
	WeightUOM            *InternationalLabelMetadataWeightUOM `json:"weightUOM,omitempty"`
	AdditionalProperties map[string]interface{}               `json:"-"`
}

InternationalLabelMetadata Metadata information for an international label including tracking number, pricing details, postage, and extra services.

func (InternationalLabelMetadata) Get

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

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

func (InternationalLabelMetadata) MarshalJSON

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

Override default JSON handling for InternationalLabelMetadata to handle AdditionalProperties

func (*InternationalLabelMetadata) Set

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

Setter for additional properties for InternationalLabelMetadata

func (*InternationalLabelMetadata) UnmarshalJSON

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

Override default JSON handling for InternationalLabelMetadata to handle AdditionalProperties

type InternationalLabelMetadataWeightUOM

type InternationalLabelMetadataWeightUOM string

InternationalLabelMetadataWeightUOM Weight Unit of Measurement.

  • lb - Pounds
const (
	InternationalLabelMetadataWeightUOMLb InternationalLabelMetadataWeightUOM = "lb"
)

Defines values for InternationalLabelMetadataWeightUOM.

type InternationalLabelRequest

type InternationalLabelRequest struct {
	// CustomsForm Customs form information required for international shipments including content type, item details, and references.
	CustomsForm InternationalCustomsForm `json:"customsForm"`

	// FromAddress Uses for:
	//
	// The address of the business where the package is being mailed from.
	//
	// Note:
	// - The First and Last Name or Firm Name are always required.
	FromAddress DomesticLabelAddress `json:"fromAddress"`

	// ImageInfo The Image Object defines label characteristics
	ImageInfo *ImageInfo `json:"imageInfo,omitempty"`

	// PackageDescription Physical and service characteristics of an international package including dimensions, weight, mail class, and processing requirements.
	PackageDescription InternationalPackageDescription `json:"packageDescription"`

	// SenderAddress Uses for:
	//
	//   The address of the business sending the package. Can differ from the `fromAddress` in the case the business is using a third-party logistics provider or mailing from off-site locations.
	//
	//   Note:
	//   - The First and Last Name or Firm Name are always required.
	SenderAddress *DomesticLabelSenderAddress `json:"senderAddress,omitempty"`

	// ToAddress Uses for:
	//
	// The international address where the package is being mailed to. The destination Country Code is used for calculating pricing.
	//
	// For guidelines on acceptable international addresses, please reference [Section 122 of the International Mail Manual](https://pe.usps.com/text/imm/immc1_008.htm).
	//
	// Note:
	// - The First and Last Name or Firm Name are always required.
	ToAddress InternationalLabelAddress `json:"toAddress"`
}

InternationalLabelRequest International Shipment Request

type InternationalLabelResponse

type InternationalLabelResponse 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`.
	LabelImage *[]byte `json:"labelImage,omitempty"`

	// LabelMetadata Metadata information for an international label including tracking number, pricing details, postage, and extra services.
	LabelMetadata *InternationalLabelMetadata `json:"labelMetadata,omitempty"`

	// PrepaidDutiesTaxesFees The total landed cost package and item details. Included if `prepayDutiesTaxesFees` is `true`.
	PrepaidDutiesTaxesFees *struct {
		// ItemCosts The prices for taxes and duties on each item.
		ItemCosts *[]struct {
			// DutyPrice The value of the duties associated with the item.
			DutyPrice *float32 `json:"dutyPrice,omitempty"`

			// ItemDescription The description of the item provided in `request.customsForm.contents[].itemDescription`.
			ItemDescription *string `json:"itemDescription,omitempty"`

			// TaxPrice The value of the taxes associated with the item.
			TaxPrice *float32 `json:"taxPrice,omitempty"`
		} `json:"itemCosts,omitempty"`

		// PackageFee The value of the delivery fees associated with the package.
		PackageFee *float32 `json:"packageFee,omitempty"`
	} `json:"prepaidDutiesTaxesFees,omitempty"`
}

InternationalLabelResponse Response containing the international label metadata and Base64-encoded label image for multipart responses.

type InternationalLabelVendorResponse

type InternationalLabelVendorResponse struct {
	// SKU Pricing SKU
	SKU *string `json:"SKU,omitempty"`

	// ConstructCode The barcode construct code associated with the international tracking number
	ConstructCode *string `json:"constructCode,omitempty"`

	// DimensionalWeight The dimensional weight of the package in pounds, if greater than the value specified in `weight`.
	DimensionalWeight *string `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 of 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"`

	// InternationalPriceGroup Indicates the price group for a given `countryISOAlpha2Code`, `mailClass`, `mailingDate`, and `rateIndicator`.
	InternationalPriceGroup *string `json:"internationalPriceGroup,omitempty"`

	// InternationalTrackingNumber International Package Tracking number
	InternationalTrackingNumber *string `json:"internationalTrackingNumber,omitempty"`

	// LabelAddress Uses for:
	//
	// The international address where the package is being mailed to. The destination Country Code is used for calculating pricing.
	//
	// For guidelines on acceptable international addresses, please reference [Section 122 of the International Mail Manual](https://pe.usps.com/text/imm/immc1_008.htm).
	//
	// Note:
	// - The First and Last Name or Firm Name are always required.
	LabelAddress *InternationalLabelAddress `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`.
	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.
	MailingDate *openapi_types.Date `json:"mailingDate,omitempty"`

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

	// Weight The calculated weight for the package based on user input. The greater of `dimensionalWeight` and `weight` will be used to calculate the rate.
	Weight *Weight `json:"weight,omitempty"`

	// WeightUOM Weight Unit of Measurement.
	//   * lb - Pounds
	WeightUOM            *InternationalLabelVendorResponseWeightUOM `json:"weightUOM,omitempty"`
	AdditionalProperties map[string]interface{}                     `json:"-"`
}

InternationalLabelVendorResponse defines model for InternationalLabelVendorResponse.

func (InternationalLabelVendorResponse) Get

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

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

func (InternationalLabelVendorResponse) MarshalJSON

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

Override default JSON handling for InternationalLabelVendorResponse to handle AdditionalProperties

func (*InternationalLabelVendorResponse) Set

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

Setter for additional properties for InternationalLabelVendorResponse

func (*InternationalLabelVendorResponse) UnmarshalJSON

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

Override default JSON handling for InternationalLabelVendorResponse to handle AdditionalProperties

type InternationalLabelVendorResponseWeightUOM

type InternationalLabelVendorResponseWeightUOM string

InternationalLabelVendorResponseWeightUOM Weight Unit of Measurement.

  • lb - Pounds
const (
	InternationalLabelVendorResponseWeightUOMLb InternationalLabelVendorResponseWeightUOM = "lb"
)

Defines values for InternationalLabelVendorResponseWeightUOM.

type InternationalPackageDescription

type InternationalPackageDescription struct {
	// CustomerReference Customer reference information for the package. Up to two customer references may be provided.
	CustomerReference *[]CustomerReference `json:"customerReference,omitempty"`

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

	// DestinationEntryFacilityType Types of Facilities.
	//   * NONE - Translate to Destination Rate Indicator of N in USPS® Pub 205
	//   * INTERNATIONAL_SERVICE_CENTER - Translate to Destination Rate Indicator of I in USPS® Pub 205
	DestinationEntryFacilityType InternationalPackageDescriptionDestinationEntryFacilityType `json:"destinationEntryFacilityType"`

	// Diameter Future Use - The diameter of the package, in dimensionsUOM.
	Diameter *float32 `json:"diameter,omitempty"`

	// DimensionsUOM Dimensions unit of measurement.
	//  * in - Inches
	DimensionsUOM *InternationalPackageDescriptionDimensionsUOM `json:"dimensionsUOM,omitempty"`

	// ExtraServices Extra Service Code requested on the package.
	// * 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
	// * 486 - Tracking Plus Signature 3 Years
	// * 487 - Tracking Plus Signature 5 Years
	// * 488 - Tracking Plus Signature 7 Years
	// * 813 - HAZMAT Class 7 - Radioactive Materials Package
	// * 820 - HAZMAT Class 9 - Lithium batteries, unmarked package
	// * 826 - HAZMAT Division 6.2 – Infectious Substances Package
	// * 857 - Hazardous Material
	// * 930 - Insurance <= $500
	// * 931 - Insurance > $500
	// * 955 - Return Receipt (Unsupported as of 01/19/2025)
	//
	// Note:
	// * Only one USPS Tracking Plus&#174; extra service and one Insurance extra service may be selected per package
	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`, 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.
	Girth *float32 `json:"girth,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 This is the 5-digit ZIP code where the package is being mailed from.
	InductionZIPCode *string `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 International Mail classes for label  The mail service requested.
	//  * FIRST-CLASS_PACKAGE_INTERNATIONAL_SERVICE
	//  * PRIORITY_MAIL_INTERNATIONAL
	//  * PRIORITY_MAIL_EXPRESS_INTERNATIONAL
	MailClass InternationalPackageDescriptionMailClass `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 date package 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).
	MailingDate openapi_types.Date `json:"mailingDate"`

	// PackageOptions Additional options for international package shipments including redirect addresses, over-labeling information, and manifest preferences.
	PackageOptions *InternationalPackageOptions `json:"packageOptions,omitempty"`

	// PackagingType Used to specify USPS&#174; packaging attributes that may affect postage. Can be used instead of a rate indicator. Either packagingType or rate indicator is required.
	//  * FLAT_RATE_ENVELOPE
	//  * LEGAL_FLAT_RATE_ENVELOPE
	//  * PADDED_FLAT_RATE_ENVELOPE
	//  * SM_FLAT_RATE_BOX
	//  * MD_FLAT_RATE_BOX
	//  * LG_FLAT_RATE_BOX
	//  * VARIABLE
	PackagingType *InternationalPackageDescriptionPackagingType `json:"packagingType,omitempty"`

	// PrepayDutiesTaxesFees When set to `true`, duties, taxes, and import fees will be calculated and will be prepaid on behalf of the recipient if supported by the destination country.  The resulting cost will be returned as `response.prepaidDutiesTaxesFees`.
	//
	// By continuing, you agree to the [terms and conditions](https://zonos.com/docs/legal/usps-terms-of-service) for paying international duties, taxes, and fees (DDP), and certify that you will use DDP to ship goods to customers.
	//
	// When set to `false`, duties, taxes, and import fees will not be calculated and you will not have the option to pay duties, taxes, and import fees in advance, on behalf of the recipient.
	PrepayDutiesTaxesFees *bool `json:"prepayDutiesTaxesFees,omitempty"`

	// ProcessingCategory USPS&#174; categorizes international parcels into four processing categories. These categories are based on the physical dimensions of the piece and impact how the mail will be processed.
	//  * `LETTERS`
	//  * `FLATS`
	//  * `MACHINABLE`
	//  * `NONSTANDARD`
	//  * `NON_MACHINABLE` is deprecated and will convert to `NONSTANDARD` as of 01/19/2025
	ProcessingCategory InternationalPackageDescriptionProcessingCategory `json:"processingCategory"`

	// RateIndicator Use to specify USPS&#174; containers/packaging or container attributes that may affect postage. A rate indicator value will be required if a value for `packagingType` is not provided.
	//  * 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
	//  * PA - Priority Mail Express International Single Piece
	//  * PL - Large Flat Rate Box
	//  * SP - Single Piece
	RateIndicator *InternationalPackageDescriptionRateIndicator `json:"rateIndicator,omitempty"`

	// Shape Indicates the mail piece shape.
	//  * RECTANGLE
	Shape *InternationalPackageDescriptionShape `json:"shape,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 Measure
	//   * lb - Pounds
	WeightUOM *InternationalPackageDescriptionWeightUOM `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"`
}

InternationalPackageDescription defines model for InternationalPackageDescription.

type InternationalPackageDescriptionDestinationEntryFacilityType

type InternationalPackageDescriptionDestinationEntryFacilityType string

InternationalPackageDescriptionDestinationEntryFacilityType Types of Facilities.

  • NONE - Translate to Destination Rate Indicator of N in USPS&#174; Pub 205
  • INTERNATIONAL_SERVICE_CENTER - Translate to Destination Rate Indicator of I in USPS&#174; Pub 205
const (
	InternationalPackageDescriptionDestinationEntryFacilityTypeINTERNATIONALSERVICECENTER InternationalPackageDescriptionDestinationEntryFacilityType = "INTERNATIONAL_SERVICE_CENTER"
	InternationalPackageDescriptionDestinationEntryFacilityTypeNONE                       InternationalPackageDescriptionDestinationEntryFacilityType = "NONE"
)

Defines values for InternationalPackageDescriptionDestinationEntryFacilityType.

type InternationalPackageDescriptionDimensionsUOM

type InternationalPackageDescriptionDimensionsUOM string

InternationalPackageDescriptionDimensionsUOM Dimensions unit of measurement.

  • in - Inches
const (
	InternationalPackageDescriptionDimensionsUOMIn InternationalPackageDescriptionDimensionsUOM = "in"
)

Defines values for InternationalPackageDescriptionDimensionsUOM.

type InternationalPackageDescriptionMailClass

type InternationalPackageDescriptionMailClass string

InternationalPackageDescriptionMailClass International Mail classes for label The mail service requested.

  • FIRST-CLASS_PACKAGE_INTERNATIONAL_SERVICE
  • PRIORITY_MAIL_INTERNATIONAL
  • PRIORITY_MAIL_EXPRESS_INTERNATIONAL
const (
	FIRSTCLASSPACKAGEINTERNATIONALSERVICE InternationalPackageDescriptionMailClass = "FIRST-CLASS_PACKAGE_INTERNATIONAL_SERVICE"
	PRIORITYMAILEXPRESSINTERNATIONAL      InternationalPackageDescriptionMailClass = "PRIORITY_MAIL_EXPRESS_INTERNATIONAL"
	PRIORITYMAILINTERNATIONAL             InternationalPackageDescriptionMailClass = "PRIORITY_MAIL_INTERNATIONAL"
)

Defines values for InternationalPackageDescriptionMailClass.

type InternationalPackageDescriptionPackagingType

type InternationalPackageDescriptionPackagingType string

InternationalPackageDescriptionPackagingType Used to specify USPS&#174; packaging attributes that may affect postage. Can be used instead of a rate indicator. Either packagingType or rate indicator is required.

  • FLAT_RATE_ENVELOPE
  • LEGAL_FLAT_RATE_ENVELOPE
  • PADDED_FLAT_RATE_ENVELOPE
  • SM_FLAT_RATE_BOX
  • MD_FLAT_RATE_BOX
  • LG_FLAT_RATE_BOX
  • VARIABLE
const (
	FLATRATEENVELOPE       InternationalPackageDescriptionPackagingType = "FLAT_RATE_ENVELOPE"
	LEGALFLATRATEENVELOPE  InternationalPackageDescriptionPackagingType = "LEGAL_FLAT_RATE_ENVELOPE"
	LGFLATRATEBOX          InternationalPackageDescriptionPackagingType = "LG_FLAT_RATE_BOX"
	MDFLATRATEBOX          InternationalPackageDescriptionPackagingType = "MD_FLAT_RATE_BOX"
	PADDEDFLATRATEENVELOPE InternationalPackageDescriptionPackagingType = "PADDED_FLAT_RATE_ENVELOPE"
	SMFLATRATEBOX          InternationalPackageDescriptionPackagingType = "SM_FLAT_RATE_BOX"
	VARIABLE               InternationalPackageDescriptionPackagingType = "VARIABLE"
)

Defines values for InternationalPackageDescriptionPackagingType.

type InternationalPackageDescriptionProcessingCategory

type InternationalPackageDescriptionProcessingCategory string

InternationalPackageDescriptionProcessingCategory USPS&#174; categorizes international parcels into four processing categories. These categories are based on the physical dimensions of the piece and impact how the mail will be processed.

  • `LETTERS`
  • `FLATS`
  • `MACHINABLE`
  • `NONSTANDARD`
  • `NON_MACHINABLE` is deprecated and will convert to `NONSTANDARD` as of 01/19/2025
const (
	InternationalPackageDescriptionProcessingCategoryFLATS         InternationalPackageDescriptionProcessingCategory = "FLATS"
	InternationalPackageDescriptionProcessingCategoryLETTERS       InternationalPackageDescriptionProcessingCategory = "LETTERS"
	InternationalPackageDescriptionProcessingCategoryMACHINABLE    InternationalPackageDescriptionProcessingCategory = "MACHINABLE"
	InternationalPackageDescriptionProcessingCategoryNONMACHINABLE InternationalPackageDescriptionProcessingCategory = "NON_MACHINABLE"
	InternationalPackageDescriptionProcessingCategoryNONSTANDARD   InternationalPackageDescriptionProcessingCategory = "NONSTANDARD"
)

Defines values for InternationalPackageDescriptionProcessingCategory.

type InternationalPackageDescriptionRateIndicator

type InternationalPackageDescriptionRateIndicator string

InternationalPackageDescriptionRateIndicator Use to specify USPS&#174; containers/packaging or container attributes that may affect postage. A rate indicator value will be required if a value for `packagingType` is not provided.

  • 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
  • PA - Priority Mail Express International Single Piece
  • PL - Large Flat Rate Box
  • SP - Single Piece

type InternationalPackageDescriptionShape

type InternationalPackageDescriptionShape string

InternationalPackageDescriptionShape Indicates the mail piece shape.

  • RECTANGLE
const (
	RECTANGLE InternationalPackageDescriptionShape = "RECTANGLE"
)

Defines values for InternationalPackageDescriptionShape.

type InternationalPackageDescriptionWeightUOM

type InternationalPackageDescriptionWeightUOM string

InternationalPackageDescriptionWeightUOM Weight Unit of Measure

  • lb - Pounds
const (
	InternationalPackageDescriptionWeightUOMLb InternationalPackageDescriptionWeightUOM = "lb"
)

Defines values for InternationalPackageDescriptionWeightUOM.

type InternationalPackageOptions

type InternationalPackageOptions struct {
	// 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 cancelled. 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 the package to be returned to `fromAddress`. * REDIRECT to return the package to address specified in the `redirectAddress`. * ABANDON to dispose of the undeliverable package
	NonDeliveryOption *InternationalPackageOptionsNonDeliveryOption `json:"nonDeliveryOption,omitempty"`

	// OriginalPackage Information about the original package when an over labeled package is being created.
	OriginalPackage *struct {
		// OriginalConstructCode A 3-character code to identify the construct of the Original Label Tracking Number.
		OriginalConstructCode InternationalPackageOptionsOriginalPackageOriginalConstructCode `json:"originalConstructCode"`

		// OriginalTrackingNumber The tracking number associated with the package before it was over labeled.
		OriginalTrackingNumber string `json:"originalTrackingNumber"`
	} `json:"originalPackage,omitempty"`

	// PackageValue The merchandise value of the package, in US dollars. Used to calculate Insurance Fees if requested.
	PackageValue *float32 `json:"packageValue,omitempty"`

	// RedirectAddress Address where the package will be redirected to if undeliverable and  a `nonDeliveryOption` of REDIRECT is provided. This field is required if REDIRECT `nonDeliveryOption` is provided.
	//
	// Note:
	// - The First and Last Name or Firm Name are required when `redirectAddress` is populated.
	RedirectAddress *InternationalPackageOptions_RedirectAddress `json:"redirectAddress,omitempty"`
}

InternationalPackageOptions defines model for InternationalPackageOptions.

type InternationalPackageOptionsNonDeliveryOption

type InternationalPackageOptionsNonDeliveryOption string

InternationalPackageOptionsNonDeliveryOption Requested action in the case a package is undeliverable: * RETURN for the package to be returned to `fromAddress`. * REDIRECT to return the package to address specified in the `redirectAddress`. * ABANDON to dispose of the undeliverable package

const (
	InternationalPackageOptionsNonDeliveryOptionABANDON  InternationalPackageOptionsNonDeliveryOption = "ABANDON"
	InternationalPackageOptionsNonDeliveryOptionREDIRECT InternationalPackageOptionsNonDeliveryOption = "REDIRECT"
	InternationalPackageOptionsNonDeliveryOptionRETURN   InternationalPackageOptionsNonDeliveryOption = "RETURN"
)

Defines values for InternationalPackageOptionsNonDeliveryOption.

type InternationalPackageOptionsOriginalPackageOriginalConstructCode

type InternationalPackageOptionsOriginalPackageOriginalConstructCode string

InternationalPackageOptionsOriginalPackageOriginalConstructCode A 3-character code to identify the construct of the Original Label Tracking Number.

Defines values for InternationalPackageOptionsOriginalPackageOriginalConstructCode.

type InternationalPackageOptions_RedirectAddress

type InternationalPackageOptions_RedirectAddress 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 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:"-"`
}

InternationalPackageOptions_RedirectAddress defines model for InternationalPackageOptions.RedirectAddress.

func (InternationalPackageOptions_RedirectAddress) Get

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

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

func (InternationalPackageOptions_RedirectAddress) MarshalJSON

Override default JSON handling for InternationalPackageOptions_RedirectAddress to handle AdditionalProperties

func (*InternationalPackageOptions_RedirectAddress) Set

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

Setter for additional properties for InternationalPackageOptions_RedirectAddress

func (*InternationalPackageOptions_RedirectAddress) UnmarshalJSON

Override default JSON handling for InternationalPackageOptions_RedirectAddress to handle AdditionalProperties

type InternationalShippingContents

type InternationalShippingContents 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 an international address.
	CountryofOrigin string `json:"countryofOrigin"`

	// EuropeanUnionProductID Additional values specific to European Union Shipments.  Required when shipping `customsContentType` of `MERCHANDISE` or `COMMERCIAL_SAMPLE` to European Union destinations with `incoterm` value of `1`.
	//
	// If `incoterm` is not provided, these fields should not be populated.
	EuropeanUnionProductID *EUProductIDFields `json:"europeanUnionProductID,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"`

	// ItemQuantity Quantity of the item. Integer value required.
	ItemQuantity int `json:"itemQuantity"`

	// 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 the 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            *InternationalShippingContentsWeightUOM `json:"weightUOM,omitempty"`
	AdditionalProperties map[string]interface{}                  `json:"-"`
}

InternationalShippingContents defines model for InternationalShippingContents.

func (InternationalShippingContents) Get

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

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

func (InternationalShippingContents) MarshalJSON

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

Override default JSON handling for InternationalShippingContents to handle AdditionalProperties

func (*InternationalShippingContents) Set

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

Setter for additional properties for InternationalShippingContents

func (*InternationalShippingContents) UnmarshalJSON

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

Override default JSON handling for InternationalShippingContents to handle AdditionalProperties

type InternationalShippingContentsWeightUOM

type InternationalShippingContentsWeightUOM string

InternationalShippingContentsWeightUOM Weight Unit of Measurement.

  • lb - Pounds
const (
	InternationalShippingContentsWeightUOMLb InternationalShippingContentsWeightUOM = "lb"
)

Defines values for InternationalShippingContentsWeightUOM.

type LabelReprintImageInfo

type LabelReprintImageInfo struct {
	// ImageType The type of label image requested.
	ImageType *LabelReprintImageInfoImageType `json:"imageType,omitempty"`

	// LabelType The requested label image size to generate.
	LabelType *LabelReprintImageInfoLabelType `json:"labelType,omitempty"`

	// SuppressPostage Indicates if Insured Fees and Postal Charges/Fees should be
	// omitted from the label image.  If true, Insured Fees and Postal
	// Charges/Fees values will be removed.
	SuppressPostage *bool `json:"suppressPostage,omitempty"`
}

LabelReprintImageInfo The Reprint Image Info Object defines label characteristics

type LabelReprintImageInfoImageType

type LabelReprintImageInfoImageType string

LabelReprintImageInfoImageType The type of label image requested.

const (
	PDF       LabelReprintImageInfoImageType = "PDF"
	TIFF      LabelReprintImageInfoImageType = "TIFF"
	ZPL203DPI LabelReprintImageInfoImageType = "ZPL203DPI"
	ZPL300DPI LabelReprintImageInfoImageType = "ZPL300DPI"
)

Defines values for LabelReprintImageInfoImageType.

type LabelReprintImageInfoLabelType

type LabelReprintImageInfoLabelType string

LabelReprintImageInfoLabelType The requested label image size to generate.

const (
	LabelReprintImageInfoLabelTypeN4X6LABEL LabelReprintImageInfoLabelType = "4X6LABEL"
)

Defines values for LabelReprintImageInfoLabelType.

type LabelReprintInternationalMultipartResponse

type LabelReprintInternationalMultipartResponse struct {
	// LabelImage Contains the Base64-encoded file contents of the label image. Provided only when `imageInfo.imageType` is not `NONE`.
	LabelImage *[]byte `json:"labelImage,omitempty"`

	// LabelMetadata Metadata information for an international label including tracking number, pricing details, postage, and extra services.
	LabelMetadata *InternationalLabelMetadata `json:"labelMetadata,omitempty"`

	// ReprintInfo Schema containing reprint information for a label.
	ReprintInfo *ReprintInfo `json:"reprintInfo,omitempty"`
}

LabelReprintInternationalMultipartResponse Response for an international label reprint request containing label metadata, Base64-encoded label image, and reprint information.

type LabelReprintInternationalResponse

type LabelReprintInternationalResponse struct {
	// LabelImage Contains the Base64-encoded file contents of the label image.
	LabelImage *[]byte `json:"labelImage,omitempty"`

	// LabelMetadata Metadata information for an international label including tracking number, pricing details, postage, and extra services.
	LabelMetadata *InternationalLabelMetadata `json:"labelMetadata,omitempty"`

	// ReprintInfo Schema containing reprint information for a label.
	ReprintInfo *ReprintInfo `json:"reprintInfo,omitempty"`
}

LabelReprintInternationalResponse Response schema for International label reprint requests.

type LabelReprintRequest

type LabelReprintRequest struct {
	// ImageInfo The Reprint Image Info Object defines label characteristics
	ImageInfo *LabelReprintImageInfo `json:"imageInfo,omitempty"`
}

LabelReprintRequest Request schema for reprinting an international label.

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 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 The date or date and time the letter, flat, or card will be mailed. Accepts either a date-only format or a date-time format. The mailing date may be today plus 0 to 7 days in advance.

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 PackageDescription

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

	// DimensionsUOM Dimensions unit of measurement.
	//  * 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`, 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.
	Girth *float32 `json:"girth,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 Measure
	//   * 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 Basic physical characteristics of a package including weight, dimensions, and destination entry facility address.

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 measurement.

  • in - Inches
const (
	PackageDescriptionDimensionsUOMIn PackageDescriptionDimensionsUOM = "in"
)

Defines values for PackageDescriptionDimensionsUOM.

type PackageDescriptionWeightUOM

type PackageDescriptionWeightUOM string

PackageDescriptionWeightUOM Weight Unit of Measure

  • 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 the package to be returned to `fromAddress`. * REDIRECT to return the package to address specified in the `redirectAddress`. * ABANDON to dispose of the undeliverable package
	NonDeliveryOption *PackageOptionsNonDeliveryOption `json:"nonDeliveryOption,omitempty"`

	// PackageValue The merchandise value of the package, in US dollars. Used to calculate Insurance Fees if requested.
	PackageValue         *float32               `json:"packageValue,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

PackageOptions Additional options for package shipments including package value and non-delivery preferences.

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 the package to be returned to `fromAddress`. * REDIRECT to return the package to address specified in the `redirectAddress`. * ABANDON to dispose of the undeliverable package

const (
	PackageOptionsNonDeliveryOptionABANDON  PackageOptionsNonDeliveryOption = "ABANDON"
	PackageOptionsNonDeliveryOptionREDIRECT PackageOptionsNonDeliveryOption = "REDIRECT"
	PackageOptionsNonDeliveryOptionRETURN   PackageOptionsNonDeliveryOption = "RETURN"
)

Defines values for PackageOptionsNonDeliveryOption.

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 PostInternationalIndiciaJSONRequestBody

type PostInternationalIndiciaJSONRequestBody = IndiciaRequest

PostInternationalIndiciaJSONRequestBody defines body for PostInternationalIndicia for application/json ContentType.

type PostInternationalIndiciaParams

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

PostInternationalIndiciaParams defines parameters for PostInternationalIndicia.

type PostInternationalIndiciaResponse

type PostInternationalIndiciaResponse struct {
	Body                            []byte
	HTTPResponse                    *http.Response
	JSON201                         *IndiciaResponse
	ApplicationvndUspsLabelsJSON201 *IndiciaResponse
	XML201                          *IndiciaResponse
	JSON400                         *BadRequest
	XML400                          *BadRequest
	JSON401                         *Unauthorized
	XML401                          *Unauthorized
	JSON403                         *Forbidden
	XML403                          *Forbidden
	JSON429                         *TooManyRequests
	XML429                          *TooManyRequests
	JSON503                         *ServiceUnavailable
	XML503                          *ServiceUnavailable
}

func ParsePostInternationalIndiciaResponse

func ParsePostInternationalIndiciaResponse(rsp *http.Response) (*PostInternationalIndiciaResponse, error)

ParsePostInternationalIndiciaResponse parses an HTTP response from a PostInternationalIndiciaWithResponse call

func (PostInternationalIndiciaResponse) Status

Status returns HTTPResponse.Status

func (PostInternationalIndiciaResponse) StatusCode

func (r PostInternationalIndiciaResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostInternationalLabelJSONRequestBody

type PostInternationalLabelJSONRequestBody = InternationalLabelRequest

PostInternationalLabelJSONRequestBody defines body for PostInternationalLabel for application/json ContentType.

type PostInternationalLabelParams

type PostInternationalLabelParams 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"`
}

PostInternationalLabelParams defines parameters for PostInternationalLabel.

type PostInternationalLabelResponse

type PostInternationalLabelResponse struct {
	Body                            []byte
	HTTPResponse                    *http.Response
	JSON201                         *InternationalLabelResponse
	ApplicationvndUspsLabelsJSON201 *InternationalLabelVendorResponse
	XML201                          *InternationalLabelResponse
	JSON400                         *BadRequest
	XML400                          *BadRequest
	JSON401                         *Unauthorized
	XML401                          *Unauthorized
	JSON403                         *Forbidden
	XML403                          *Forbidden
	JSON429                         *TooManyRequests
	XML429                          *TooManyRequests
	JSON503                         *ServiceUnavailable
	XML503                          *ServiceUnavailable
}

func ParsePostInternationalLabelResponse

func ParsePostInternationalLabelResponse(rsp *http.Response) (*PostInternationalLabelResponse, error)

ParsePostInternationalLabelResponse parses an HTTP response from a PostInternationalLabelWithResponse call

func (PostInternationalLabelResponse) Status

Status returns HTTPResponse.Status

func (PostInternationalLabelResponse) StatusCode

func (r PostInternationalLabelResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostLabelReprintByIdempotencyJSONRequestBody

type PostLabelReprintByIdempotencyJSONRequestBody = LabelReprintRequest

PostLabelReprintByIdempotencyJSONRequestBody defines body for PostLabelReprintByIdempotency for application/json ContentType.

type PostLabelReprintByIdempotencyParams

type PostLabelReprintByIdempotencyParams struct {
	// 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"`

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

PostLabelReprintByIdempotencyParams defines parameters for PostLabelReprintByIdempotency.

type PostLabelReprintByIdempotencyResponse

type PostLabelReprintByIdempotencyResponse struct {
	Body                            []byte
	HTTPResponse                    *http.Response
	JSON200                         *LabelReprintInternationalMultipartResponse
	ApplicationvndUspsLabelsJSON200 *LabelReprintInternationalResponse
	XML200                          *LabelReprintInternationalMultipartResponse
	JSON400                         *BadRequest
	XML400                          *BadRequest
	JSON401                         *Unauthorized
	XML401                          *Unauthorized
	JSON403                         *Forbidden
	XML403                          *Forbidden
	JSON429                         *TooManyRequests
	XML429                          *TooManyRequests
	JSON503                         *ServiceUnavailable
	XML503                          *ServiceUnavailable
}

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                         *LabelReprintInternationalMultipartResponse
	ApplicationvndUspsLabelsJSON200 *LabelReprintInternationalResponse
	XML200                          *LabelReprintInternationalMultipartResponse
	JSON400                         *BadRequest
	XML400                          *BadRequest
	JSON401                         *Unauthorized
	XML401                          *Unauthorized
	JSON403                         *Forbidden
	XML403                          *Forbidden
	JSON429                         *TooManyRequests
	XML429                          *TooManyRequests
	JSON503                         *ServiceUnavailable
	XML503                          *ServiceUnavailable
}

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 ProvinceISOAlpha2Code

type ProvinceISOAlpha2Code = string

ProvinceISOAlpha2Code The 2 letter abbreviation representing the destination province. Required for select destination countries when `prepayDutiesTaxesFees` is `true`.

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 ServiceUnavailable

type ServiceUnavailable = ErrorMessage

ServiceUnavailable Standard error message response.

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 an international address.
	CountryofOrigin *string `json:"countryofOrigin,omitempty"`

	// EuropeanUnionProductID Additional values specific to European Union Shipments.  Required when shipping `customsContentType` of `MERCHANDISE` or `COMMERCIAL_SAMPLE` to European Union destinations with `incoterm` value of `1`.
	//
	// If `incoterm` is not provided, these fields should not be populated.
	EuropeanUnionProductID *EUProductIDFields `json:"europeanUnionProductID,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 the 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.

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 TooManyRequests

type TooManyRequests = ErrorMessage

TooManyRequests Standard error message response.

type TrackingNumber

type TrackingNumber = string

TrackingNumber defines model for TrackingNumber.

type Unauthorized

type Unauthorized = ErrorMessage

Unauthorized Standard error message response.

type Weight

type Weight = float64

Weight The calculated weight for the package based on user input. The greater of `dimensionalWeight` and `weight` will be used to calculate the rate.

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