ロス取得
GET
/losses/{loss_id}
const url = 'https://api.smaregi.dev/TARGET-CONTRACT-ID/pos/losses/3?fields=storeId%2Cmemo&with_details=all';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/losses/3?fields=storeId%2Cmemo&with_details=all'ロス情報を取得します。
対象プラン
- リテールビジネス
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”loss_id
required
string
ロスID
Example
3Query Parameters
Section titled “Query Parameters”fields
array
検索パラメータ(カンマ区切りで指定可)
Response項目を指定可能
※一部項目(withで指定する項目、2階層目以降の項目)については指定不可
Example
storeId,memowith_details
string
ロス明細を付加するか(付加する場合はall, しない場合はnone)
Example
allResponses
Section titled “Responses”取得成功
Media typeapplication/json
object
lossId
ロスID
string
storeId
店舗ID
string
division
ロス区分:ロス区分一覧より設定可能。
string
memo
メモ
string
lossDateTime
ロス発生日時:ロス発生時の日時。[YYYY-MM-DDThh:mm:ssTZD]
string
identificationNo
識別番号:ロス情報を管理するための任意の文字列を設定出来る項目。
string
staffId
スタッフID:ロス処理時のスタッフID
string
staffName
スタッフ名:ロス処理時のスタッフ名
string
insDateTime
作成日時:登録時の日時。[YYYY-MM-DDThh:mm:ssTZD]
string
updDateTime
更新日時:登録時・更新時の日時。[YYYY-MM-DDThh:mm:ssTZD]
string
details
ロス明細(with_details=all時のみ返される)
Array<object>
object
lossDetailId
ロス明細ID
string
lossId
ロスID
string
productId
商品ID:数字15桁以内。
string
taxRate
税率
string
cost
原価
string
quantity
数量
string
rfidTags
RFIDタグリスト
Array<string>
insDateTime
作成日時:登録時の日時。[YYYY-MM-DDThh:mm:ssTZD]
string
updDateTime
更新日時:登録時・更新時の日時。[YYYY-MM-DDThh:mm:ssTZD]
string
Example
{ "lossId": "3", "storeId": "1", "division": "1", "memo": "ロスメモ", "lossDateTime": "2025-01-01T00:00:00+09:00", "identificationNo": "123456789", "staffId": "1", "staffName": "管理者", "insDateTime": "2025-01-01T00:01:00+09:00", "updDateTime": "2025-01-01T00:01:00+09:00", "details": [ { "lossDetailId": "3", "lossId": "3", "productId": "8000001", "taxRate": "10.000", "cost": "10.00000", "quantity": "2", "rfidTags": [ "RFID001", "RFID002" ], "insDateTime": "2025-01-01T00:01:00+09:00", "updDateTime": "2025-01-01T00:01:00+09:00" } ]}- リソースが存在しない場合
Media typeapplication/json
object
type
required
string
title
required
string
detail
string
status
integer
Examples
Exampleリソースが存在しない場合
{ "type": "about:blank", "title": "NotFound", "detail": "指定されたIDのリソースが見つかりません", "status": 404}