Pickup Point Query
This guide explains how to retrieve pickup point information from Shopify orders when customers select delivery to a pickup location.
Overview
When an order is placed through Shopify using Shipit with a pickup point delivery option, the pickup location details are stored as an order metafield. This information includes the pickup point's name, address, and geographic coordinates.
Querying the Metafield
Use Shopify's GraphQL Admin API to fetch the pickup point metafield:
{
order(id: "gid://shopify/Order/11817062072652") {
pickupPointMetafield: metafield(namespace: "shipit", key: "pickup_point") {
id
value
}
}
}
Metafield location:
- Namespace:
shipit - Key:
pickup_point
Example Response
{
"data": {
"order": {
"pickupPointMetafield": {
"id": "gid://shopify/Metafield/182176401359180",
"value": "{\"id\":\"6013\",\"name\":\"Automaatti S-Market Orimattila\",\"address\":\"Erkontie 16\",\"city\":\"ORIMATTILA\",\"postalCode\":\"16300\",\"countryCode\":\"FI\",\"distanceInMeters\":20700,\"distanceInKilometers\":20.7}"
}
}
}
}
The value field contains a JSON string. When parsed, it includes:
{
"id": "6013",
"name": "Automaatti S-Market Orimattila",
"address": "Erkontie 16",
"city": "ORIMATTILA",
"postalCode": "16300",
"countryCode": "FI",
"distanceInMeters": 20700,
"distanceInKilometers": 20.7
}
Field Descriptions
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the pickup point |
name | string | Display name of the pickup location |
address | string | Street address of the pickup point |
city | string | City where the pickup point is located |
postalCode | string | Postal/ZIP code of the pickup point |
countryCode | string | ISO 3166-1 alpha-2 country code |
distanceInMeters | number | Distance from customer's address in meters |
distanceInKilometers | number | Distance from customer's address in kilometers |
Important
The id field is what you need to create shipments via Shipit's API. In this example, the value is 6013.
Using with Shipit API
When creating shipments through Shipit's API, send the id value as the pickupId parameter.
See Shipit's API documentation for complete shipment creation details.
