仕入先商品一覧取得
GET
/suppliers/{supplier_id}/products
const url = 'https://api.smaregi.dev/TARGET-CONTRACT-ID/pos/suppliers/example/products';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/suppliers/example/products \ --header 'Authorization: Bearer <token>'仕入先商品の一覧を取得します。
対象プラン
- スタンダード
- プレミアム
- プレミアムプラス
- フードビジネス
- リテールビジネス
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”supplier_id
required
string
仕入先ID
Query Parameters
Section titled “Query Parameters”fields
array
検索パラメータ(カンマ区切りで指定可)
Response項目を指定可能
※一部項目(withで指定する項目、2階層目以降の項目)については指定不可
sort
string
並び順(カンマ区切りで指定可)
指定可能なパラメータ
categoryId:部門IDproductId:商品ID
limit
integer
上限数
page
integer
ページ
category_id
string
部門ID
product_id
string
商品ID
Responses
Section titled “Responses”取得成功
Media typeapplication/json
Array<object>
object
supplierId
仕入先ID
string
categoryId
部門ID:仕入先で取り扱っている部門のID。
商品IDで登録された仕入先商品の場合、nullを設定。
string
productId
商品ID:仕入先で取り扱っている商品のID。
部門IDで登録された仕入先商品の場合、nullを設定。
string
insDateTime
作成日時:登録時の日時。[YYYY-MM-DDThh:mm:ssTZD]
string
Example
[ { "supplierId": "string", "categoryId": "string", "productId": "string", "insDateTime": "string" }]- 指定されたIDが存在しない場合
Media typeapplication/json
object
type
required
string
title
required
string
detail
string
status
integer
Examples
Example指定されたIDが存在しない場合
{ "type": "about:blank", "title": "NotFound", "detail": "指定されたIDのリソースが見つかりません", "status": 404}