Dimensions Object Values Don't Match Documentation

While working to parse shipment data out of ShipHero, the documentation states that the “Dimensions” object’s “weight” property is to be expressed in ounces (oz):

While yes, the resulting value is a string, it’s not expressed in ounces and it contains a label that isn’t “oz”:
image

I had to manually go and validate that the numerical value in the response is actually being express in pounds and the weight of the shipped item really was only 3 ounces.

Is the documentation wrong, or is the API response wrong?

As a follow-up: Is there a reason why you’re not just exposing two varieties of each property (one metric, one imperial)? For example:

"dimensions": {
  "weight_lb": 0.1500,
  "weight_kg": 0.0682,
  "width_in": 12.0000,
  "width_cm": 30.4800
}

This way it’s easier to work with the dimensions object and there’s clarity upon the units used for the value.

Hi @brett
Input dimensions are considered to be in the account’s settings unit unless specified by the field name like weight_in_lbs
Output dimensions will always be in the account’s settings unit unless specified by the field name like weight_in_lbs
By default, accounts are set to oz, that is probably why the schema shows oz, I will request for that to be omitted.
Let me know if this still doesn’t help
Thanks!
Tom

I understand that the values are based upon settings in the UI (after seeing another comment on here about that). Can we add a unit-specific field to the Dimensions object? Either (or both) weight_in_oz and weight_in_lb? This would be much easier to work with when reading and would reduce the possibility of integrations breaking if the UI settings were changed later.

@tomasw Just following up on my last comment. Just looking for an answer if we’ll see these unit-specific versions of properties in the Dimensions object in the future.

Hi @brett !
I apologize for the delay in my update.
Thanks for the description, I see what you mean. I made a Feature Request for this, so I will let you know as soon as I have a response about it
Thanks for the patience!
Tom

1 Like

Hi @brett
Unfortunately we won’t be able to work on this at the moment. It will keep working in the account units.
I will keep it in my notes in case it comes up again, but due to the work we are already making on the Public API we won’t be able to take this task at the moment.
Again I apologize and don’t hesitate to reach out if there is anything else I could help you with.
Thanks for the patience!
Tom