在庫分類一覧取得
GET
/stock/types
const url = 'https://api.smaregi.dev/TARGET-CONTRACT-ID/pos/stock/types?fields=stockTypeId%2CtypeName&sort=stockTypeId&limit=10&page=2';const options = {method: 'GET'};
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/stock/types?fields=stockTypeId%2CtypeName&sort=stockTypeId&limit=10&page=2'在庫分類一覧を取得します。
対象プラン
- リテールビジネス
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”fields
array
検索パラメータ(カンマ区切りで指定可)
Response項目を指定可能
※一部項目(withで指定する項目、2階層目以降の項目)については指定不可
Example
stockTypeId,typeNamesort
string
並び順(カンマ区切りで指定可)
指定可能なパラメータ
- stockTypeId:在庫分類ID
- displaySequence:表示順
- updDateTime:更新日時:登録時・更新時の日時。[YYYY-MM-DDThh:mm:ssTZD]
Example
stockTypeIdlimit
integer
上限数
Example
10page
integer
ページ
Example
2Responses
Section titled “Responses”取得成功
Media typeapplication/json
Array<object>
object
stockTypeId
在庫分類ID:自動採番
string
typeName
在庫分類名
string
displaySequence
表示順
string
insDateTime
作成日時:登録時の日時。[YYYY-MM-DDThh:mm:ssTZD]
string format: date-time
updDateTime
更新日時:登録時・更新時の日時。[YYYY-MM-DDThh:mm:ssTZD]
string format: date-time
Example
[ { "stockTypeId": "1", "typeName": "不良品", "displaySequence": "1", "insDateTime": "2026-10-05T09:00:00+09:00", "updDateTime": "2026-10-05T09:00:00+09:00" }]