Set Shopify Collect
Zuletzt geändert: 14.03.2026 05:56

Set-ShopifyCollect #

ÜBERSICHT #

Weist ein Shopify-Produkt einer Collection zu (idempotent).

SYNTAX #

Set-ShopifyCollect [-Shop] <string> [-Token] <string> [-ApiVersion] <string> [-ProductId] <long>
    [-CollectionId] <long> [[-MaxRetries] <int>] [[-TimeoutSec] <int>] [<CommonParameters>]

BESCHREIBUNG #

Fügt ein Produkt per GraphQL collectionAddProducts Mutation einer Collection hinzu. Wenn die Zuordnung bereits existiert, wird dies als Erfolg behandelt (idempotent).

PARAMETER #

-Shop #

Type: string

Shopify-Shop-Domain, z.B. ‘mein-shop.myshopify.com’.

-Token #

Type: string

Admin API Access Token (shpat_…) der Custom App.

-ApiVersion #

Type: string

API-Version, z.B. ‘2025-01’.

-ProductId #

Type: long

Shopify-Produkt-ID.

-CollectionId #

Type: long

Shopify-Collection-ID.

-MaxRetries #

Type: int
Default: 3

Maximale Anzahl Wiederholungen bei Rate-Limit.

-TimeoutSec #

Type: int
Default: 60

HTTP Timeout in Sekunden.

AUSGABEN #

pscustomobject

BEISPIELE #

# Produkt einer Collection zuweisen
Set-ShopifyCollect -Shop 'mein-shop.myshopify.com' `
  -Token 'shpat_abc123' -ApiVersion '2025-01' `
  -ProductId 123456789 -CollectionId 987654321
# Erneuter Aufruf ist idempotent (kein Fehler)
Set-ShopifyCollect -Shop $shop -Token $token -ApiVersion '2025-01' `
  -ProductId $prodId -CollectionId $collId