update_measure_units

The update_measure_units function is used to change the measurement system of an item.

Copied!
svc=item/update_measure_units&params={"itemId":<long>,
				      				  "type":<uint>,
				      				  "flags":<uint>}

Parameters

NameDescription
itemIdItem ID.
type

Target measurement system:

  • 0 — Metric; 
  • 1 — U. S.;
  • 2 — Imperial.
flags
  • 0 — set the unit of measurement;
  • 1 — convert the values and set the unit of measurement.

Returned result 

If the request is successful, an empty JSON is returned.

Copied!
{ }

If not, an error code is returned. Possible error codes:

CodeDescription
7Failed to fetch the item with the desired ACL (ADF_ACL_ITEM_EDIT_OTHER), failed to fetch the user or "not a top user" error.
6New type == old type or undefined error.
4

Wrong input parameters.

Download PDF file
Download Word document

See also