Download OpenAPI specification:Download
Smartmatサービスの安定性向上のため、APIKey毎に「1分60回 & 24時間1440回」の呼び出し回数が制限されています。アプリケーションを作成する際は、実行回数が制限を超えないように調整してください。
デバイスIDをキーに在庫情報を取得します
id required | string Example: id=W42190804999 取得したいデバイスID |
X-Smartmat-Key required | string 配布済みのAPI KEY |
{- "device": {
- "deviceSerialNumber": "W32190800097",
- "version": "SM-W32"
}, - "deviceMeasurement": {
- "isConnected": true,
- "current": 1500,
- "measuredAt": "2020-05-28 09:51:03+09:00",
- "battery": 61,
- "rssi": -70
}, - "measurementControl": [
- {
- "v1": {
- "type": "frequency",
- "frequency": 4,
- "timing": "00,06,12,18",
- "standardHour": 9
}, - "v2": {
- "frequency": 24,
- "timing": "09",
- "standardHour": 9
}
}
], - "subscription": {
- "subscribed": true,
- "outputTypeText": "AmazonDRS発注",
- "quantity": 1,
- "measurementModeText": "%",
- "measurementTypeText": "減少",
- "full": 19000,
- "weight": 100,
- "weightUnit": "grams",
- "containerWeight": 1000,
- "triggerRemainingPercent": 40,
- "triggerRemainingNumber": 100
}, - "subscriptionMeasurement": {
- "current": 1500,
- "measuredAt": "2020-05-28 09:51:03+09:00",
- "remainingPercent": 61,
- "remainingNumber": 15
}, - "tags": [
- {
- "key": "ユーザ指定のタグ名(ただし場所の場合は '___TagKeyLocation' 固定)",
- "value": "本社倉庫棚番A01"
}
], - "product": {
- "productCode": "B01BEPNPF6",
- "title": "計測商品 水 PET (2L×6本)",
}
}
デバイスIDをキーに計測履歴情報を取得します(デフォルト直近30件分)
id required | string Example: id=W42190804999 取得したいデバイスID |
dateFrom | string <date-time> Example: dateFrom=YYYYMMDDHHMMSS ログデータを該当日時分以降に絞る。14桁の半角数字のみ設定可。省略可。 |
dateTo | string <date-time> Example: dateTo=YYYYMMDDHHMMSS ログデータを該当日時分以前に絞る。14桁の半角数字のみ設定可。省略可 |
limit | integer Example: limit=100 取得件数設定。1〜1000までの半角整数値が設定可。省略可。 |
X-Smartmat-Key required | string 配布済みのAPI KEY |
{- "measureHistories": [
- {
- "measuredAt": "2020-05-28 09:51:03+09:00",
- "prev": 15500,
- "current": 30700,
- "battery": 90,
- "rssi": -70,
- "pushedMeasureButton": false,
- "measurementModeText": "%",
- "measureControlMappingID": 1,
- "frequency": 4,
- "timing": "0,6,12,18",
- "standardHour": 9
}
]
}
発注IDもしくは発注日をキーに発注履歴を取得します(デフォルト最新1000件)
id | integer Example: id=1234 発注ID(カンマ区切りで複数指定可) |
dateFrom | string <date-time> Example: dateFrom=YYYYMMDDHHMMSS 発注日From |
dateTo | string <date-time> Example: dateTo=YYYYMMDDHHMMSS 発注日To |
X-Smartmat-Key required | string 配布済みのAPI KEY |
{- "orders": [
- {
- "id": 1,
- "orderDate": "2019-08-24T14:15:22Z",
- "operationUserEmail": "example@example.com",
- "orderSupplierOrNotificationName": "仕入先名",
- "phaseText": "通知済み",
- "orderPrice": 750,
- "orderItems": [
- {
- "subscriptionID": 1,
- "outputTypeText": "Email発注",
- "productCode": "BX01298FGA",
- "productTitle": "おいしい水",
- "quantity": 5,
- "unit": "個",
- "orderUnitPrice": 150,
- "totalPrice": 750,
- "itemPhaseText": "発注済み"
}
]
}
]
}
在庫IDをキーに在庫情報を取得します(在庫IDの新しい順で1000件)
subscriptionID | integer Example: subscriptionID=123456 取得したい在庫ID(カンマ区切りで複数指定可) |
pageNumber | integer Example: pageNumber=3 取得したいページ番号(1ページあたり1,000件固定) 指定がない場合はデフォルト1ページ目が指定される |
X-Smartmat-Key required | string 配布済みのAPI KEY |
{- "counts": 1234,
- "subscriptions": [
- {
- "id": 123456,
- "deviceSerialNumbers": [
- "W42000000001",
- "W42000000002"
], - "devices": [
- {
- "device": {
- "deviceSerialNumber": "W32190800097",
- "version": "SM-W32"
}, - "deviceMeasurement": {
- "isConnected": true,
- "current": 1500,
- "measuredAt": "2020-05-28 09:51:03+09:00",
- "battery": 61,
- "rssi": -70
}, - "measurementControl": {
- "frequency": 24,
- "timing": "09",
- "standardHour": 9
}
}
], - "measuredAt": "2023-03-30 15:46:41",
- "isConnected": true,
- "productCode": "123abc",
- "productTitle": "部品123abc",
- "remainingPercent": 20,
- "remainingNumber": 40,
- "triggerRemainingPercent": 10,
- "triggerRemainingNumber": 20,
- "measurementMode": 1,
- "measurementType": 1,
- "inventoryUnitPrice": 500,
- "inventoryUnitPriceCurrency": "JPY",
- "inventoryPrice": 40000,
- "expiration": [
- {
- "lotNumber": "string",
- "expirationDate": "2021/01/23",
- "quantity": 0
}
], - "location": "6F",
- "tags": [
- {
- "id": 0,
- "key": "string",
- "value": "string"
}
]
}
]
}