본문으로 건너뛰기

위치 데이터 조회

배송 중 측정된 위치 데이터를 조회합니다.

Note:

  • 최대 5일까지 측정 데이터를 조회 할 수 있습니다.
  • 배터리 잔량은 기기에 따라서 제공되지 않을 수 있습니다.

Request


GET https://openapi.willog.io/ext/v1/devices/{serial}/locations

Path Variable

NameDescription
serial디바이스 시리얼

Query Parameters

NameType 얼RequiredDescription
startAtUnix timestamp(ms)true조회 범위 시작 시간
endAtUnix timestamp(ms)true조회 범위 마지막 시간
customerCodeStringfalse고객사 코드

Example Request

GET /ext/v1/devices/{serial}/locations?startAt=1738655274000&endAt=1738655274000
Authorization: Bearer token

Response


Response Body

NameTypeNot-nullDescription
itemsArraytrue측정 데이터 목록
timeUnix timestamp(ms)true측정 시간
latitudeNumbertrue위도
longitudeNumbertrue경도
batteryNumberfalse배터리 잔량 (Optional)

Example Response

HTTP/1.1 200 OK

{
"items": [
{
"latitude": 37.253781,
"longitude": 127.103773,
"time": 1719817200000,
},
{
"latitude": 37.253781,
"longitude": 127.103773,
"time": 1719811800000,
}
]
}

Error Responses

- Unauthorized Access to Customer Data

HTTP/1.1 400 Bad Request

{
"code": "A0016"
}

- Unregistered Device

HTTP/1.1 400 Bad Request

{
"code": "T0007"
}

- 측정 데이터 조회 범위 초과

HTTP/1.1 400 Bad Request

{
"code": "E0004"
}