Units of Measurement

Units of Measurement

Get Units of Measurement Settings

GET /settings/store/units-of-measurement

Request

Get settings for units of measurements.

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string
  • channel_id in query - integer
    Channel ID to use for channel-specific settings. If omitted, you will interact with the global settings only.

example

curl --request GET \
--url 'https://api.bigcommerce.com/stores/[store_hash]/v3/settings/store/units-of-measurement' \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: {{token}}'

Response

OK. When you request channel-level settings, null indicates that a channel does not have overrides.

Body

object | application/json
  • data
    object

  • meta
    object

example

{
"data": {
"weight_measurement": "Ounces",
"length_measurement": "Inches",
"decimal_token": ".",
"thousands_token": ",",
"decimal_places": 2,
"factoring_dimension": "depth"
},
"meta": {}
}

Update Units of Measurement Settings

PUT /settings/store/units-of-measurement

Request

Update settings for units of measurements.

The endpoint does not support partial updates. Provide all fields to update global or channel-level settings.

Create channel-level settings, or overrides for a channel, using the channel_id query parameter.

To delete overrides for a channel, supply null as a value for all fields. A channel then inherits global values.

The endpoint does not support 'null' as a value for global-level settings.

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string
  • channel_id in query - integer
    Channel ID to use for channel-specific settings. If omitted, you will interact with the global settings only.

Body

object | application/json
  • weight_measurement
    string

    Allowed: LBS | Ounces | KGS | Grams | Tonnes

    Example: Ounces
  • length_measurement
    string

    Allowed: Inches | Centimeters

    Example: Inches
  • decimal_token
    string

    Example: .
  • thousands_token
    string

    Example: ,
  • decimal_places
    integer

    Example: 2
  • factoring_dimension
    string

    Allowed: depth | height | width

    Example: depth

example

{
"weight_measurement": "Ounces",
"length_measurement": "Inches",
"decimal_token": ".",
"thousands_token": ",",
"decimal_places": 2,
"factoring_dimension": "depth"
}

Response

OK. When you request channel-level settings, null indicates that a channel does not have overrides.

Body

object | application/json
  • data
    object

  • meta
    object

example

{
"data": {
"weight_measurement": "Ounces",
"length_measurement": "Inches",
"decimal_token": ".",
"thousands_token": ",",
"decimal_places": 2,
"factoring_dimension": "depth"
},
"meta": {}
}
Did you find what you were looking for?