Skip to main content

GLS Integration

GLS provides parcel shipping services. The integration generates shipping labels and retrieves tracking information through the GLS API.

Components

ComponentFileRole
GlsApisrc/CoreBundle/Api/GlsApi.phpAPI client for GLS
GlsServicesrc/CoreBundle/Services/GlsService.phpShipment business logic

Configuration

Required parameters in parameters.yml:

gls:
api_url: "https://..."
user_id: "..."
password: "..."
contact_id: "..."

Data Flow

Label Generation

  1. GlsService prepares shipment data from SaleProduct records
  2. GlsApi sends the request to the GLS API
  3. The response includes a PDF label and tracking number
  4. The label is stored locally and the tracking number is saved on the SaleProduct

Error Handling

ScenarioBehavior
API timeoutRetry on next attempt
Invalid addressLogged and skipped
Authentication failureCheck parameters.yml credentials
Service unavailableRetry with backoff

:::tip Tracking synchronization GLS tracking updates can be polled periodically using the tracking API endpoint. The tracking number stored on SaleProduct.shipment_infos is used as the lookup key. :::