Developer forum

Forum » Swift » Swift 2 and GLS Pickup Points

Swift 2 and GLS Pickup Points

Kim Søjborg Pedersen
Reply

Hello,

I need to setup GLS pick up points in a Swift 2 checkout. I can see the GLS shipping provider og the template file /Files/templates/eCom7/ShippingProvider/GlsServicePoint.cshtml fomr Swift 2.

But so far I haven’t had any success getting it to work. So first of all, I'd like to ask whether it's supposed to work, or if it was only available in Rapido

Best regards
Kim

Screenshot_2026-06-05_135649.png

Replies

 
Kim Søjborg Pedersen
Reply

I setup a shipping provider (GLS) and filled out the settings with app keys, secret and so on...

Problem now is that Ecom:ShippingProvider.Content is always empty.

Has anyone managed to get it to work on Swift 2? 

 

Screenshot_2026-06-05_135907.png
 
Kim Søjborg Pedersen
Reply

We get 'Credential not allowed to access API' in the log on DW when using the provider. 
What do we need to enable on dev-portal.gls-group.net for GLS Shipping Provider to work?

 

PIs *

Indicates approval is required before access to the API is granted.
Name Description Status Actions
Authentication API v2 This API issues access tokens that are needed to invoke other APIs. Enabled  
Customs API v3 This API allows to create customs information for Parcels handled in the GLS network, i.e. create Customs Consignments, define Importers, Exporters and Consignees, and upload customs-relevant documents like commercial invoices —  
Customs Document Management API v1 This API allows to upload, modify and download of customs documents. For usage in combination with Customs API a registration of Document Management API is not necessary. —  
GLS Points for Drop-off (by address) API v1 This API retrieves currently available GLS Points for parcel Drop-off, Returns, and C2C use cases based on a provided address. —  
GLS Points for Pick-up (by address) API v1 This API retrieves currently available GLS Points for parcel Pick-up based on a provided address. Enabled  
OOH Location Finder by Address (multiple) API v1 Get public information about a set of available Out of Home Locations closest to the given address. —  
OOH Location Finder by Address (single) API v1 Get public information about a single available Out of Home Location closest to the given address. —  
OOH Location Finder by Country (bulk) API v1 This API allows to fetch all OOH GLS Points for a specific country. —  
OOH2X API v1 This product combines the Out-of-Home Location Finder and Order APIs (Point2Point and Point2Door delivery). Suitable for all kind of C2C business. —  
Parcel Shop Management API v2 (public) The Parcel Shop Management Public API can be used to get public information about Parcel Shops. —  
Parcel Shop Management GLS Italy API (public) This API provides methods to check and forward Parcels in Italian Parcel Shops. —  
Push Notification (Webhook) API A webhook is a technique for transmitting real-time data between applications as soon as an event takes place.<br>GLS utilizes webhooks to notify about updates to a parcel, such as changes in its status. Following these notifications, more detailed information about the parcel can be accessed through the GLS Track&Trace API.<br>Webhooks can be established at the shipper level, covering all parcels created by a shipper, or at the parcel level. For parcel-level webhooks, the parcel must already exist in the GLS backend. <br><h3><b>Changelog</b></h3> <table style= 'margin:0; padding:0'><tr><td>1.0.0</td><td>25.02.2025</td><td>Initial release</td></tr></table> —  
Sales Order API v1 The Sales Order Interface API receives an external request and creates a Sales Order in SAP. —  
ShipIT-Farm API v1 ShipIT offers customers with a regular shipping volume of more than 30 parcels a day this API to produce parcels, search for parcelshops and the tracking of the created shipments. To receive an access token please refer to authentication API v2 (Important: this API needs to be enabled in your ShipIT app as well!) —  
Shop Returns Customer API v3 Create international Returns with fixed return address for Customers —  
Shop Returns Customer Plus API v3 Create international Returns with flexible return address for Customers —  
Shop Returns Sandbox API v3 Try-out creation of international Returns before Onboarding (no configuration needed) —  
Track And Trace V1 Deliver Track And Trace Information for Parcels and References —  
YourGLS.be API The **YourGLS.be API** lets GLS Belgium customers create shipment orders and retrieve shipping labels programmatically. ### Authentication The API uses the OAuth2 **client credentials** flow. Obtain a client key and secret from the GLS Group Developer Portal, exchange them for a JWT access token (see the `getOauthToken` helper operation), and send it as `Authorization: Bearer <token>` on every request except `GET /health`. ### Base URL All requests are served through the GLS API gateway (Apigee). Each server URL below already includes the product base path — append the operation path (e.g. `/v1/orders`) to it. ### Rate limiting Requests are rate limited by the gateway. When the limit is exceeded the API returns HTTP 429 (no `Retry-After` header); reduce your request rate and retry with backoff. —  
 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply
This post has been marked as an answer

Hi Kim,

I checked the GLS provider implementation, and I think the problem is the API product enabled in the GLS Developer Portal.

The provider does not use the “GLS Points for Pick-up (by address) API v1” for the current Swift 2 checkout flow.

It authenticates using:

/oauth2/v2/token

and then uses the Parcel Shop Management API v2 (public) endpoints, including:

/parcel-shop-management/v2/available-public-parcel-shops

and, when a parcel shop has been selected:

/parcel-shop-management/v2/active-public-parcel-shops/{partnerId}/{parcelShopId}

So in the GLS Developer Portal you need to enable:

  • Authentication API v2

  • Parcel Shop Management API v2 (public)

The “Credential not allowed to access API” error is consistent with the API key being valid for authentication, but the application not having permission to use Parcel Shop Management.

The provider also contains support for OOH Location Finder by Address (multiple) API v1, but the current Swift flow geocodes the customer address first and then uses available-public-parcel-shops, so Parcel Shop Management API v2 (public) is the important missing permission here.

If GLS marks that API as requiring approval, GLS will need to enable/approve it for the application. Also make sure it is enabled for the environment being used — sandbox when “Test mode” is enabled and production otherwise.

Best regards

Votes for this answer: 1
 
Kim Søjborg Pedersen
Reply

Hi Nicolai
Thank you, that is exactly what I needed to know. It would be great if this information had been available on this page (https://doc.dynamicweb.dev/documentation/implementing/commerce/checkout/shipping-providers/GLS.html) — I’m pretty sure I’d have a few fewer grey hairs right now :)

So in the GLS Developer Portal you need to enable:

  • Parcel Shop Management API v2 (public)

BR
Kim

 

 

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

I have updated the article - out tomorrow!

 

You must be logged in to post in the forum