インポートステータスの取得#
ステータスエンドポイントは、ショップの現在または最新のインポートジョブを返します。
GET https://sdkapi.ideal.house/product-import/products/status?shopId=<SHOP_ID>
クエリパラメータ#
| フィールド | 型 | 必須 | 制約 | 説明 |
|---|---|---|---|---|
shopId | string | はい | 最大 64 文字 | バッチの送信時に使用した Shop ID。 |
cURL の例#
curl --request GET \
'https://sdkapi.ideal.house/product-import/products/status?shopId=shop_123' \
--header 'X-Client-Id: <YOUR_CLIENT_ID>' \
--header 'X-Client-Secret: <YOUR_CLIENT_SECRET>'
レスポンスフィールド#
| フィールド | 型 | 説明 |
|---|---|---|
jobId | string | インポートジョブの識別子。 |
shopId | string | ジョブに関連付けられたショップ。 |
status | string | pending、running、completed、failed のいずれか。 |
totalCount | number | 送信した商品の総数。 |
processedCount | number | 現時点までに処理した商品数。 |
successCount | number | 正常に作成または更新した商品数。 |
failedCount | number | 商品単位の処理で失敗した商品数。 |
failures | array | 商品単位の失敗。商品単位の失敗がなければ空です。 |
createdAt | string | ISO 8601 形式のジョブ作成日時。 |
startedAt | string or null | ISO 8601 形式の処理開始日時。 |
updatedAt | string | ISO 8601 形式のジョブ最終更新日時。 |
completedAt | string or null | ISO 8601 形式のジョブ終了日時。 |
error | string or null | ジョブ全体のエラー。通常、status が failed の場合にのみ設定されます。 |
processedCount は successCount + failedCount と等しくなります。
successCount は、商品がカタログ内で作成または更新されたことを示します。画像処理の成功や、商品がすぐに表示可能であることを必ずしも意味しません。
failures 内の各オブジェクトは、次のフィールドを含みます。
| フィールド | 型 | 説明 |
|---|---|---|
index | number | 元の products 配列内での商品位置。ゼロから数えます。 |
sku | string | 失敗した商品の SKU。 |
message | string | 失敗の説明。メッセージの正確な文言に依存するアプリケーション処理を実装しないでください。 |
ジョブのステータス#
| ステータス | 意味 | 推奨する対応 |
|---|---|---|
pending | リクエストは受け付け済みで、開始を待っています。 | ポーリングを続けてください。 |
running | 商品を処理中です。 | ポーリングを続け、件数フィールドを使って進捗を表示してください。 |
completed | バッチの処理が終了しました。一部の商品は失敗している場合があります。 | failedCount と failures を確認してください。 |
failed | ジョブ全体のエラーにより、バッチを正常に完了できませんでした。 | error を確認し、以下の説明に従って再試行してください。 |
商品単位の失敗を含む完了済みジョブ#
{
"jobId": "1930000000000000000",
"shopId": "shop_123",
"status": "completed",
"totalCount": 2,
"processedCount": 2,
"successCount": 1,
"failedCount": 1,
"failures": [
{
"index": 1,
"sku": "SKU-10002",
"message": "Unable to import the remote image"
}
],
"createdAt": "2026-07-21T06:30:00.000Z",
"startedAt": "2026-07-21T06:30:00.010Z",
"updatedAt": "2026-07-21T06:30:08.000Z",
"completedAt": "2026-07-21T06:30:08.000Z",
"error": null
}
completed はバッチのワークフローが終了したことを意味し、すべての商品の成功を意味するものではありません。商品単位の失敗が、同じバッチ内の他の商品を停止させることはありません。