mirror of
https://github.com/LukeHagar/speakeasy-playground.git
synced 2025-12-09 12:47:46 +00:00
28 KiB
28 KiB
Shipment
Shipment represents the parcel as retrieved from the database
Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
metadata |
str | ✔️ | A string of up to 100 characters that can be filled with any additional information you want to attach to the object. | Customer ID 123456 |
address_from |
components.Address | ✔️ | Address object of the sender / seller. Will be returned expanded by default. | |
address_to |
components.Address | ✔️ | Address object of the recipient / buyer. Will be returned expanded by default. | |
carrier_accounts |
List[str] | ✔️ | An array of object_ids of the carrier account objects to be used for getting shipping rates for this shipment. If no carrier account object_ids are set in this field, Shippo will attempt to generate rates using all the carrier accounts that have the active field set. |
|
messages |
List[components.Messages] | ✔️ | An array containing elements of the following schema:code (string): an identifier for the corresponding message(not always available) message (string): a publishable message containing further information. |
|
object_created |
date | ✔️ | Date and time of Shipment creation. | |
object_id |
str | ✔️ | Unique identifier of the given Shipment object. | adcfdddf8ec64b84ad22772bce3ea37a |
object_owner |
str | ✔️ | Username of the user who created the Shipment object. | pp@gmail.com |
object_updated |
date | ✔️ | Date and time of last Shipment update. | |
parcels |
List[components.ParcelTemplate] | ✔️ | Array of IDs of the Parcel objects to be shipped. | |
rates |
List[components.Rate] | ✔️ | An array with all available rates. If async has been set to false in the request,this will be populated with all available rates in the response. Otherwise rates will be created asynchronously and this array will initially be empty. |
|
status |
components.ShipmentStatus | ✔️ | Waiting shipments have been successfully submitted but not yet been processed. Queued shipments are currently being processed. Success shipments have been processed successfully, meaning that rate generation has concluded. Error does not occur currently and is reserved for future use. |
SUCCESS |
customs_declaration |
Optional[str] | ➖ | ID of the Customs Declarations object for an international shipment. | adcfdddf8ec64b84ad22772bce3ea37a |
extra |
Optional[components.ShipmentExtra] | ➖ | An object holding optional extra services to be requested. | |
shipment_date |
Optional[str] | ➖ | Date the shipment will be tendered to the carrier. Must be in the format 2014-01-18T00:35:03.463Z. Defaults to current date and time if no value is provided. Please note that some carriers require this value to be in the future, on a working day, or similar. |
2021-03-22T12:00:00Z |
address_return |
Optional[components.Address] | ➖ | ID of the Address object where the shipment will be sent back to if it is not delivered (Only available for UPS, USPS, and Fedex shipments). If this field is not set, your shipments will be returned to the address_from. |
|
test |
Optional[bool] | ➖ | Indicates whether the object has been created in test mode. |