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

Set-ShopifyFile #

ÜBERSICHT #

Lädt eine Datei in den Shopify Files-Bereich hoch (Staged Upload + fileCreate).

SYNTAX #

Set-ShopifyFile [-Shop] <string> [-Token] <string> [-ApiVersion] <string> [-FilePath] <string>
    [[-AltText] <string>] [[-MaxRetries] <int>] [[-TimeoutSec] <int>] [<CommonParameters>]

BESCHREIBUNG #

Führt einen dreistufigen Upload-Prozess durch:

  1. stagedUploadsCreate (GraphQL) – Upload-URL und Parameter anfordern
  2. HTTP POST – Datei an die staged URL hochladen
  3. fileCreate (GraphQL) – Datei in Shopify registrieren

Unterstützt gängige Dateitypen (PDF, XML, PNG, JPG, ZIP, CSV, JSON, TXT). Bei HTTP 429 oder GraphQL-Throttling wird automatisch wiederholt.

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’.

-FilePath #

Type: string

Vollständiger Pfad zur hochzuladenden Datei.

-AltText #

Type: string
Default: ''

Optionaler Alternativtext für die Datei.

-MaxRetries #

Type: int
Default: 3

Maximale Anzahl Wiederholungen bei Rate-Limit.

-TimeoutSec #

Type: int
Default: 60

HTTP Timeout in Sekunden.

AUSGABEN #

pscustomobject -- Objekt mit Id, Url, Alt, FileName.

BEISPIELE #

$file = Set-ShopifyFile -Shop 'mein-shop.myshopify.com' `
  -Token 'shpat_abc123' -ApiVersion '2025-01' `
  -FilePath 'C:\Rechnungen\RE-2025-001.pdf' -AltText 'Rechnung RE-2025-001'