Get-ShopifyOrder

EulandaXtools — Funktionsreferenz

Get-ShopifyOrder

ÜBERSICHT

Liest eine einzelne Shopify-Bestellung mit allen Positionen per GraphQL.

SYNTAX

Get-ShopifyOrder [-Shop] <string> [-Token] <string> [-ApiVersion] <string> [-OrderId] <long>
    [[-MaxRetries] <int>] [[-TimeoutSec] <int>] [<CommonParameters>]

BESCHREIBUNG

Ruft eine Bestellung per GraphQL Admin API ab und liefert ein normalisiertes PSCustomObject mit Kopf- und Positionsdaten.

Das Ergebnis enthält:

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

-OrderId

Type: long

Shopify-Order-ID (numerisch).

-MaxRetries

Type: int
Default: 3

Maximale Anzahl Wiederholungen bei Rate-Limit.

-TimeoutSec

Type: int
Default: 60

HTTP Timeout in Sekunden.

AUSGABEN

pscustomobject

BEISPIELE

# Einzelne Bestellung abrufen
$order = Get-ShopifyOrder -Shop 'mein-shop.myshopify.com' `
  -Token 'shpat_abc123' -ApiVersion '2025-01' -OrderId 5551234567890
# Bestellung abrufen und Positionen anzeigen
$order = Get-ShopifyOrder -Shop $shop -Token $token `
  -ApiVersion '2025-01' -OrderId $orderId
$order.LineItems | Format-Table SKU, Quantity, Price, Title