API → UnitConvert energy units

Parameters

Name

Type

Req.

  • input_unit

    string
    required
    Possible values
    • btu:  British Thermal Unit (BTU) <https://en.wikipedia.org/wiki/British_thermal_unit>
    • electronvolts:  Electron Volts (eV) <https://en.wikipedia.org/wiki/Electronvolt>
    • joules:  Joules (or watt-seconds) <https://en.wikipedia.org/wiki/Joule>
    • kilocalories:  Kilocalories (often just called calories) <https://en.wikipedia.org/wiki/Kilocalorie>
    • kilowatt_hours:  Kilowatt hours (kWh) <https://en.wikipedia.org/wiki/Kilowatt-hour>
    • watt_hours:  Watt hours (Wh) <https://en.wikipedia.org/wiki/Kilowatt-hour>
  • output_unit

    string
    required
    Possible values
    • btu:  British Thermal Unit (BTU) <https://en.wikipedia.org/wiki/British_thermal_unit>
    • electronvolts:  Electron Volts (eV) <https://en.wikipedia.org/wiki/Electronvolt>
    • joules:  Joules (or watt-seconds) <https://en.wikipedia.org/wiki/Joule>
    • kilocalories:  Kilocalories (often just called calories) <https://en.wikipedia.org/wiki/Kilocalorie>
    • kilowatt_hours:  Kilowatt hours (kWh) <https://en.wikipedia.org/wiki/Kilowatt-hour>
    • watt_hours:  Watt hours (Wh) <https://en.wikipedia.org/wiki/Kilowatt-hour>
  • 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
      • btu:  British Thermal Unit (BTU) <https://en.wikipedia.org/wiki/British_thermal_unit>
      • electronvolts:  Electron Volts (eV) <https://en.wikipedia.org/wiki/Electronvolt>
      • joules:  Joules (or watt-seconds) <https://en.wikipedia.org/wiki/Joule>
      • kilocalories:  Kilocalories (often just called calories) <https://en.wikipedia.org/wiki/Kilocalorie>
      • kilowatt_hours:  Kilowatt hours (kWh) <https://en.wikipedia.org/wiki/Kilowatt-hour>
      • watt_hours:  Watt hours (Wh) <https://en.wikipedia.org/wiki/Kilowatt-hour>
    • output

      number
      optional
    • output_unit

      string
      optional
      Possible values
      • btu:  British Thermal Unit (BTU) <https://en.wikipedia.org/wiki/British_thermal_unit>
      • electronvolts:  Electron Volts (eV) <https://en.wikipedia.org/wiki/Electronvolt>
      • joules:  Joules (or watt-seconds) <https://en.wikipedia.org/wiki/Joule>
      • kilocalories:  Kilocalories (often just called calories) <https://en.wikipedia.org/wiki/Kilocalorie>
      • kilowatt_hours:  Kilowatt hours (kWh) <https://en.wikipedia.org/wiki/Kilowatt-hour>
      • watt_hours:  Watt hours (Wh) <https://en.wikipedia.org/wiki/Kilowatt-hour>
    • 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/energy/{input_unit}/{output_unit}
$ curl "https://api.zoo.dev/unit/conversion/energy/{input_unit}/{output_unit}" \
	--header "Authorization: Bearer $TOKEN"
200 OK
Response
{
  "completed_at": "2024-04-18T22:05:28.172Z",
  "created_at": "2024-04-18T22:05:28.172Z",
  "error": "wk1vHlXdiKbu9uBz",
  "id": "2d80caa7-dbfb-4e42-baeb-82f375ae69ce",
  "input": 12,
  "input_unit": "kilowatt_hours",
  "output": 21,
  "output_unit": "kilowatt_hours",
  "started_at": "2024-04-18T22:05:28.172Z",
  "status": "failed",
  "updated_at": "2024-04-18T22:05:28.172Z",
  "user_id": "ee1c3015-6a72-4a3f-837a-4b4b771fbc7b"
}