Skip to main content

Public API reference

Delivery Gateway provides a public GraphQL API for storefront and checkout integrations. You can use it to create and manage delivery sessions, search and select pickup points, set customer addresses, and return delivery options in real time.

This API is intended for customer-facing flows where a lightweight, session-based integration is needed.

Authentication

Public API calls are session-based.

  • Use merchantId to create a new session with createSession.
  • Use the returned session.id for subsequent queries and mutations in the same checkout flow.

Unlike the Merchant API, Public API requests do not require a Merchant Bearer token. Keep Merchant API credentials server-side, and only use the Public API in browser/client checkout flows.

Endpoints and queries

GraphQL queries are executed by sending POST HTTP requests to the endpoint:

  • https://api.sandbox.deliverygateway.io/graphql/public in the sandbox environment and
  • https://api.deliverygateway.io/graphql/public in the production environment.

You can use cURL or an HTTP client such as Postman or Insomnia to query the API.

cURL example

Example cURL request
curl -X POST https://api.sandbox.deliverygateway.io/graphql/public \
-H "Content-Type: application/json" \
-d '{"query":"query Session($id: ID!) { session(id: $id) { id mode currency } }","variables":{"id":"<SESSION_ID>"}}'
GraphQL query
query Session($id: ID!) {
session(id: $id) {
id
mode
currency
}
}

Status and error codes

Public API follows standard GraphQL response conventions.

  • A request can return 200 OK even when business or validation errors exist.
  • GraphQL-level errors are returned in the errors array.
  • Successful payloads are returned in the data object.