Simple IDs in the REST Admin API
The REST Admin API is a legacy API as of October 1, 2024. All apps and integrations should be built with the GraphQL Admin API. For details and migration steps, visit our migration guide.
This guide describes how simple IDs work in the REST Admin API and how to retrieve simple IDs for different resources.
Anchor to How it worksHow it works
Shopify's REST Admin API contains simple IDs, which differ from global IDs. A simple ID is a unique series of numbers that identifies a REST resource:
Simple ID example
For example, the REST Admin API's DiscountCode
resource includes an id
property that has a simple ID as a value:
DiscountCode resource
Simple IDs also exist for properties that have descriptive names appended by id
. For example, the REST Admin API's GiftCard
resource includes the following properties that each have a simple ID as a value:
GiftCard resource
Anchor to Finding equivalent IDs between REST and GraphQLFinding equivalent IDs between REST and Graph QL
Most REST Admin API resources include an admin_graphql_api_id
property, which provides a global ID for the equivalent object in the GraphQL Admin API. For example, the following two properties on the Customer
resource are equivalent:
Customer resource
Similarly, most GraphQL Admin API objects include a legacyResourceId
field, which provides a simple ID for the equivalent resource in the REST Admin API. For example, the following two fields on the Product
object are equivalent: