Easypost pickups
The EasyPost pickup object and the allowed CRUD operations on the related resource endpoint
Create an EasyPost pickup and associate it with an eligible shipment to schedule a pickup from the related carrier by leveraging our out-of-the-box integration with Easypost. Once a pickup is successfully created, the pickup rates of the carrier are automatically available for the given time frame and location. One of those pickup rates must then be selected and purchased to successfully schedule the pickup.
Eligible shipments
You can create a pickup associated with a shipment if:
The shipment status is
ready_to_ship
.The shipment is associated with at least one parcel.
A shipping label is already been purchased on EasyPost.
If the selected shipment is associated with multiple parcels, only the first one will be considered to create the related pickup. All the information about the total number of associated parcels (if any) and the related package size are available in the instructions
attribute.
Scheduling a pickup
To schedule a pickup you need to:
Create a pickup object. As minimum requirement you need to associate a shipment and set the pickup time window by passing a datetime value for the
min_datetime
andmax_datetime
attributes. If the selected shipment is eligible for pick up the pickup is created in theunknown
status and therates
array is populated with the available pickup rates of the related carrier.Update the created pickup passing one of those rate IDs as the value of the
selected_rate_id
attribute to select the desired pickup rate.Update the created pickup passing the
_purchase
trigger attribute to purchase the selected pickup rate and move the pickup to thescheduled
status.
Steps 2. and 3. can be executed within one single PATCH
request.
The earliest time at which the package is available for pick up is 2 hours from the pickup creation time. The latest time at which the package is available to pick up is 24 hours from the pickup creation time (be aware that this limit may vary based on the selected carrier). Once the pickup time frame is set, it cannot be changed — you need to cancel the pickup and create a new one.
Cancelling a pickup
When you delete a pickup object on Commerce Layer, an attempt to cancel the corresponding pickup on EasyPost is performed. If the operation isn't successful (e.g. because the carrier is already on its way to pick up the package) the API will return an error.
Last updated