Shipments Weight Difference from Legacy REST API and Current GraphQL API


Since Shiphero changed to New GRaphQL API, I’m in the middle of pulling the historical records from the current GraphQL API.
I noticed that some of records are exactly same but weights are different.
Also, some of them seems like way too light.

My questions are:

First, why the weights from legacy API and current API are different?
for example)
“request_id”: “6009e46668ccfbb9b72bdfaa”, - weight is 0.0181 from current api and 0.29 from old API
“request_id”: “6009e4f7d05b950918625a07”, - weight is 0.0176 from current api and 0.281 from old API
“request_id”: “6009e526605472f135e7ba90”, - weight is 0.0326 from current api and 0.522 from old API
“request_id”: “6009e54e605472f135e7bab5”, - weight is 2.2 from current api and 35.2 from old API

Second, it seems way too light for the some shipments’ weights. The weights are correct?
In the example above, 0.0181 lb, 0.0326 lb, 0.0326 lb

Lastly, ShipHero has changed some IDs format from digits to uuids (ex. from54978065 to U2hpcG1lbnQ6NTQ5NzgwNjU=). Do you have a plan to remove the legacy id in the future?
Because the ShipHero dev website says the legacy id is provided for a period of time.


Hi @heyjess
Thanks for reaching out!

That looks like a change in the account units, this is:
0.0181 lb == 0.2896 Oz
If you change the default settings at you should be seeing those values returned as Oz instead of lb

Yes, those are the weights entered at the moment and stored in the database.
It is hard to find the exact logs for that because it’s back from 2019-07-13 but if you check the weight of the product (first one) at, the weight of the product is set to 0.00, which might also lead to this behavior, causing the weight to be the one of the Box/Package only for example.

We don’t have plans in the short term to remove them. It was the original idea, for security reasons.
However, in case the tip helps, it is Base 64 encoded. For example, if you use any Base 64 decoder (you can check with this online tool to verify: you will see that:

U2hpcG1lbnQ6NTQ5NzgwNjU= is the same as Shipment:54978065

There are some packages that will let you decode and encode, for example for Python I have used this one base64 — Base16, Base32, Base64, Base85 Data Encodings — Python 3.9.1 documentation

This will allow you to work with IDs instead of legacy_ids

Please let me know if there is anything I could explain better or if there is anything else I could help with.
Thanks in advance!

Everything is super clear and it’s helped me a lot! Thanks Tom! :+1:

1 Like