Metafield specification
If you are querying the list of the metafields (REST API) instead single metafield, you can find our metafield by filtering the list by attributes:
namespace: atlas_pickup_pointskey: point
The namespace and key pair are unique. There will be always one or zero, never more.
Metafield object contains value
attribute which is always a JSON String.
Example response from Admin REST API:
{ "metafields": [ { "id": 40318673289557, "namespace": "atlas_pickup_points", "key": "point", "value": "{\"provider\":\"INPOST\",\"code\":\"WAW29HP\",\"details\":{\"name\":\"Paczkomat WAW29HP\",\"description1\":\"al. Jerozolimskie 31, Warszawa\",\"description2\":\"w sklepie Duży Ben\",\"distance\":\"0.14 km\"},\"address\":{\"address1\":\"al. Jerozolimskie 31\",\"address2\":null,\"city\":\"Warszawa\",\"zip\":\"00-508\",\"province\":null,\"provinceCode\":null,\"countryCode\":\"PL\"}}", "description": null, "owner_id": 5756528460117, "created_at": "2023-09-16T16:11:16-04:00", "updated_at": "2023-09-16T16:13:36-04:00", "owner_resource": "order", "type": "json", "admin_graphql_api_id": "gid://shopify/Metafield/40318673289557" } ]}
Parsed example:
{ "provider": "INPOST", "code": "WAW29HP", "details": { "name": "Paczkomat WAW29HP", "description1": "al. Jerozolimskie 31, Warszawa", "description2": "w sklepie Duży Ben", "distance": "0.14 km" }, "address": { "address1": "al. Jerozolimskie 31", "address2": null, "city": "Warszawa", "zip": "00-508", "province": null, "provinceCode": null, "countryCode": "PL" }}
The structure of the JSON object is as follows:
Attribute | Type | Description |
---|---|---|
provider | String | Points provider, typically carrier name |
code | String | Carrier given identifier |
details | Details object | Pickup point details |
address | Address object | Pickup point address |
attributes | Attributes object[] | List of pickup point attributes - varies by carrier |
Details object
Attribute | Type | Description |
---|---|---|
name | String | Name of the pickup point |
description1 | String | Description |
description2 | Nullable String | Second line of the description |
distance | String | Human readable distance in local format |
Address object
Attribute | Type | Description |
---|---|---|
address1 | String | First line of the address |
address2 | Nullable String | Second line of the address |
city | String | City |
zip | String | Postal code |
province | Nullable String | Province name |
provinceCode | Nullable String | Province code |
countryCode | String | Country code ISO 3166-1 alpha-2 |
Attributes object
Attribute | Type | Description |
---|---|---|
key | String | Key of the attribute |
value | String / Boolean / Number | Value of the attribute |