Skip to content

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_points
key: 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:

AttributeTypeDescription
providerStringPoints provider, typically carrier name
codeStringCarrier given identifier
detailsDetails objectPickup point details
addressAddress objectPickup point address
attributesAttributes object[]List of pickup point attributes - varies by carrier

Details object

AttributeTypeDescription
nameStringName of the pickup point
description1StringDescription
description2Nullable StringSecond line of the description
distanceStringHuman readable distance in local format

Address object

AttributeTypeDescription
address1StringFirst line of the address
address2Nullable StringSecond line of the address
cityStringCity
zipStringPostal code
provinceNullable StringProvince name
provinceCodeNullable StringProvince code
countryCodeStringCountry code ISO 3166-1 alpha-2

Attributes object

AttributeTypeDescription
keyStringKey of the attribute
valueString / Boolean / NumberValue of the attribute