id for a method and use it to announce a parcel. This id is the unique identifier which you need to obtain before you can perform the following activities via the API:
- Create a shipping label: before you can create a shipping label, you first need to specify a shipping method
idin your request to the Create a parcel or parcels or Update a parcel endpoints. The parcel will then be announced with the relevant carrier, and the label can be downloaded. - Retrieve shipping rates: you can check the rates for a specific shipping method by providing the method
idin your request to the Retrieve a shipping price endpoint. - Create a return: you need to specify the
idfor an appropriate return shipping method in order to announce a return parcel.
Retrieve shipping methods
To retrieve a list of shipping methods which can be used to ship a parcel, you need to make aGET request to the Retrieve a list of shipping methods endpoint.
The shipping methods that will be retrieved appear based on the following factors:
- The carriers you have enabled in your Sendcloud account;
- (Optional) The direct carrier contracts you have connected; and,
- Your sender address: if you don’t specify a
sender_addressid in the query parameters, then your default sender address will be used. This may affect which shipping methods you can see in the response, as some methods and carriers only operate in certain locations.- For example, if your default sender address is in the Netherlands, you will not see shipping methods that only operate from France. To see shipping methods available for shipping from France, you will need to specify a French
sender_addressservice_point_id in the request.
- For example, if your default sender address is in the Netherlands, you will not see shipping methods that only operate from France. To see shipping methods available for shipping from France, you will need to specify a French
Request method and URL
Notes on the shipping methods response
- The shipping method
idis a top-level field in the response e.g.Response body - Prices for each method are displayed under the
countriesobject. Please note that rates will differ depending on your current subscription plan.
Tip: Once you’re familiar with making API calls to retrieve shipping methods, you may want to filter for shipping
methods based on their added-value services, known as shipping
functionalities. An example of this would be
the ability to only retrieve shipping methods which require a “Signature on receipt”. This is possible via the
Shipping products endpoint.
Advanced options
Service point shipping methods
If you want to ship a parcel to a service point, you need to use an applicable service point shipping method. You can filter the list of results to only display methods which can be used for service point delivery by including aservice_point_id in the query parameters of your request.
Request method and URL
service_point_id using the Retrieve a list of service points endpoint.
Return shipping methods
Return methods are treated differently from methods for outgoing parcels. If you want to only show shipping methods which apply to return parcels, include the argumentis_return=true in the query parameters of your request.
Request method and URL
For a more refined way to retrieve return methods, you can refer to the Returns API
endpoints to filter for shipping products which match a given set of parcel characteristics, such as ship from
country, ship to country, parcel weight and parcel dimensions.
Troubleshooting: “Invalid shipment id” error
If you try to use the Create a parcel or parcels endpoint and receive the error message “Invalid shipment id”, this could be because you’re trying to use a shipping method which isn’t applicable for the destination address. For example, if you need to ship a parcel internationally, but the specified shipping method only supports national (domestic) delivery, then you would need to lookup a newid for a supporting method and change the request.