API → UnitConvert mass units

Parameters

Name

Type

Req.

  • input_unit

    string
    required
    Possible values
    • g:  Grams <https://en.wikipedia.org/wiki/Gram>
    • kg:  Kilograms <https://en.wikipedia.org/wiki/Kilogram>
    • lb:  Pounds <https://en.wikipedia.org/wiki/Pound_(mass)>
  • output_unit

    string
    required
    Possible values
    • g:  Grams <https://en.wikipedia.org/wiki/Gram>
    • kg:  Kilograms <https://en.wikipedia.org/wiki/Kilogram>
    • lb:  Pounds <https://en.wikipedia.org/wiki/Pound_(mass)>
  • value

    number
    required

Returns

  • 200 OK

    successful operation

    Name

    Type

    Req.

    body

    object
    optional
    Object Properties
    • completed_at

      string / ISO-8601
      optional
    • created_at

      string / ISO-8601
      optional
    • error

      string
      optional
    • id

      string / UUID
      optional
    • input

      number
      optional
    • input_unit

      string
      optional
      Possible values
      • g:  Grams <https://en.wikipedia.org/wiki/Gram>
      • kg:  Kilograms <https://en.wikipedia.org/wiki/Kilogram>
      • lb:  Pounds <https://en.wikipedia.org/wiki/Pound_(mass)>
    • output

      number
      optional
    • output_unit

      string
      optional
      Possible values
      • g:  Grams <https://en.wikipedia.org/wiki/Gram>
      • kg:  Kilograms <https://en.wikipedia.org/wiki/Kilogram>
      • lb:  Pounds <https://en.wikipedia.org/wiki/Pound_(mass)>
    • started_at

      string / ISO-8601
      optional
    • status

      string
      optional
      Possible values
      • queued:  The async API call is queued.
      • uploaded:  The async API call was uploaded to be converted.
      • in_progress:  The async API call is in progress.
      • completed:  The async API call has completed.
      • failed:  The async API call has failed.
    • updated_at

      string / ISO-8601
      optional
    • user_id

      string / UUID
      optional
get
/unit/conversion/mass/{input_unit}/{output_unit}
$ curl "https://api.zoo.dev/unit/conversion/mass/{input_unit}/{output_unit}" \
	--header "Authorization: Bearer $TOKEN"
200 OK
Response
{
  "completed_at": "2024-04-18T22:05:31.884Z",
  "created_at": "2024-04-18T22:05:31.884Z",
  "error": "0b2IPPGcAaG1lo4Pon0",
  "id": "d39e5e41-b02b-4ca6-b07c-5f551ab883db",
  "input": 19,
  "input_unit": "g",
  "output": 32,
  "output_unit": "kg",
  "started_at": "2024-04-18T22:05:31.884Z",
  "status": "failed",
  "updated_at": "2024-04-18T22:05:31.884Z",
  "user_id": "d038dce4-6f05-4dc5-a563-17d432b3b702"
}