Length of Order ID

Brian30
Shopify Partner
1 0 0

Is there a max length for the Shopify internal ID on an order?

0 Likes
Alex
Shopify Staff
Shopify Staff
1555 81 306

There isn't a predefined length on resource IDs, as our resources follow the ActiveRecord pattern of incrementing integers as IDs (for the time being at least). As of now, you're looking at around 12 digits max, but that is growing.

0 Likes
taoza
New Member
1 0 0

Hey Alex,

I would like to clarify this further against the examples payloads used in the webhook docs.

In the example below, it looks like most of the order ids and line item ids are larger than the max safe integer as defined in IEEE754.

For example, pasting the order ID to a browser console:

820982911946154508 > Number.MAX_SAFE_INTEGER
true

 

I would like to understand if these examples are intentional and represent what may happen eventually.

 

 

 

0 Likes