Skip to main content
POST
/
unit-classes
/
{unitClassId}
/
default-unit-of-measure
/
{unitOfMeasureId}
Set base UOM for a unit class
curl --request POST \
  --url https://{companyName}.api.joinluminous.com/external/api/v1/unit-classes/{unitClassId}/default-unit-of-measure/{unitOfMeasureId} \
  --header 'Authorization: Bearer <token>'
{
  "data": {
    "id": 123,
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "status": "<string>",
    "name": "<string>",
    "base_class": true,
    "unit_of_measures": [
      {
        "id": 123,
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z",
        "status": "<string>",
        "unit_class_id": 123,
        "unit_class": {
          "id": 123,
          "name": "<string>",
          "base_class": true
        },
        "name": "<string>",
        "description": "<string>",
        "base_unit": true,
        "unit_conversion_rules": [
          {
            "id": 123,
            "created_at": "2023-11-07T05:31:56Z",
            "updated_at": "2023-11-07T05:31:56Z",
            "status": "<string>",
            "base_unit_of_measure_id": 123,
            "base_unit_of_measure": {
              "id": 123,
              "name": "<string>",
              "unit_class_id": 123,
              "base_unit": true
            },
            "converted_unit_of_measure_id": 123,
            "converted_unit_of_measure": {
              "id": 123,
              "name": "<string>",
              "unit_class_id": 123,
              "base_unit": true
            },
            "conversion_factor": 123,
            "type": "SYSTEM",
            "product_id": 123,
            "product": {},
            "product_alternate_skus": [
              {}
            ]
          }
        ]
      }
    ],
    "base_unit_of_measure": {
      "id": 123,
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "status": "<string>",
      "unit_class_id": 123,
      "unit_class": {
        "id": 123,
        "name": "<string>",
        "base_class": true
      },
      "name": "<string>",
      "description": "<string>",
      "base_unit": true,
      "unit_conversion_rules": [
        {
          "id": 123,
          "created_at": "2023-11-07T05:31:56Z",
          "updated_at": "2023-11-07T05:31:56Z",
          "status": "<string>",
          "base_unit_of_measure_id": 123,
          "base_unit_of_measure": {
            "id": 123,
            "name": "<string>",
            "unit_class_id": 123,
            "base_unit": true
          },
          "converted_unit_of_measure_id": 123,
          "converted_unit_of_measure": {
            "id": 123,
            "name": "<string>",
            "unit_class_id": 123,
            "base_unit": true
          },
          "conversion_factor": 123,
          "type": "SYSTEM",
          "product_id": 123,
          "product": {},
          "product_alternate_skus": [
            {}
          ]
        }
      ]
    }
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.joinluminous.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Authenticate using a bearer token. To create a token, navigate to /settings/api-tokens and click Create API Token.

Path Parameters

unitClassId
integer
required

Unit class ID

unitOfMeasureId
integer
required

ID of the UOM to mark as base

Response

Base UOM updated

data
object

A grouping of related units of measure (e.g. "Length", "Weight"). Each class may have a base unit and a list of UOMs.