Merchant API reference
Delivery Gateway offers a robust GraphQL API that allows developers to access all core features—like shipment creation, label generation, and status tracking. It enables you to connect your custom webshop or platform and automate your logistics workflow.
Our API documentation covers endpoints, authentication, and integration details.
Authentication
All requests to the Merchant API must be authenticated with a valid access token. Include your token as a Bearer token on all API requests. Learn more about authentication and authorization.
Endpoints and queries
GraphQL queries are executed by sending POST HTTP requests to the endpoint:
https://api.sandbox.deliverygateway.io/graphql/merchantin the sandbox environment andhttps://api.deliverygateway.io/graphql/merchantin the production environment.
You can use cURL or an HTTP client such as Postman or Insomnia to query the API.
Postman collection
You can import our Postman collection to explore and test the Merchant API endpoints.
cURL example
curl -X POST https://api.sandbox.deliverygateway.io/graphql/merchant \
-H "Authorization: Bearer <YOUR_TOKEN>" \
-H "Content-Type: application/json" \
-d '{"query": "query { me { id name } }"}'
query {
me {
id
name
}
}
The response will look like this:
{
"data": {
"me": {
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"name": "Merchant Name"
}
}
}
Rate limiting
Not implemented yet, but will be in the future.
Status and error codes
All API queries return HTTP status codes that contain more information about the response.
200 OK
GraphQL HTTP status codes are different from REST API status codes. Most importantly, the GraphQL API can return a 200 OK response code in cases that would typically produce 4xx or 5xx errors in REST.
Error handling
The response for the errors object contains additional detail to help you debug your operation. The response for mutations contains additional detail to help debug your query.