Docs
Store operations
Shipping
Shipper HQ

ShipperHQ Metafields

When you enable ShipperHQ on a store, additional fields become available on the product level:

These field values can be set in the control panel by the merchant as well as using one of the following:

If you duplicate a product (opens in a new tab) in the control panel and have ShipperHQ installed (opens in a new tab), metafields for ShipperHQ will be duplicated along with the product or variant.

ShipperHQ object properties

PropertyTypeValuesAccess
permission_setstringThis must be set to write. Setting to any other field will cause unintended behavior.required
keyenumMembers: shipping-groups, shipping-origins, shipping-dimensional-rules.required
valueJSON encoded stringThis will be the name of the attribute type in ShipperHQ. Input the name exactly how it is listed within ShipperHQ. To pass in more than one Shipping Origin, Origin Location or Dimensional Rule, use an array with a comma-separated list. White spaces and special characters need to be escaped. Must be a JSON encoded string "[\"Origin Name from SHQ-1\",\" Origin Name from SHQ-2\"]".required
namespacestringThis will always be shipping.shipperhq.required
resource_typestringEither product or variant.read only
resource_idstringID of the product or variant.read only
descriptionstringShipperHQ shipping origins associated with this product/sku.read only
date_createdstringDate and time of the metafield's creation.read only
date_modifiedstringDate and time when the metafield was last updated.read only
idnumberID of the metafield.read only
⚠️

Entering metafield data

You must enter the metafields exactly, otherwise, they will not work. Since metafields can store information against a product, if the namespace for example is set to shipping and not shipping.shipperhq, it will not update the shipping information.

Control panel behavior

When you set Shipping Origins using the API, you cannot delete the fields using the control panel. You must send a DELETE request to the metafields resource.

Add ShipperHQ metafield

To add a ShipperHQ metafield, set the namespace field to shipping.shipperhq:

Example request: Add ShipperHQ metafield
POST https://api.bigcommerce.com/stores/{{store_hash}}/v3/catalog/products/{{product_id}}/metafields
X-Auth-Token: {{ACCESS_TOKEN}}
Content-Type: application/json
Accept: application/json
 
{
	"permission_set": "write",
	"key": "shipping-origins",
	"value": "[\"Alaska\",\"California\"]",
	"namespace": "shipping.shipperhq"
}

 

Example response: Add ShipperHQ metafield
{
	"data": [
		{
			"id": 51,
			"key": "shipping-origins",
			"value": "[\"Alaska\",\"California\"]",
			"namespace": "shipping.shipperhq",
			"permission_set": "write",
			"resource_type": "product",
			"resource_id": 214,
			"description": "ShipperHQ shipping origins associated with this product/sku",
			"date_created": "2018-07-19T17:56:08+00:00",
			"date_modified": "2018-07-24T14:51:43+00:00"
		},
		{
			"id": 52,
			"key": "shipping-groups",
			"value": "[\"SHIPPING GROUP NAME\"]",
			"namespace": "shipping.shipperhq",
			"permission_set": "write",
			"resource_type": "product",
			"resource_id": 214,
			"description": "ShipperHQ shipping group rules associated with this product/sku",
			"date_created": "2018-07-24T14:51:43+00:00",
			"date_modified": "2018-07-24T14:51:43+00:00"
		},
		{
			"id": 53,
			"key": "shipping-dimensional-rules",
			"value": "[\"DIMENSIONAL RULES NAME\"]",
			"namespace": "shipping.shipperhq",
			"permission_set": "write",
			"resource_type": "product",
			"resource_id": 214,
			"description": "ShipperHQ dimensional rules associated with this product/sku",
			"date_created": "2018-07-24T14:51:43+00:00",
			"date_modified": "2018-07-24T14:51:43+00:00"
		}
	],
	"meta": {
		"pagination": {
			"total": 3,
			"count": 3,
			"per_page": 50,
			"current_page": 1,
			"total_pages": 1,
			"links": {
				"current": "?page=1&limit=50"
			}
		}
	}
}

Resources

Related endpoints

Related articles

Did you find what you were looking for?