All Collections
Integrations and API
Packfleet API
How to create shipments with the API
How to create shipments with the API
Updated over a week ago

Prerequisites

  • You have created a Packfleet account (either in the production or test environment)

  • You have obtained an active API key

Create a collection location


The first step is to create a collection location so we know where to pick the shipment up from and to enable us to provide accurate rates. To do this using the Packfleet dashboard:

  1. Click "Manage locations" and then "New location"

  2. Enter your location details and click "Save location"

  3. Once the location has been created click on the new location item

  4. Extract the collection location ID from the URL. For example: https://app.packfleet.com/locations/cloc_YOUR_ID_HERE/edit

Alternatively you can create a collection location using the API, for more information see here). You can also optionally set up a recurring collection or create a one-off collection now.

Creating a shipment

Using the Bulk create endpoint create one or more shipments. Make sure that:

  • You use your newly created collection location ID

  • If you have not created a collection then leave the collectionId field blank

  • You are only using brandId if you want to override the sender details (for example if you are acting on behalf of other brands) and you have previously created a brand

This endpoint will include the shipment IDs that you will need when generating your labels, they will have the ship_ prefix. The response will not contain the label PDF, this must be done using the process described in the next step.

Printing labels

Now that you have created one or more shipments you can generate the labels. This is done using the generate labels endpoint. You can choose to generate the labels as PDF, PNG or raw HTML files. Packfleet currently supported the rect (4” x 6”) and square (4” x 4”) formats.

Did this answer your question?