Resource Identifiers
For resources that may be accessed independently, each resource is assigned a unique ID, called a PKSUID (Prefixed K-Sortable Unique IDentifier). The PKSUID is an extension to the KSUID format created for segment.io, which adds Stripe-like prefixes to each KSUID, useful for two reasons primarily:
-
For developers looking at the IDs, it becomes easy to recognise the type of resource that the ID corresponds to.
-
When reading through logs, the prefix helps to provide context and otherwise differentiates a random looking string of letters and numbers.
Below are the prefixes currently in use, and their corresponding resource types:
Prefix | Resource Type | Sample ID | Additional Notes |
---|---|---|---|
addr | Address | addr_28chumc6QjHu5muPOyiCWL0o7RD | |
eml | Email Address | eml_28chAHmq5RU9sk7Pz4ct46tTZmC | |
cus | Customer | cus_28chAGqWwTyYVqdPML6t88yqefF | |
li | Order Line Item | li_2A4lxXBVFuer5eomqo6TQtTZw9E | |
oa | Order Address | oa_2A4lxXzyIiqaxc5ZgYI8ybvnb6b | Order Addresses are almost structurally identical to Addresses, but are tied to a specific order. |
ord | Order | ord_2A4lxXzyIiqaxc5ZgYI8ybvnb6b | |
pd | Payment Detail | pd_2MON47UFIcEvrhlYXFsETNlzKzc | Payment details are payment records associated with an order. An order can have multiple payment details. |
sd | Shipping Detail | sd_2MON4D7JDX5bDjGuG0go2BKWqzu | Shipping details are payment records associated with an order. An order can have multiple shipping details. |
phne | Phone Number | phne_28che20avj4BwSkuL2vQlOCQXEQ | |
prod | Product | prod_29ZaWHhqqGk00xyZI6SFPc8iON7 | |
vrnt | Product Variant | vrnt_29ZaWHhqqGk00xyZI6SFPc8iON7 | |
loc | Location | loc_2N8nMje6GOtjc7ce9AjkQHmkGJ0 | |
lc | Location Configuration | lc_2NAV9wlYHT9h9WMBoJaJN6qeMIU | |
inv | Inventory Item | inv_2MNP5DWpneqTA8wQ5x9Jocrt4le | |
fpkg | Fulfilment Package | fpkg_2O0lrsZT3vA3GbwhLPZAkwcB6Xk | |
fli | Fulfilment Line Item | fli_2O0lsv9mCZ2O5pirMIM1y4eijR8 | |
trkr | Tracker | trkr_2HsGj8hZxpZJgmk7x8sGZbdJuJP | |
te | Tracker Event | te_2HujkLxgghwIrRxtpeYgrOBugvD | |
tl | Tracker Location | tl_2HujkMprrlCNsL6vVXCLcQB0DQW | |
shp | Shipment | shp_2HrgKpL0t7e3MOtgwSWENt0ayAK | |
spkg | Shipment Package | spkg_2I8wA8rP0GIiflHRkWFExfYZDzD | |
rate | Shipment Rate | rate_2HrgLSjYv5BLYle1e8iHQQPZtAJ | |
batch | Batch | batch_2HrvxcRZwItydr6Fkq2fDAfB6Y5 | |
car | Carrier | car_2CoCIGI8CpiRiNDpe4ZIE5FPost | |
svc | Carrier Service | svc_2CukfkHF0ISnMotW5JuT5GN7CRa | |
ca | Carrier Account | ca_2CoCobSWcZWI75C44fCCIHoO4vU | |
csrd | Customs Record | csrd_2IMflr5JT4YTU4QQBqhRbDGKFjJ | |
doc | Document | doc_2HrgLPaYZomkoaiChDARrW1jq24 | |
mfst | Manifest | mfst_2IqOoM9hYSHQ9JhnsAnFbp9c3mB | |
acc | Provider Account | acc_2G631UfaO7Yh3tOrb6JaMQez0UT | Typically this is not seen in any responses, as provider accounts are internal. Generally Carrier Accounts are what an API would return. |
err | Error | err_2LFqDMQIXZreS2ysbTVIzxANeKL | |
fee | Fee | fee_2I8wASP0j31aL4pxVo9EaJL3x5v | A fee associated with use of a service. Fee resources are generally only returned when usage of a service incurs additional costs outside of the normal billing. |