Convert to Shopify Gid
Zuletzt geändert: 14.03.2026 05:56

ConvertTo-ShopifyGid #

ÜBERSICHT #

Erzeugt eine Shopify Global ID (GID) aus einer numerischen ID und einem Ressourcentyp.

SYNTAX #

ConvertTo-ShopifyGid [-Id] <long> [-Type] <string> [<CommonParameters>]

BESCHREIBUNG #

Baut eine GID im Format ‘gid://shopify/{Type}/{Id}’ zusammen, wie sie von der Shopify GraphQL Admin API erwartet wird. Wird intern von allen migrierten Shopify-Funktionen verwendet, um numerische IDs in GIDs umzuwandeln.

PARAMETER #

-Id #

Type: long

Numerische Shopify-ID (z.B. Product-ID, Order-ID).

-Type #

Type: string

Shopify-Ressourcentyp. Gültige Werte: Product, Order, Collection, Customer, ProductImage, ProductVariant, InventoryItem, MediaImage.

AUSGABEN #

string

BEISPIELE #

ConvertTo-ShopifyGid -Id 7654321098765 -Type 'Product'
# Gibt 'gid://shopify/Product/7654321098765' zurück
ConvertTo-ShopifyGid -Id 5551234567890 -Type 'Order'
# Gibt 'gid://shopify/Order/5551234567890' zurück