> This page is for Developer.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.bigcommerce.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.bigcommerce.com/_mcp/server.

# ShipperHQ Metafields

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

* [Shipping Groups](https://support.bigcommerce.com/s/article/ShipperHQ#ship-groups)
* [Origin Locations](https://support.bigcommerce.com/s/article/ShipperHQ#origin-loc)
* [Dimensional Rules](https://support.bigcommerce.com/s/article/ShipperHQ#dim-rules)

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

* [Product Metafields Endpoint](/developer/api-reference/rest/admin/catalog/products/metafields/create-product-metafield)
* [Variant Metafields Endpoint](/developer/api-reference/rest/admin/catalog/product-variants/metafields/create-product-variant-metafield)

If you [duplicate a product](https://support.bigcommerce.com/s/article/Adding-Products-v3?language=en_US#product-details) in the control panel and have [ShipperHQ installed](https://support.bigcommerce.com/s/article/ShipperHQ?language=en_US#install), metafields for ShipperHQ will be duplicated along with the product or variant.

## ShipperHQ object properties

| Property        | Type                | Values                                                                                                                                                                                                                                                                                                                                                                                           | Access    |
| --------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :-------- |
| permission\_set | string              | This must be set to `write`. Setting to any other field will cause unintended behavior.                                                                                                                                                                                                                                                                                                          | required  |
| key             | enum                | Members: `shipping-groups`, `shipping-origins`, `shipping-dimensional-rules`.                                                                                                                                                                                                                                                                                                                    | required  |
| value           | JSON encoded string | This 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  |
| namespace       | string              | This will always be `shipping.shipperhq`.                                                                                                                                                                                                                                                                                                                                                        | required  |
| resource\_type  | string              | Either `product` or `variant`.                                                                                                                                                                                                                                                                                                                                                                   | read only |
| resource\_id    | string              | ID of the `product` or `variant`.                                                                                                                                                                                                                                                                                                                                                                | read only |
| description     | string              | ShipperHQ shipping origins associated with this product/sku.                                                                                                                                                                                                                                                                                                                                     | read only |
| date\_created   | string              | Date and time of the metafield's creation.                                                                                                                                                                                                                                                                                                                                                       | read only |
| date\_modified  | string              | Date and time when the metafield was last updated.                                                                                                                                                                                                                                                                                                                                               | read only |
| id              | number              | ID of the metafield.                                                                                                                                                                                                                                                                                                                                                                             | read only |

> **Note**
>
> #### 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`**

```http title="Example request: Add ShipperHQ metafield" showLineNumbers={false}
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`**

```json title="Example response: Add ShipperHQ metafield" showLineNumbers={false}
{
	"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

* [Product Metafield](/developer/api-reference/rest/admin/catalog/products/metafields/create-product-metafield)
* [Variant Metafield](/developer/api-reference/rest/admin/catalog/product-variants/metafields/create-product-variant-metafield)

### Related articles

* [ShipperHQ](https://support.bigcommerce.com/s/article/ShipperHQ) (Knowledge Base)