コンテンツにスキップ

商品画像登録

PUT
/products/{product_id}/image

商品画像を登録を受付します。

すでに商品画像が存在しているときは上書きします。

※ 商品画像の登録処理は非同期で実行されます。処理完了後、指定されたコールバックURLにWebhook通知されます。

対象プラン

  • スタンダード
  • プレミアム
  • プレミアムプラス
  • フードビジネス
  • リテールビジネス
product_id
required
string

商品ID
※ ユーザーアクセストークンを利用する場合、ユーザーの所属する店舗で販売している商品IDを指定してください。

object
imageUrl
required
商品画像URL

設定したい商品画像のURL
弊社システムから本項目に指定されたURLにアクセスして取得しますので、アクセス可能なURLを指定してください。
画像サイズは最大10MB、対応フォーマットは、JPEG,PNG,GIFです。

string
<= 511 characters
callbackUrl
画像登録完了通知URL

画像の登録が完了した際に、登録結果をWebhook通知するURL

string
<= 511 characters
state
完了通知ステートメント

画像登録完了通知URLに完了通知する際に設定できる任意の文字列
クエリパラメータとして同時に通知されます

リクエスト例(stateにxxxx1234を指定した場合):
成功例

Content-Type: application/x-www-form-urlencoded;charset=UTF-8
proc_name=callback_product_image_check&state=xxxx1234&params=[
  {
    "id": "1",
    "requestId": "700",
    "productId": "113",
    "imageUrl": "https://www.example.com/sample.png",
    "thumbnailImageUrl": "https://www.example.com/xxxxxx.png"
  }
]

失敗例

Content-Type: application/x-www-form-urlencoded;charset=UTF-8
proc_name=callback_product_image_update_and_notification&state=xxxx1234&params=[
  {
    "id": "1",
    "requestId": "700",
    "productId": "113",
    "imageUrl": "https://www.example.com/sample.png",
    "errorMessage": "画像ダウンロードに失敗:https://www.example.com/sample.png"
  }
]
string
<= 20 characters
Example
{
"imageUrl": "string",
"callbackUrl": "string",
"state": "string"
}

取得成功

object
productId

商品ID

string
callbackUrl

画像の登録が完了した際に、登録結果をWebhook通知するURL

string
state

画像登録完了通知URLに完了通知する際に設定できる任意の文字列
クエリパラメータとして同時に通知されます

string
Example
{
"productId": "string",
"callbackUrl": "string",
"state": "string"
}
  • imageUrlで指定されたUrlのフォーマットが正しくない場合
  • imageUrlで指定されたUrlの画像が最大容量を超えていた場合
object
type
required
string
title
required
string
detail
string
status
integer
Examples
{
"type": "about:blank",
"title": "Bad Request",
"detail": "imageUrlのフォーマットが不正です",
"status": 400
}
  • 指定した商品データが存在しない場合
object
type
required
string
title
required
string
detail
string
status
integer
Examples
{
"type": "about:blank",
"title": "NotFound",
"detail": "指定されたIDのリソースが見つかりません",
"status": 404
}