Creating a pickup
You can create a pickup request by sending a POST request to the pickups endpoint. A pickup typically consists of the following parameters:carrier_account: The object ID of your USPS or DHL Express carrier account — this is a mandatory field. You can retrieve this from your Rate requests or our /carrier_accounts endpoint.location: The following fields may also be included in locationbuilding_location_type:where your parcels will be available for pickup (accepted enums are: Front Door, Back Door, Side Door, Knock on Door/Ring Bell, Mail Room, Office, Reception, In/At Mailbox, Security Deck, Shipping Dock, Other)building_type: an optional field to describe the type of building (accepted enums are: apartment, building, department, floor, room, suite) where the pickup is locatedinstructions: pickup instructions for the courier (string). This is a mandatory field if the building_location_type is “Other”address: the pickup address, which includes your name, company name, street address, city, state, zip code, country, phone number, and email address (strings). Special characters (/, &, *, etc.) should not be included in any address element, especially name, company, and email.
transactions: The transaction object ID(s) for the parcel(s) that need to be picked up. This should include all eligible parcels.requested_start_time: The earliest that your parcels will be ready for pickup (UTC time)requested_end_time: The latest that your parcels will be available for pickup (UTC time)metadata: an optional field for any additional information you might want to add such as the date of fulfillment
confirmation_code in the event you need to make changes. USPS may send you a follow-up email with your pickup confirmation code. To edit or cancel a pickup, you will need to contact USPS or DHL Express directly and provide your confirmation_code. The ability to edit or cancel a pickup through Shippo may be released in future iterations.
Error messages
You may receive the following error messages if you are missing anything from the above fields in your request.Address or Address Elements Missing
Your pickup address must be submitted in the request with all elements, including city, zip code, country, and phone number.Special Characters Used
Special characters, including /, &, *, and others, should not be used within theaddress elements, especially name, company, and email, as some of our carriers do not accept special characters.