商品画像一覧取得
GET
/products/images
const url = 'https://api.smaregi.dev/TARGET-CONTRACT-ID/pos/products/images';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.smaregi.dev/TARGET-CONTRACT-ID/pos/products/images \ --header 'Authorization: Bearer <token>'商品の画像URLを一覧を取得します。
対象プラン
- スタンダード
- プレミアム
- プレミアムプラス
- フードビジネス
- リテールビジネス
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”fields
array
検索パラメータ(カンマ区切りで指定可)
Response項目を指定可能
※一部項目(withで指定する項目、2階層目以降の項目)については指定不可
sort
string
並び順(カンマ区切りで指定可)
指定可能なパラメータ
productId:商品ID
limit
integer
上限数
page
integer
ページ
product_id
string
商品ID
※ ユーザーアクセストークンを利用する場合、ユーザーの所属する店舗で販売している商品IDを指定してください。
Responses
Section titled “Responses”取得成功
Media typeapplication/json
Array<object>
object
productId
商品ID
string
url
商品画像URL:商品画像のURL。
※ 本画像URLはキャッシュサーバ上に一時保存されたものです。キャッシュ画像は本APIでアクセス後、約1時間で削除されますので、それまでに画像の取得をお願いいたします。
※ 本APIでキャッシュ画像のURL取得後、商品画像を変更した場合、キャッシュ画像側は変更されませんのでご注意ください。
※ 弊社システム間の一時的な通信不良等により、本項目が“failed”となることがあります。その場合は再度取得していただき、改善しない場合は弊社窓口、もしくはディベロッパーズコミュニティへのご報告をお願いいたします。
string
Example
[ { "productId": "string", "url": "string" }]