Topic: Everything you need to know about integrating your custom-built webshop with Sendcloud via our (RESTful) APIs.
Related links:
- Sendcloud API Reference
- Sendcloud Developer's Portal
- Service points for API integrations
- Sendcloud APIs FAQ's
- Integration guidelines for Marketplaces
At Sendcloud, we provide features and tools that help e-commerce businesses automate their shipping process. Our fully-scaleable features make the lives of online retailers easier, whether you're a sole trader or start-up company, or a large scale operation shipping thousands of parcels a month across the globe.
Integrating with Sendcloud
There are two ways to connect your online store to Sendcloud:
Plug and play integrations
If you use an e-commerce system such as Shopify, WooCommerce, Lightspeed and Magento, you don't need any development skills to connect your store. We provide plug-and-play apps and plugins for 80+ of the most popular e-commerce platforms, available to download from the marketplace or app-store of your particular system.
Sendcloud API
If you have a custom-built web store which isn't hosted and created through an e-commerce platform, that's where our APIs come into play. An API allows developers to connect with and extract key components of our internal system and integrate them with your webshop or system. Sendcloud APIs are designed to cover every stage of the shipping journey.
Our features can be used in conjunction with one another, or standalone, which gives you the flexibility to design and build your own workflow from start to finish. Our APIs give you access to a huge range of national and international shipping options from the most popular European commercial and postal carriers.
Documentation and API Reference
If you're an experienced developer looking to quickly onboard with our APIs, you can head directly over to our API Reference or access our Postman Collections.
If you're new to APIs and want to view an in-depth explanation of how your order processing workflow might look, check out our API Documentation. We provide quick start guides and tutorials to guide you through the fundamentals, from creating your first Order and shipping it with the API to creating your first shipment and comparing Shipping rates.
What can you do with our APIs?
Orders API
The Orders API helps you prepare your orders for delivery in a simple and flexible way.Ship an Order API
The Ship an Order API is a one-stop solution for creating shipping labels for your orders. Shipping involves several key details, such as weight, preferred carrier, destination country, and insurance. The Ship an Order API makes it easy to automate this entire process.Shipments API
You can create and manage Shipments programmatically using the Shipments API. It allows you to automate the entire shipment lifecycle without manual input in the platform, while still making use of your shipping rules and defaults.
All shipments remain visible in your Sendcloud account, so you can review, troubleshoot, or adjust them whenever needed.Service Points API
Integrate a service point picker into your checkout, access a global database of carrier service point locations, and allow your customers to choose a convenient delivery location for their parcel.Returns Portal API
Let your customers manage their own returns by building a custom version of the Return Portal. You can combine this with the paid returns feature to proactively charge a return fee when needed.Tracking API
Retrieve the complete tracking history of a parcel, from the moment it is announced to the carrier until it is delivered to your customer’s doorstep.Pick-ups API
Schedule a one-time pickup with a carrier using the Pick-ups API and have your parcels collected from your warehouse or store within a selected time window.Dynamic Checkout API
Boost your conversion rates by offering next-day, same-day, and nominated-day delivery options directly in your checkout. Configure shipping methods per delivery zone in the panel, then use the API to retrieve the available methods and display them to your customers at checkout.Returns API
Create standalone returns using the Returns API, even if the parcel was not originally shipped through your account. Access a database of available return methods and validate your return request before generating the label, helping you avoid unnecessary charges if the selected return method is not applicable.
What is an API?
API stands for Application Programming Interface. An API allows applications to communicate with each other over the web. To retrieve data from an API, you make a “request” in a formatting language such as JSON or XML, or a programming language such as Python, to a server, and the server returns the requested data in a “response”. APIs are not merely a database—alongside requesting data, you can update, create and delete data by making API requests to specific endpoints.
For example, the Sendcloud API gives you access to the “Create a Shipment” endpoint. You can make a request to this endpoint to create a shipment in the Sendcloud system by providing the endpoint with the information it requires (address information, shipping option information and more). To make a request, you need to know which information our server needs in order to create the shipment. We provide example requests and responses, plus a list of required and optional fields which you can provide, in our API reference.
Why use an API over a plug-and-play integration?
Developers use APIs to build specific features into the existing custom-built webshop or system. Connecting to Sendcloud via the API allows you to customize our features to meet your business needs, plus you can integrate our features alongside third-party applications related to billing and warehouse management.
When you integrate with Sendcloud through an API, you have full flexibility to decide how you want to build your order processing and logistics workflow. You can choose to process your orders directly via the API, or import orders into the Sendcloud panel and process them from there. Because our API gives you access to our key features individually, you can decide which features you want to take advantage of and incorporate them directly into your system and workflow.
Getting started
Ready to get started integrating with Sendcloud APIs? Before you begin, make sure you've created a Sendcloud account and followed the steps in our Getting Started with Sendcloud guide.
You'll need to complete the following steps before our API will accept your requests:
- Configured your sender and return (optional) addresses
- Activated some carriers in your account
- Set up a payment method (required before you can create shipping labels). Learn more about how Sendcloud invoices you for shipping labels you create here.
Optional: Don't forget to create a brand, enable tracking notifications and create your Return portal.
Authentication
Sendcloud uses Basic Authentication to authenticate requests for our APIs. You'll need to include a `Public` and `Private` API key in the header of any calls you make to a Sendcloud endpoint.
Example:
curl “https://panel.sendcloud.sc/api/v2/parcels” --user “YOUR_API_KEY:YOUR_API_SECRET”Refer to the Authentication section of our Developer's portal for more examples regarding authenticating with our APIs.
How to obtain your API keys
- Login to your Sendcloud account and go to Settings > Integrations
- Find Sendcloud API in the list of integrations and click Connect
- Give the API integration a name (e.g. “My Webshop”) and click Save
- Your API Public and Secret keys will be automatically generated. Copy them down somewhere safe, and include them in your request headers. The Public key is your “username” when authenticating with the API, and the Secret (Private) key acts as your “password”.
Enabling Service Points
In the Integration settings page, as described above in Authentication, you can choose to enable or disable service points. To make API requests to the Service Point API, to ship parcels to a service point location, or to display the service point picker in your checkout, be sure to enable service points.
Once you've ticked the box to enable service points, you can select the carriers you want to include as service point delivery methods and slick Save.
Creating test labels
You can test our API's without worrying about surprise charges by using the Sendcloud shipping option ‘Unstamped Letter’ ("shipping_option_code": "sendcloud:letter") . For more help on creating test labels via the API, see our documentation.
Frequently Asked Questions
If you have any questions about using our APIs, you can check our Sendcloud APIs - FAQ guide
IP addresses to whitelist
We use the following IP addresses to access your systems:
3.120.127.184
3.121.38.108
3.122.58.116
35.158.146.12
52.29.82.100
52.58.233.101
52.58.235.98
18.158.201.133
3.72.209.210
3.72.214.91
3.122.139.71
3.64.78.133
3.72.54.241
If you're limiting access to your systems by IP addresses (with a firewall, for example), please take care that appropriate changes are made in time to ensure uninterrupted service.