商品アイコン画像登録
PUT /products/{product_id}/icon_image
PUT
/products/{product_id}/icon_image
商品アイコン画像の登録を受付します。
すでに商品アイコン画像が存在しているときは上書きします。
※ 商品アイコン画像の登録処理は非同期で実行されます。処理完了後、指定されたコールバックURLにWebhook通知されます。
対象プラン
- スタンダード
- プレミアム
- プレミアムプラス
- フードビジネス
- リテールビジネス
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” product_id
required
string
商品ID
※ ユーザーアクセストークンを利用する場合、ユーザーの所属する店舗で販売している商品IDを指定してください。
Request Body
Section titled “Request Body ”object
imageUrl
required
商品アイコン画像URL
設定したい商品アイコン画像のURL
弊社システムから本項目に指定されたURLにアクセスして取得しますので、アクセス可能なURLを指定してください。
画像サイズは最大10MB、対応フォーマットは、JPEG,PNG,GIFです。
string
callbackUrl
画像登録完了通知URL
画像の登録が完了した際に、登録結果をWebhook通知するURL
string
state
完了通知ステートメント
成功例
失敗例
画像登録完了通知URLに完了通知する際に設定できる任意の文字列
クエリパラメータとして同時に通知されます
リクエスト例(stateにxxxx1234を指定した場合):
成功例
Content-Type: application/x-www-form-urlencoded;charset=UTF-8
proc_name=callback_product_icon_image_check&state=xxxx1234¶ms=[
{
"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¶ms=[
{
"id": "1",
"requestId": "700",
"productId": "113",
"imageUrl": "https://www.example.com/sample.png",
"errorMessage": "画像ダウンロードに失敗:https://www.example.com/sample.png"
}
]
string
Example
{ "imageUrl": "string", "callbackUrl": "string", "state": "string"}
Responses
Section titled “ Responses ”取得成功
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}
{ "type": "about:blank", "title": "Bad Request", "detail": "imageUrlに指定できる画像の容量は10MBまでです", "status": 400}
- 指定した商品データが存在しない場合
object
type
required
string
title
required
string
detail
string
status
integer
Examples
{ "type": "about:blank", "title": "NotFound", "detail": "指定されたIDのリソースが見つかりません", "status": 404}