Quickstart
Delivery Gateway is an all-in-one logistics platform designed to simplify and automate your e-commerce shipping processes. We provide a single, centralized solution that connects your webshop with multiple courier service providers, enabling seamless delivery management from a single interface. Our platform helps you save time, reduce costs, and improve customer satisfaction by offering flexible delivery options and transparent tracking.
Integrate Delivery Gateway to your platform
Delivery Gateway offers two types of integrations:
- A lightweight frontend integration: you connect DGW to your website and our Web Plugin will do the rest.
- Full backend integration: take advantage of our GraphQL API to manage the entire ordering and shipping process with all the features Delivery Gateway offers.
In this quickstart guide, we'll show you a quick frontend integration by setting up a delivery method selector. When your customer wants to place an order, they will be able to select from home delivery or pickup point delivery: when they select one, its available options - providers, locations, and so on - will open in a separate modal.
For all available options, read the full guide about frontend integration.
Before you start
Before you start the integration process, we recommend familiarizing yourself with the most important parts of Delivery Gateway. Read about:
Part 1: Get your merchant ID
You need the merchant ID to integrate Delivery Gateway to your website.
- Log in to the Dashboard.
- Select your merchant on the top left corner.
- Go to Merchant.
- Copy the ID from under the merchant name.
Part 2: Enable delivery options
- In the Merchant configuration, find Display.
- Enable the delivery types you want to offer.
Part 3: Connect Delivery Gateway to your website
Add the following script to your website where you want to use the Delivery Gateway integration:
<script src="https://api.deliverygateway.io/sdk/en.js" async></script>
The script calls the window.DGWOnLoad callback (if present) with the global DGW object as its parameter. The global DGW object will also be accessible as window.DGW.
Part 4: Configure the DGW widget
Mount an instance of the DGW object in a function and call that function:
function deliveryMethodSelector(DGW) {
DGW.mount({
containerId: "delivery-gateway",
merchantId: "5441a8c6-5dfb-4744-b6ae-f0d221d4718c",
view: {
type: "delivery-method-selection",
openSelectedMethodInModal: true,
operatorsAsSeparateMethods: true,
},
});
}
if (window.DGW) {
deliveryMethodSelector(window.DGW);
} else {
window.DGWOnLoad = deliveryMethodSelector;
}
Replace the following values with your own:
containerId: The HTML ID of the container that will contain the Delivery Gateway widget.merchantId: Paste your merchant ID here.
Your website should now be able to allow customers to select from different delivery methods.
Part 5: Next steps
To start using Delivery Gateway, you need to configure a few more things:
- Enable at least one provider.
- Create a pricing rule.
- Configure sender information.
- Create your own store for store pickup.
Get started with the API
Delivery Gateway uses a GraphQL API called the Merchant API. The API is fully featured for a robust backend integration.
To get started:
- Learn about GraphQL.
- Create a Bearer access token.
- Set up a GraphQL client.
- Test the Merchant API in a sandbox environment.
API environments
Delivery Gateway offers two environments for you: the sandbox and the production environments.
- The sandbox environment allows you to test our API without any real-world consequences. You can access it at the
https://api.sandbox.deliverygateway.io/graphql/merchant. - The production environment is our public Merchant API endpoint that you can use to configure your Delivery Gateway integrations:
https://api.deliverygateway.io/graphql/merchant.