How to I generate a list of USER_ID to correspond to a USER name.
Hey @TAN,
Thanks for reaching out.
I don’t believe there is a way to generate a list of User IDs at the moment. I believe the best way to get them is to go to https://shipping.shiphero.com/users/ then click on the user whose ID you want then grab it from the address bar. Ex:
The user id here is 122403. You’ll be able to plug that in to your packs_per_day
query.
Please let me know if you have any questions or concerns.
Best,
RayanP
thank you, this is a good workaround until there is a query to query the user_ids
Related questions.
I’m getting the user_id
from the shipments
query. How can I convert it to user_first_name
or user_last_name
or even to the numerical user_id?
They look like this:
VXNlcjo0MjE0ODE=
VXNlcjo0MjQyMDE=
VXNlcjoxMzk0MzY=
...
Thank you,
Hi @hansdaigle,
We currently don’t have a user endpoint, so you would need to keep that as a data table on your end. You can decode the user ID and get the actual ID. Try those values in this link, and you will see what it decodes to https://www.base64decode.org/. You will need to do a slice to get the actual ID.
Have a great day!
Hey @tomasfd,
Thanks for the quick answer I didn’t realized it was base64
. I’ll give that a go and keep a static table mapping user_id
to user metadata.
Thanks again and have a great day!
Hello @tomasfd,
For some reason some of the shipments have a user_id
→ null
.
This is an example (request_id
→ 677eaea255e51d05b786f590
):
Summary
query {
shipment(id: "544474266") {
complexity
request_id
data {
id
legacy_id
user_id
created_date
total_packages
shipped_off_shiphero
order {
id
legacy_id
order_number
account_id
merged_orders {
order_id
is_master
}
}
line_items(first: 15) {
edges {
node {
quantity
line_item {
sku
product_name
product {
dimensions {
weight
height
width
length
}
tags
kit
kit_build
}
}
}
}
}
address {
name
address1
address2
city
state
country
zip
}
shipping_labels {
box_name
tracking_number
tracking_url
carrier
shipping_name
shipping_method
cost
parcelview_url
dimensions {
weight
height
width
length
}
label {
paper_pdf_location
}
order {
shop_name
tags
legacy_id
id
required_ship_date
account_id
total_discounts
total_tax
total_price
subtotal
order_number
order_date
merged_orders {
order_id
is_master
}
shipping_lines {
title
carrier
method
price
}
line_items(first: 15) {
edges {
node {
id
sku
quantity
customs_value
subtotal
product {
dimensions {
weight
height
width
length
}
warehouse_products {
price
value
}
}
}
}
}
}
}
}
}
}
And the result is:
Summary
{
"data": {
"shipment": {
"complexity": 52,
"request_id": "677eaea255e51d05b786f590",
"data": {
"id": "U2hpcG1lbnQ6NTQ0NDc0MjY2",
"legacy_id": 544474266,
"user_id": null, # <-- HERE
"created_date": "2025-01-08T15:18:40",
"total_packages": 1,
"shipped_off_shiphero": false,
"order": {
"id": "XX",
"legacy_id": XX,
"order_number": "XX",
"account_id": "XX",
"merged_orders": []
},
"line_items": {
"edges": [
{
"node": {
"quantity": 4,
"line_item": {
"sku": "XXX",
"product_name": "XXX",
"product": {
"dimensions": {
"weight": "0.8199 lb",
"height": "5.0000 inch",
"width": "2.00 inch",
"length": "5.00 inch"
},
"tags": [
],
"kit": false,
"kit_build": false
}
}
}
},
{
"node": {
"quantity": 1,
"line_item": {
"sku": "XXX",
"product_name": "XXX",
"product": {
"dimensions": {
"weight": "3.3598 lb",
"height": "5.0000 inch",
"width": "5.20 inch",
"length": "5.00 inch"
},
"tags": [
],
"kit": true,
"kit_build": false
}
}
}
},
{
"node": {
"quantity": 1,
"line_item": {
"sku": "XXX",
"product_name": "XXX",
"product": {
"dimensions": {
"weight": "3.4004 lb",
"height": null,
"width": null,
"length": null
},
"tags": [
],
"kit": true,
"kit_build": false
}
}
}
}
]
},
"address": {
"name": "XXX",
"address1": "XXX",
"address2": "",
"city": "XX",
"state": "XX",
"country": "XX",
"zip": "XX"
},
"shipping_labels": [
{
"box_name": "BROWN BOX 14X14X14",
"tracking_number": "XXX",
"tracking_url": "https://www.nationex.com/en/search?id=XXX",
"carrier": "API - Nationex",
"shipping_name": "Tandem best rate",
"shipping_method": "Nationex DELIVERY",
"cost": "XX.XX",
"parcelview_url": null,
"dimensions": {
"weight": "36.8100 lb",
"height": "14.0000 inch",
"width": "14.00 inch",
"length": "14.00 inch"
},
"label": {
"paper_pdf_location": "XXX"
},
"order": {
"shop_name": "XXX",
"tags": [
"ADDRESS_VALIDATED"
],
"legacy_id": XX,
"id": "TXX",
"required_ship_date": "2025-01-08T00:00:00",
"account_id": "XX",
"total_discounts": "0.00",
"total_tax": "0.00",
"total_price": "XX",
"subtotal": "XX",
"order_number": "XXX",
"order_date": "2025-01-07T22:40:50",
"merged_orders": []
}
}
]
}
},
"extensions": {
"throttling": {
"estimated_complexity": 52,
"cost": 17,
"cost_detail": {
"shipment": {
"items_count": 16,
"cost": 1,
"total_cost": 17,
"fields": {}
}
},
"user_quota": {
"credits_remaining": 1985,
"max_available": 2002,
"increment_rate": 30
}
}
}
}
}
Thank you,
Hans
Hey, @hansdaigle, I started investigating; I will let you know as soon as I have an update.
Have a nice day!
Hey @hansdaigle, I spotted a bug and escalated it to engineering. I will keep you updated as it progresses.
Have a great day!
Hey @tomasfd,
I implemented a static mapping, but last week all the user id changed for new ones.
Any idea why? Is it something we did?
Thanks!
Hey @hansdaigle
Can you share an example of a shipment where this happened so I can check?
Of sure, none of the shipment have the same user id. Here’s a list that my map can’t resolve:
# Shipment id
# Shipment user id
554997067
VXNlcjozOTMyNzg=
554996667
VXNlcjozOTMyNzg=
554995753
VXNlcjozOTMyNzg=
554992433
VXNlcjozOTMyNzg=
554991510
VXNlcjo0NDgwNjk=
554991023
VXNlcjozOTMyNzg=
554990642
VXNlcjozOTMyNzg=
554989375
VXNlcjo0NjgwMDE=
554988996
VXNlcjozOTMyNzg=
554988275
VXNlcjozOTMyNzg=
554986928
VXNlcjo0MjA4OTA=