Back to Aligni.com

Retrieve one particular unit by its id.

Examples

# request
curl -H 'Accept: application/xml' -H 'Content-Type: application/xml' \
https://demo.aligni.com/api/v2/oid3vLgynoy_Yl1gZkrgkLEq3J/unit/2

# response
<?xml version="1.0" encoding="UTF-8"?>
<unit>
  <id>3</id>
  <name>inch</name>
  <description>US inch</description>
  <allow_fractional>true</allow_fractional>
  <unit_conversions>
    <unit_conversion>
      <id>6</id>
      <to_unit_id>3</to_unit_id>
      <factor>12.0</factor>
    </unit_conversion>
    ...
  </unit_conversions>
</unit>

Params

Param name Description
api_token
required

Your API token.


Value: Must be a String
id
required

Value: Must be a number.