Units of measure
GET
/v2/measurement-unit
const url = 'https://api-admin.billz.ai/v2/measurement-unit?page=1&limit=10';const options = { method: 'GET', headers: { 'platform-id': '7d4a4c38-dd84-4902-b744-0488b80a4c01', Authorization: 'Bearer <token>' }};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api-admin.billz.ai/v2/measurement-unit?page=1&limit=10' \ --header 'Authorization: Bearer <token>' \ --header 'platform-id: 7d4a4c38-dd84-4902-b744-0488b80a4c01'Error codes: 400 — input validation error; 401, 403, 429, 500 — shared by all methods. Body formats and semantics: Response codes and errors.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”page
integer format: int32
Non-numeric -> 400
limit
integer format: int32
Non-numeric — 400. Without the parameter, 10 records are returned
name
string
Search by name; the search parameter is not supported here
Header Parameters
Section titled “Header Parameters”platform-id
string
Platform identifier. A static value is used for integrations.
Responses
Section titled “Responses”Successful response
Media typeapplication/json
object
count
Total count
integer format: int32
measurement_units
Array<object>
object
id
string
name
Example: Piece
string
company_id
string
short_name
Example: pcs
string
precision
Precision
string
is_editable
boolean
is_default
boolean
Examplegenerated
{ "count": 1, "measurement_units": [ { "id": "example", "name": "example", "company_id": "example", "short_name": "example", "precision": "example", "is_editable": true, "is_default": true } ]}