Skip to content

Units of Measure ​

Part of the Support API. Base URL https://your-domain.com/admin/api/v1 — replace the host with your own installation and the token placeholder with a real Bearer token (see Authentication).

List UOMs ​

GET /admin/api/v1/support/uom-categories/{uom_category_id}/uoms

Retrieve a paginated list of UOMs for a specific category with filtering and sorting

🔒 Requires a valid Bearer token.

Path parameters

ParameterTypeRequiredDescription
uom_category_idintegerYesThe UOM category ID

Query parameters

ParameterTypeRequiredDescriptionExample
includestringNoComma-separated list of relationships to include. Available options: category, creatorcategory
filter[id]stringNoComma-separated list of IDs to filter by
filter[type]stringNoFilter by UOM type (reference, bigger, smaller)
filter[name]stringNoFilter by name (partial match)
filter[trashed]stringNoFilter by trashed status. Available options: with, without, only
sortstringYesSort fieldname
pageintegerYesPage number1
bash
curl -X GET "https://your-domain.com/admin/api/v1/support/uom-categories/{uom_category_id}/uoms?include=category&sort=name&page=1" \
  -H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json"
javascript
const response = await fetch("https://your-domain.com/admin/api/v1/support/uom-categories/{uom_category_id}/uoms?include=category&sort=name&page=1", {
  method: "GET",
  headers: {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
  },
});

const data = await response.json();
console.log(data);
php
<?php

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://your-domain.com/admin/api/v1/support/uom-categories/{uom_category_id}/uoms?include=category&sort=name&page=1', [
    'headers' => [
        'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
]);

$data = json_decode($response->getBody(), true);
python
import requests

url = "https://your-domain.com/admin/api/v1/support/uom-categories/{uom_category_id}/uoms?include=category&sort=name&page=1"

headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

response = requests.get(url, headers=headers)

data = response.json()
print(data)

Example response 200

json
{
  "data": [
    {
      "id": 1,
      "type": "reference",
      "name": "Units",
      "factor": 1,
      "rounding": "0.0100",
      "category_id": 1,
      "creator_id": 1,
      "created_at": "2026-10-09T07:12:47.000000Z",
      "updated_at": "2026-10-09T07:12:47.000000Z",
      "deleted_at": null,
      "category": {
        "id": 1,
        "name": "Unit",
        "created_at": "2026-10-09T07:12:47.000000Z",
        "updated_at": "2026-10-09T07:12:47.000000Z"
      }
    },
    {
      "id": 1,
      "type": "reference",
      "name": "Units",
      "factor": 1,
      "rounding": "0.0100",
      "category_id": 1,
      "creator_id": 1,
      "created_at": "2026-10-09T07:12:47.000000Z",
      "updated_at": "2026-10-09T07:12:47.000000Z",
      "deleted_at": null,
      "category": {
        "id": 1,
        "name": "Unit",
        "created_at": "2026-10-09T07:12:47.000000Z",
        "updated_at": "2026-10-09T07:12:47.000000Z"
      }
    }
  ],
  "links": {
    "first": "/?page=1",
    "last": "/?page=1",
    "prev": null,
    "next": null
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 1,
    "links": [
      {
        "url": null,
        "label": "&laquo; Previous",
        "page": null,
        "active": false
      },
      {
        "url": "/?page=1",
        "label": "1",
        "page": 1,
        "active": true
      },
      {
        "url": null,
        "label": "Next &raquo;",
        "page": null,
        "active": false
      }
    ],
    "path": "/",
    "per_page": 10,
    "to": 2,
    "total": 2
  }
}
Error response — 401
json
{
  "message": "Unauthenticated."
}

Create UOM ​

POST /admin/api/v1/support/uom-categories/{uom_category_id}/uoms

Create a new UOM for a specific category

🔒 Requires a valid Bearer token.

Path parameters

ParameterTypeRequiredDescription
uom_category_idintegerYesThe UOM category ID

Body parameters

ParameterTypeRequiredDescription
typestringYesUOM type (reference, bigger, smaller).
namestringYesUOM name. Must not be greater than 255 characters.
factornumberYesConversion factor. Must be at least 0.
roundingnumberYesRounding precision. Must be at least 0.
category_idintegerYesUOM category ID. Must match an existing stored value.
bash
curl -X POST "https://your-domain.com/admin/api/v1/support/uom-categories/{uom_category_id}/uoms" \
  -H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "reference",
  "name": "Kilogram",
  "factor": 1,
  "rounding": 0.01,
  "category_id": 1
}'
javascript
const response = await fetch("https://your-domain.com/admin/api/v1/support/uom-categories/{uom_category_id}/uoms", {
  method: "POST",
  headers: {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
  "type": "reference",
  "name": "Kilogram",
  "factor": 1,
  "rounding": 0.01,
  "category_id": 1
}),
});

const data = await response.json();
console.log(data);
php
<?php

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://your-domain.com/admin/api/v1/support/uom-categories/{uom_category_id}/uoms', [
    'headers' => [
        'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'json' => [
    'type' => 'reference',
    'name' => 'Kilogram',
    'factor' => 1,
    'rounding' => 0.01,
    'category_id' => 1,
  ],
]);

$data = json_decode($response->getBody(), true);
python
import requests

url = "https://your-domain.com/admin/api/v1/support/uom-categories/{uom_category_id}/uoms"

headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = {
    "type": "reference",
    "name": "Kilogram",
    "factor": 1,
    "rounding": 0.01,
    "category_id": 1,
}

response = requests.post(url, headers=headers, json=payload)

data = response.json()
print(data)

Example response 201

json
{
  "data": {
    "id": 1,
    "type": "reference",
    "name": "Units",
    "factor": 1,
    "rounding": "0.0100",
    "category_id": 1,
    "creator_id": 1,
    "created_at": "2026-10-09T07:12:47.000000Z",
    "updated_at": "2026-10-09T07:12:47.000000Z",
    "deleted_at": null,
    "category": {
      "id": 1,
      "name": "Unit",
      "created_at": "2026-10-09T07:12:47.000000Z",
      "updated_at": "2026-10-09T07:12:47.000000Z"
    }
  },
  "message": "UOM created successfully."
}
Error response — 401
json
{
  "message": "Unauthenticated."
}

Show UOM ​

GET /admin/api/v1/support/uom-categories/{uom_category_id}/uoms/{id}

Retrieve a specific UOM by its ID

🔒 Requires a valid Bearer token.

Path parameters

ParameterTypeRequiredDescription
uom_category_idintegerYesThe UOM category ID
idintegerYesThe UOM ID

Query parameters

ParameterTypeRequiredDescriptionExample
includestringNoComma-separated list of relationships to include. Available options: category, creatorcategory
bash
curl -X GET "https://your-domain.com/admin/api/v1/support/uom-categories/{uom_category_id}/uoms/{id}?include=category" \
  -H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json"
javascript
const response = await fetch("https://your-domain.com/admin/api/v1/support/uom-categories/{uom_category_id}/uoms/{id}?include=category", {
  method: "GET",
  headers: {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
  },
});

const data = await response.json();
console.log(data);
php
<?php

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://your-domain.com/admin/api/v1/support/uom-categories/{uom_category_id}/uoms/{id}?include=category', [
    'headers' => [
        'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
]);

$data = json_decode($response->getBody(), true);
python
import requests

url = "https://your-domain.com/admin/api/v1/support/uom-categories/{uom_category_id}/uoms/{id}?include=category"

headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

response = requests.get(url, headers=headers)

data = response.json()
print(data)

Example response 200

json
{
  "data": {
    "id": 1,
    "type": "reference",
    "name": "Units",
    "factor": 1,
    "rounding": "0.0100",
    "category_id": 1,
    "creator_id": 1,
    "created_at": "2026-10-09T07:12:47.000000Z",
    "updated_at": "2026-10-09T07:12:47.000000Z",
    "deleted_at": null,
    "category": {
      "id": 1,
      "name": "Unit",
      "created_at": "2026-10-09T07:12:47.000000Z",
      "updated_at": "2026-10-09T07:12:47.000000Z"
    }
  }
}
Error response — 401
json
{
  "message": "Unauthenticated."
}

Update UOM ​

PUT /admin/api/v1/support/uom-categories/{uom_category_id}/uoms/{id}

Update an existing UOM

🔒 Requires a valid Bearer token.

Path parameters

ParameterTypeRequiredDescription
uom_category_idintegerYesThe UOM category ID
idintegerYesThe UOM ID

Body parameters

ParameterTypeRequiredDescription
typestringNoUOM type (reference, bigger, smaller).
namestringNoUOM name. Must not be greater than 255 characters.
factornumberNoConversion factor. Must be at least 0.
roundingnumberNoRounding precision. Must be at least 0.
category_idintegerNoUOM category ID. Must match an existing stored value.
bash
curl -X PUT "https://your-domain.com/admin/api/v1/support/uom-categories/{uom_category_id}/uoms/{id}" \
  -H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "reference",
  "name": "Kilogram",
  "factor": 1,
  "rounding": 0.01,
  "category_id": 1
}'
javascript
const response = await fetch("https://your-domain.com/admin/api/v1/support/uom-categories/{uom_category_id}/uoms/{id}", {
  method: "PUT",
  headers: {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
  "type": "reference",
  "name": "Kilogram",
  "factor": 1,
  "rounding": 0.01,
  "category_id": 1
}),
});

const data = await response.json();
console.log(data);
php
<?php

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://your-domain.com/admin/api/v1/support/uom-categories/{uom_category_id}/uoms/{id}', [
    'headers' => [
        'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'json' => [
    'type' => 'reference',
    'name' => 'Kilogram',
    'factor' => 1,
    'rounding' => 0.01,
    'category_id' => 1,
  ],
]);

$data = json_decode($response->getBody(), true);
python
import requests

url = "https://your-domain.com/admin/api/v1/support/uom-categories/{uom_category_id}/uoms/{id}"

headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = {
    "type": "reference",
    "name": "Kilogram",
    "factor": 1,
    "rounding": 0.01,
    "category_id": 1,
}

response = requests.put(url, headers=headers, json=payload)

data = response.json()
print(data)

Example response 200

json
{
  "data": {
    "id": 1,
    "type": "reference",
    "name": "Units",
    "factor": 1,
    "rounding": "0.0100",
    "category_id": 1,
    "creator_id": 1,
    "created_at": "2026-10-09T07:12:47.000000Z",
    "updated_at": "2026-10-09T07:12:47.000000Z",
    "deleted_at": null,
    "category": {
      "id": 1,
      "name": "Unit",
      "created_at": "2026-10-09T07:12:47.000000Z",
      "updated_at": "2026-10-09T07:12:47.000000Z"
    }
  },
  "message": "UOM updated successfully."
}
Error response — 401
json
{
  "message": "Unauthenticated."
}

Delete UOM ​

DELETE /admin/api/v1/support/uom-categories/{uom_category_id}/uoms/{id}

Soft delete a UOM

🔒 Requires a valid Bearer token.

Path parameters

ParameterTypeRequiredDescription
uom_category_idintegerYesThe UOM category ID
idintegerYesThe UOM ID
bash
curl -X DELETE "https://your-domain.com/admin/api/v1/support/uom-categories/{uom_category_id}/uoms/{id}" \
  -H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json"
javascript
const response = await fetch("https://your-domain.com/admin/api/v1/support/uom-categories/{uom_category_id}/uoms/{id}", {
  method: "DELETE",
  headers: {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
  },
});

const data = await response.json();
console.log(data);
php
<?php

$client = new \GuzzleHttp\Client();

$response = $client->request('DELETE', 'https://your-domain.com/admin/api/v1/support/uom-categories/{uom_category_id}/uoms/{id}', [
    'headers' => [
        'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
]);

$data = json_decode($response->getBody(), true);
python
import requests

url = "https://your-domain.com/admin/api/v1/support/uom-categories/{uom_category_id}/uoms/{id}"

headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

response = requests.delete(url, headers=headers)

data = response.json()
print(data)

Example response 200

json
{
  "message": "UOM deleted successfully."
}
Error response — 401
json
{
  "message": "Unauthenticated."
}

Restore UOM ​

POST /admin/api/v1/support/uom-categories/{uom_category_id}/uoms/{id}/restore

Restore a soft-deleted UOM

🔒 Requires a valid Bearer token.

Path parameters

ParameterTypeRequiredDescription
uom_category_idintegerYesThe UOM category ID
idintegerYesThe UOM ID
bash
curl -X POST "https://your-domain.com/admin/api/v1/support/uom-categories/{uom_category_id}/uoms/{id}/restore" \
  -H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json"
javascript
const response = await fetch("https://your-domain.com/admin/api/v1/support/uom-categories/{uom_category_id}/uoms/{id}/restore", {
  method: "POST",
  headers: {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
  },
});

const data = await response.json();
console.log(data);
php
<?php

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://your-domain.com/admin/api/v1/support/uom-categories/{uom_category_id}/uoms/{id}/restore', [
    'headers' => [
        'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
]);

$data = json_decode($response->getBody(), true);
python
import requests

url = "https://your-domain.com/admin/api/v1/support/uom-categories/{uom_category_id}/uoms/{id}/restore"

headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

response = requests.post(url, headers=headers)

data = response.json()
print(data)

Example response 200

json
{
  "data": {
    "id": 1,
    "type": "reference",
    "name": "Units",
    "factor": 1,
    "rounding": "0.0100",
    "category_id": 1,
    "creator_id": 1,
    "created_at": "2026-10-09T07:12:47.000000Z",
    "updated_at": "2026-10-09T07:12:47.000000Z",
    "deleted_at": null,
    "category": {
      "id": 1,
      "name": "Unit",
      "created_at": "2026-10-09T07:12:47.000000Z",
      "updated_at": "2026-10-09T07:12:47.000000Z"
    }
  },
  "message": "UOM restored successfully."
}
Error response — 401
json
{
  "message": "Unauthenticated."
}

Force delete UOM ​

DELETE /admin/api/v1/support/uom-categories/{uom_category_id}/uoms/{id}/force

Permanently delete a UOM

🔒 Requires a valid Bearer token.

Path parameters

ParameterTypeRequiredDescription
uom_category_idintegerYesThe UOM category ID
idintegerYesThe UOM ID
bash
curl -X DELETE "https://your-domain.com/admin/api/v1/support/uom-categories/{uom_category_id}/uoms/{id}/force" \
  -H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json"
javascript
const response = await fetch("https://your-domain.com/admin/api/v1/support/uom-categories/{uom_category_id}/uoms/{id}/force", {
  method: "DELETE",
  headers: {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
  },
});

const data = await response.json();
console.log(data);
php
<?php

$client = new \GuzzleHttp\Client();

$response = $client->request('DELETE', 'https://your-domain.com/admin/api/v1/support/uom-categories/{uom_category_id}/uoms/{id}/force', [
    'headers' => [
        'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
]);

$data = json_decode($response->getBody(), true);
python
import requests

url = "https://your-domain.com/admin/api/v1/support/uom-categories/{uom_category_id}/uoms/{id}/force"

headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

response = requests.delete(url, headers=headers)

data = response.json()
print(data)

Example response 200

json
{
  "message": "UOM permanently deleted."
}
Error response — 401
json
{
  "message": "Unauthenticated."
}

Released under the MIT License.