Ir al contenido
This guide is designed specifically for developers.

Cart attributes

Esta página aún no está disponible en tu idioma.

A pickup point chosen before checkout travels on the cart as cart attributes. Globe’s cart widget, the hosted selection page and the Storefront pickup API all write the same keys. Checkout and order processing read them, whichever wrote them.


KeyValue
globe_PickupPointIdThe point’s ID at the carrier, as a string
globe_PickupPointNameThe point’s name
globe_PickupPointAddressThe point’s address on one line
globe_PickupPointDataThe full point as a JSON string. See below
globe_DeliveryMethodpickup
globe_PickupPointCustomerIdThe buyer’s DHL Postnummer for a point that needs one. Otherwise an empty string

The Storefront pickup API returns all six, ready to write, in each point’s cart_attributes. Write them as they are. Do not build globe_PickupPointData yourself.

{
"id": "2080-CZ12345",
"name": "Trafika U Nádraží",
"place": "Trafika U Nádraží",
"address": "Nádražní 1, 110 00 Praha",
"addressObject": {
"street": "Nádražní 1",
"city": "Praha",
"zip": "11000",
"country": "CZ"
},
"latitude": 50.09,
"longitude": 14.43,
"openingHours": [{ "day": 1, "open": "08:00", "close": "18:00" }],
"providerShopId": "64aaaaaaaaaaaaaaaaaaaaa1",
"provider": "gls",
"providerName": "GLS Výdejní místo",
"type": "parcelshop",
"url": null,
"shippingMethods": [
{ "name": "GLS Pickup point", "handle": "gls-pickup-point", "matchType": "exact" }
],
"countryCode": "CZ"
}
FieldDescription
id, name, place, addressThe point’s ID, name, place name and one-line address
addressObjectThe address in parts: street, city, zip, country and, for some carriers, more fields
latitude, longitudeThe point’s coordinates
openingHoursThe carrier’s opening hours as Globe stores them. The shape varies by carrier
providerShopIdYour Globe carrier instance: the id from GET /v1/storefront/carriers
provider, providerNameThe carrier code and the carrier’s display name
typeThe point type, for example parcelshop or locker
urlThe point’s page at the carrier, or null
shippingMethodsThe shipping rates mapped to this carrier for the country: name, handle, matchType, and isCod when you set COD keywords
countryCodeThe point’s country, ISO 3166-1 alpha-2
customerIdThe DHL Postnummer, only when one was entered

The JSON can carry more fields. Ignore fields you do not know.


The Storefront API mutation cartAttributesUpdate replaces the cart’s whole attribute list. Read the cart’s attributes first, replace the Globe keys, keep every other key, and write the full list. See Writing to the cart for code.

When the buyer switches from a pickup point to home delivery, remove these keys from the list you write:

  • globe_PickupPointId
  • globe_PickupPointName
  • globe_PickupPointAddress
  • globe_PickupPointData
  • globe_PickupPointCustomerId

Then set globe_DeliveryMethod:

ValueCheckout, with the delivery customization on
homeHides the pickup point rates
Key removedShows all rates

Writing the keys with empty values has the same effect as removing them.

Write the full cart_attributes exactly as the Storefront pickup API returns them. That is the supported contract. The ID-only form below is a fallback for apps that find points some other way, and it works only for some carriers.

Globe also accepts globe_PickupPointId alone. To tell Globe which carrier the ID belongs to, add one of:

KeyValue
globe_PickupPointProviderShopIdYour Globe carrier instance ID, the id from GET /v1/storefront/carriers
globe_PickupPointCarrierThe carrier code, for example packeta

Without either, Globe uses the carrier the order’s shipping method is mapped to, when there is only one.

Limits of the fallback:

  • Only carrier networks Globe stores itself. Globe looks the ID up in the point network it keeps for carriers such as Packeta or Balíkovna. For carriers Globe queries live, such as GLS or DHL, it needs the point’s coordinates to find the point, and an ID alone carries none. Such a claim cannot be verified.
  • An unverified ID-only point is not saved. The order gets your unselected tag instead. This also happens when a carrier Globe stores cannot be checked at that moment.
  • Checkout cannot use it. Globe’s delivery customization reads globe_PickupPointData to filter and rename rates. Do not set globe_DeliveryMethod to pickup with only the ID: checkout then hides every pickup rate. Leave globe_DeliveryMethod out, so checkout shows all rates and the buyer chooses the rate of the right carrier.

With Checkout delivery customization on in Settings → Cart Widget, checkout reads globe_DeliveryMethod and globe_PickupPointData:

  • pickup with point data: only the rates in the point’s shippingMethods stay visible. If you set up rate renaming, the rate shows the point’s name.
  • pickup without point data: the pickup rates are hidden.
  • home: the pickup rates are hidden.
  • No value: all rates are shown.

If the delivery country in checkout differs from the point’s country, checkout shows all rates.

Shopify copies cart attributes to the order. When Globe processes the new order, it reads them and verifies the point with the carrier’s network. This applies to every channel, the theme cart widget included.

Verified. The point exists at the carrier and is active. Globe replaces the point’s name, address and coordinates with the carrier’s data, then saves it on the order:

Not saved. Globe saves no point when:

  • the carrier does not have the point, or the point is no longer active,
  • the point’s carrier is not mapped to the order’s shipping method,
  • the point’s country is not the order’s shipping country,
  • the order’s shipping method is not a pickup point rate.

The order then gets your Unselected Pickup Point Orders tag (default point_unselected) if you set one, and reminder e-mails follow if you turned them on.

Carrier unreachable. If the carrier cannot answer, Globe keeps the point from the cart’s globe_PickupPointData, as before verification existed.

ID-only claims. A cart with only globe_PickupPointId is saved only when Globe verifies the point. That works for carrier networks Globe stores itself. For carriers Globe queries live, such as GLS or DHL, or when the check fails, the order gets no point and gets your unselected tag. See ID-only fallback.

Labels, CSV exports, Shopify Flow and ERP or WMS integrations see the same fields for these orders as for orders from your online store.