This API purpose is to convert supported Physical units of measure.
This is a RESTFull api and it will respond to requests as per its concepts
This are accepted values for the units of measure
This Api is protect by authorization layer. If you are accessing through RapidApi, you dont need to worry about this as RapidApi will provide the necessary authorization.
To make a request to the API you will need to be a registered customer. The registration is a work in progress and access through RapidAPI is the only available so far.
curl --location --request POST 'https://theapitoolbox.com/oauth/token' \
--header 'Content-Type: application/json' \
--data-raw '{
"grant_type" : "client_credentials",
"client_id" : "",
"client_secret" : ""
}'
curl --location --request GET 'https://theapitoolbox.com/api/unitsofmeasure/mass?unitFrom=lbs&unitTo=kg&value=6' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json'
--header 'Authorization: Bearer
In this example, a call to the API to convert 6 lbs
to kg
api/unitsofmeasure{physical_quantity}
{
"data": 2.7215542200000002
}