Placement API
기본 정보
BaseURL
Phase |
URL |
Description |
---|---|---|
QA (DEV) |
https://{region}-qa-connect.lgthinq.com |
region
|
OP |
https://{region}-connect.lgthinq.com |
API List
Method |
End-point |
Sync/ Async |
Response Format |
Summary |
---|---|---|---|---|
POST |
/v2/devices/profile-async |
비동기 |
JSON |
사용자가 소유한 모든 디바이스의 프로파일을 조회합니다. |
POST |
/v2/devices/status-async |
비동기 |
JSON |
사용자가 소유한 모든 디바이스의 상태를 조회합니다. |
POST |
/v2/devices/control-async |
비동기 |
JSON |
사용자가 소유한 디바이스 중에서, 요청한 타입에 해당하는 모든 디바이스를 동시에 제어합니다. |
POST |
/v2/devices/event-async |
비동기 |
JSON |
사용자가 소유한 모든 디바이스의 이벤트를 구독합니다. |
DELETE |
/v2/devices/event-async |
비동기 |
JSON |
사용자가 소유한 모든 디바이스의 이벤트 구독을 해지합니다. |
POST |
/v2/devices/push-async |
비동기 |
JSON |
사용자가 소유한 모든 디바이스의 푸시를 구독합니다. |
DELETE |
/v2/devices/push-async |
비동기 |
JSON |
사용자가 소유한 모든 디바이스의 푸시 구독을 해지합니다. |
복수 디바이스 프로파일 조회
POST /v2/devices/profile-async
사용자가 소유한 모든 디바이스의 프로파일을 조회합니다.
요청
POST /v2/devices/profile-async HTTP/1.1 Host: kic-connect.lgthinq.com Content-Type: application/json Authorization: Bearer {ACCESS_TOKEN} x-message-id: {MESSAGE_ID} x-service-id: {SERVICE_ID} x-service-key: {SERVICE_KEY} x-country-code: {COUNTRY_CODE}
Parameter
Location |
Name |
Required |
Type |
Default |
Description |
Example |
---|---|---|---|---|---|---|
Header |
Y | - | - | - | - |
응답
응답 메시지에 대해서는 다음을 참조하십시오
성공
성공 시, responseCode가 정상 코드 (0000
)로 리턴됩니다. 응답 결과는 response 오브젝트를 통해 확인할 수 있습니다.
Property |
Type |
Description |
---|---|---|
response |
object |
비어있는 값을 반환합니다. |
실패
실패 시, responseCode가 정상 코드 (0000
)가 아닌 다른 값으로 리턴됩니다. 상세 에러 내용은 response > error 오브젝트를 통해 확인할 수 있습니다.
Callback
{ "messageId": "9VrtBGvykATMJ2HUrVYyfF", "requestId": "DsSwmHjsHHKVaFvPsPsP2i", "response": { "deviceId": "TQS-B2E5FF4D-FC14-4E6F-928C-EFC8536B60EA", "deviceType": "DEVICE_STYLER", "pushType": "DEVICE_PROFILE", "serviceId": {SERVICE_ID}, "userNumber": {USER_NUMBER}, "result": { DEVICE_PROFILE }, }, "responseCode": "0000", "statusCode": 200, "timestamp": "2020-08-26T07:39:57.075405" }
Property |
Type |
Description |
---|---|---|
pushType |
string |
|
deviceId |
string |
디바이스 ID |
deviceType |
string |
디바이스 타입 |
serviceId |
string |
서비스를 등록한 후에 발급되는 서비스 ID |
userNumber |
string |
API를 호출한 사용자의 User Number |
result |
array or object |
API 요청에 대한 결과 - 디바이스 프로파일 디바이스 프로파일의 구조는 가전 타입 별로 다르며, 각 가전 별 프로파일에 대한 설명은 Device Profile을 참조하십시오. |
Example
Request
curl -v -X POST 'https://kic-connect.lgthinq.com/v2/devices/profile-async' \ -H 'Authorization: Bearer {EMP_ACCESS_TOKEN}' \ -H 'Content-Type: application/json' \ -H 'x-message-id: Ig7pfvgQQFiLjrKoBFJ0xg' \ -H 'x-service-id: {YOUR_SERVICE_ID}' \ -H 'x-service-key: {YOUR_SERVICE_KEY}' \ -H 'x-country-code: KR'
Response
{ "messageId": "a30a1a28922240cd9b9373", "requestId": "Dk6yZpYbKJvkuDvKHYP2oY", "response": {}, "responseCode": "0000", "statusCode": 202, "timestamp": "2020-08-25T05:46:35.922378" }
복수 디바이스 상태 조회
POST /v2/devices/status-async
사용자가 소유한 모든 디바이스의 상태를 조회합니다.
요청
POST /v2/devices/status-async HTTP/1.1 Host: kic-connect.lgthinq.com Content-Type: application/json Authorization: Bearer {ACCESS_TOKEN} x-message-id: {MESSAGE_ID} x-service-id: {SERVICE_ID} x-service-key: {SERVICE_KEY} x-country-code: {COUNTRY_CODE}
Parameter
Location |
Name |
Required |
Type |
Default |
Description |
Example |
---|---|---|---|---|---|---|
Header |
Y | - | - | - | - |
응답
응답 메시지에 대해서는 다음을 참조하십시오
성공
성공 시, responseCode가 정상 코드 (0000
)로 리턴됩니다. 응답 결과는 response 오브젝트를 통해 확인할 수 있습니다.
Property |
Type |
Description |
---|---|---|
response |
object |
비어있는 값을 반환합니다. |
실패
실패 시, responseCode가 정상 코드 (0000
)가 아닌 다른 값으로 리턴됩니다. 상세 에러 내용은 response > error 오브젝트를 통해 확인할 수 있습니다.
Callback
{ "messageId": "9VrtBGvykATMJ2HUrVYyfF", "requestId": "DsSwmHjsHHKVaFvPsPsP2i", "response": { "deviceId": "TQS-B2E5FF4D-FC14-4E6F-928C-EFC8536B60EA", "deviceType": "DEVICE_STYLER", "pushType": "DEVICE_STATUS", "serviceId": {SERVICE_ID}, "userNumber": {USER_NUMBER}, "result": { DEVICE_STATUS }, }, "responseCode": "0000", "statusCode": 200, "timestamp": "2020-08-26T07:39:57.075405" }
Property |
Type |
Description |
---|---|---|
pushType |
string |
|
deviceId |
string |
디바이스 ID |
deviceType |
string |
디바이스 타입 |
serviceId |
string |
서비스를 등록한 후에 발급되는 서비스 ID |
userNumber |
string |
API를 호출한 사용자의 User Number |
result |
array or object |
API 요청에 대한 결과 - 디바이스 프로파일 기반의 디바이스 상태 데이터 디바이스 프로파일의 구조는 가전 타입 별로 다르며, 각 가전 별 프로파일에 대한 설명은 Device Profile을 참조하십시오. |
Example
Request
curl -v -X POST 'https://kic-connect.lgthinq.com/v2/devices/status-async' \ -H 'Authorization: Bearer {EMP_ACCESS_TOKEN}' \ -H 'Content-Type: application/json' \ -H 'x-message-id: Ig7pfvgQQFiLjrKoBFJ0xg' \ -H 'x-service-id: {YOUR_SERVICE_ID}' \ -H 'x-service-key: {YOUR_SERVICE_KEY}' \ -H 'x-country-code: KR'
Response
{ "messageId": "a30a1a28922240cd9b9373", "requestId": "Dk6yZpYbKJvkuDvKHYP2oY", "response": {}, "responseCode": "0000", "statusCode": 202, "timestamp": "2020-08-25T05:46:35.922378" }
복수 디바이스 제어 (디바이스 타입 기반)
POST /v2/devices/control-async
사용자가 소유한 모든 디바이스 중에서, 요청한 타입에 해당하는 모든 디바이스를 동시에 제어합니다.
요청
POST /v2/devices/control-async HTTP/1.1 Host: kic-connect.lgthinq.com Content-Type: application/json Authorization: Bearer {ACCESS_TOKEN} x-message-id: {MESSAGE_ID} x-service-id: {SERVICE_ID} x-service-key: {SERVICE_KEY} x-country-code: {COUNTRY_CODE} { "deviceType": "{DEVICE_TYPE}", "command": { DEVICE COMMAND } }
Parameter
Location |
Name |
Required |
Type |
Default |
Description |
Example |
---|---|---|---|---|---|---|
Header |
Y | - | - | - | - | |
Body |
deviceType |
Y | string | - |
제어하고자 하는 디바이스 타입 |
|
command |
Y |
array or object |
- |
디바이스 프로파일 기반으로 작성된 제어 명령어 지원하는 제어 명령어는 각 가전 타입 및 모델 별로 다릅니다. 따라서, 먼저 해당 디바이스의 프로파일을 조회하여 제어 가능한 값을 확인한 후 명령어를 전송하십시오.
|
응답
응답 메시지에 대해서는 다음을 참조하십시오
성공
성공 시, responseCode가 정상 코드 (0000
)로 리턴됩니다. 응답 결과는 response 오브젝트를 통해 확인할 수 있습니다.
Property |
Type |
Description |
---|---|---|
response |
object |
비어있는 값을 반환합니다. |
실패
실패 시, responseCode가 정상 코드 (0000
)가 아닌 다른 값으로 리턴됩니다. 상세 에러 내용은 response > error 오브젝트를 통해 확인할 수 있습니다.
Callback
{ "messageId": "9VrtBGvykATMJ2HUrVYyfF", "requestId": "DsSwmHjsHHKVaFvPsPsP2i", "response": { "deviceId": "TQS-B2E5FF4D-FC14-4E6F-928C-EFC8536B60EA", "deviceType": "DEVICE_STYLER", "pushType": "DEVICE_CONTROL", "serviceId": {SERVICE_ID}, "userNumber": {USER_NUMBER}, "result": {}, }, "responseCode": "0000", "statusCode": 200, "timestamp": "2020-08-26T07:39:57.075405" }
Property |
Type |
Description |
---|---|---|
pushType |
string |
|
deviceId |
string |
디바이스 ID |
deviceType |
string |
디바이스 타입 |
serviceId |
string |
서비스를 등록한 후에 발급되는 서비스 ID |
userNumber |
string |
API를 호출한 사용자의 User Number |
result |
object |
비어있는 값을 반환합니다. |
Example
Request
curl -v -X POST 'https://kic-connect.lgthinq.com/v2/devices/control-async' \ -H 'Authorization: Bearer {EMP_ACCESS_TOKEN}' \ -H 'Content-Type: application/json' \ -H 'x-message-id: Ig7pfvgQQFiLjrKoBFJ0xg' \ -H 'x-service-id: {YOUR_SERVICE_ID}' \ -H 'x-service-key: {YOUR_SERVICE_KEY}' \ -H 'x-country-code: KR' \ -d '{ "deviceType": "DEVICE_REFRIGERATOR", "command": { "refrigeration": { "expressMode": true } } }'
Response
{ "messageId": "a30a1a28922240cd9b9373", "requestId": "Dk6yZpYbKJvkuDvKHYP2oY", "response": {}, "responseCode": "0000", "statusCode": 202, "timestamp": "2020-08-25T05:46:35.922378" }
복수 디바이스 이벤트 구독
이벤트 구독
POST /v2/devices/event-async
사용자가 소유한 모든 디바이스에 대해 이벤트를 구독합니다.
요청
POST /v2/devices/event-async HTTP/1.1 Host: kic-connect.lgthinq.com Content-Type: application/json Authorization: Bearer {ACCESS_TOKEN} x-message-id: {MESSAGE_ID} x-service-id: {SERVICE_ID} x-service-key: {SERVICE_KEY} x-country-code: {COUNTRY_CODE} { "expire": { "unit": "HOUR", "timer": 1 } }
Parameter
Location |
Name |
Required |
Type |
Default |
Description |
Example |
|
---|---|---|---|---|---|---|---|
Header |
Y |
- | - | - | - | ||
Body |
expire |
N |
object |
- |
구독 만료 시간을 결정합니다.
|
{ "expire": { "unit": "HOUR", "timer": 1 } } |
|
└ |
unit |
- |
string |
HOUR |
만료 시간 단위 이벤트 구독 요청의 경우, 허용되는 단위는 HOUR(시)입니다.
|
||
└ |
timer |
- |
integer |
1 |
이벤트 구독 만료 시간
|
응답
응답 메시지에 대해서는 다음을 참조하십시오
성공
성공 시, responseCode가 정상 코드 (0000
)로 리턴됩니다. 응답 결과는 response 오브젝트를 통해 확인할 수 있습니다.
Property |
Type |
Description |
---|---|---|
response |
object |
비어있는 값을 반환합니다. |
실패
실패 시, responseCode가 정상 코드 (0000
)가 아닌 다른 값으로 리턴됩니다. 상세 에러 내용은 response > error 오브젝트를 통해 확인할 수 있습니다.
Callback
{ "messageId": "6Wv3DMDsSWKvigZoxB90iw", "requestId": "eDBuBTfRySZVhwiZrqkWpp", "response": { "pushType": "DEVICE_EVENT_SUBSCRIBED", "deviceId": "TQS-B2E5FF4D-FC14-4E6F-928C-EFC8536B60EA", "deviceType": "DEVICE_STYLER", "serviceId": {SERVICE_ID}, "userNumber": {USER_NUMBER}, "result": {} }, "responseCode": "0000", "statusCode": 200, "timestamp": "2020-08-26T07:19:26.123128" }
Property |
Type |
Description |
---|---|---|
pushType |
string |
|
deviceId |
string |
구독이 요청된 디바이스의 ID |
deviceType |
string |
구독이 요청된 디바이스의 타입 |
serviceId |
string |
서비스를 등록한 후에 발급되는 서비스 ID |
userNumber |
string |
API를 호출한 사용자의 User Number |
result |
object |
비어있는 값을 반환합니다. |
Example
Request
curl -v -X POST 'https://kic-connect.lgthinq.com/v2/devices/event-async' \ -H 'Authorization: Bearer {EMP_ACCESS_TOKEN}' \ -H 'Content-Type: application/json' \ -H 'x-message-id: Ig7pfvgQQFiLjrKoBFJ0xg' \ -H 'x-service-id: {YOUR_SERVICE_ID}' \ -H 'x-service-key: {YOUR_SERVICE_KEY}' \ -H 'x-country-code: KR'
Response
{ "messageId": "a30a1a28922240cd9b9373", "requestId": "Dk6yZpYbKJvkuDvKHYP2oY", "response": {}, "responseCode": "0000", "statusCode": 202, "timestamp": "2020-08-25T05:46:35.922378" }
이벤트 구독 해지
DELETE /v2/devices/event-async
사용자가 소유한 모든 디바이스에 대해 이벤트 구독을 해지합니다.
요청
DELETE /v2/users/event-async HTTP/1.1 Host: kic-connect.lgthinq.com Content-Type: application/json Authorization: Bearer {ACCESS_TOKEN} x-message-id: {MESSAGE_ID} x-service-id: {SERVICE_ID} x-service-key: {SERVICE_KEY} x-country-code: {COUNTRY_CODE}
Parameter
Location |
Name |
Required |
Type |
Default |
Description |
Example |
---|---|---|---|---|---|---|
Header |
Y | - | - | - | - |
응답
응답 메시지에 대해서는 다음을 참조하십시오
성공
성공 시, responseCode가 정상 코드 (0000
)로 리턴됩니다. 응답 결과는 response 오브젝트를 통해 확인할 수 있습니다.
Property |
Type |
Description |
---|---|---|
response |
object |
비어있는 값을 반환합니다. |
실패
실패 시, responseCode가 정상 코드 (0000
)가 아닌 다른 값으로 리턴됩니다. 상세 에러 내용은 response > error 오브젝트를 통해 확인할 수 있습니다.
Callback
{ "messageId": "6Wv3DMDsSWKvigZoxB90iw", "requestId": "eDBuBTfRySZVhwiZrqkWpp", "response": { "pushType": "DEVICE_EVENT_UNSUBSCRIBED", "deviceId": "TQS-B2E5FF4D-FC14-4E6F-928C-EFC8536B60EA", "deviceType": "DEVICE_STYLER", "serviceId": {SERVICE_ID}, "userNumber": {USER_NUMBER}, "result": {} }, "responseCode": "0000", "statusCode": 200, "timestamp": "2020-08-26T07:19:26.123128" }
Property |
Type |
Description |
---|---|---|
pushType |
string |
|
deviceId |
string |
구독 해지가 요청된 디바이스의 ID |
deviceType |
string |
구독 해지가 요청된 디바이스 타입 |
serviceId |
string |
서비스를 등록한 후에 발급되는 서비스 ID |
userNumber |
string |
API를 호출한 사용자의 User Number |
result |
object |
비어있는 값을 반환합니다. |
Example
Request
curl -v -X DELETE 'https://kic-connect.lgthinq.com/v2/devices/event-async' \ -H 'Authorization: Bearer {EMP_ACCESS_TOKEN}' \ -H 'Content-Type: application/json' \ -H 'x-message-id: Ig7pfvgQQFiLjrKoBFJ0xg' \ -H 'x-service-id: {YOUR_SERVICE_ID}' \ -H 'x-service-key: {YOUR_SERVICE_KEY}' \ -H 'x-country-code: KR'
Response
{ "messageId": "a30a1a28922240cd9b9373", "requestId": "Dk6yZpYbKJvkuDvKHYP2oY", "response": {}, "responseCode": "0000", "statusCode": 202, "timestamp": "2020-08-25T05:46:35.922378" }
복수 디바이스 푸시 구독
푸시 구독
POST /v2/devices/push-async
사용자가 소유한 모든 디바이스에 대해 푸시를 구독합니다.
요청
POST /v2/devices/push-async HTTP/1.1 Host: kic-connect.lgthinq.com Content-Type: application/json Authorization: Bearer {ACCESS_TOKEN} x-message-id: {MESSAGE_ID} x-service-id: {SERVICE_ID} x-service-key: {SERVICE_KEY} x-country-code: {COUNTRY_CODE}
Parameter
Location |
Name |
Required |
Type |
Default |
Description |
Example |
---|---|---|---|---|---|---|
Header |
Y | - | - | - | - |
응답
응답 메시지에 대해서는 다음을 참조하십시오
성공
성공 시, responseCode가 정상 코드 (0000
)로 리턴됩니다. 응답 결과는 response 오브젝트를 통해 확인할 수 있습니다.
Property |
Type |
Description |
---|---|---|
response |
object |
비어있는 값을 반환합니다. |
실패
실패 시, responseCode가 정상 코드 (0000
)가 아닌 다른 값으로 리턴됩니다. 상세 에러 내용은 response > error 오브젝트를 통해 확인할 수 있습니다.
Callback
{ "messageId": "6Wv3DMDsSWKvigZoxB90iw", "requestId": "eDBuBTfRySZVhwiZrqkWpp", "response": { "pushType": "DEVICE_PUSH_SUBSCRIBED", "deviceId": "TQS-B2E5FF4D-FC14-4E6F-928C-EFC8536B60EA", "deviceType": "DEVICE_STYLER", "serviceId": {SERVICE_ID}, "userNumber": {USER_NUMBER}, "result": {} }, "responseCode": "0000", "statusCode": 200, "timestamp": "2020-08-26T07:19:26.123128" }
Property |
Type |
Description |
---|---|---|
pushType |
string |
|
deviceId |
string |
구독이 요청된 디바이스의 ID |
deviceType |
string |
구독이 요청된 디바이스 타입 |
serviceId |
string |
서비스를 등록한 후에 발급되는 서비스 ID |
userNumber |
string |
API를 호출한 사용자의 User Number |
result |
object |
비어있는 값을 반환합니다. |
Example
Request
curl -v -X POST 'https://kic-connect.lgthinq.com/v2/devices/push-async' \ -H 'Authorization: Bearer {EMP_ACCESS_TOKEN}' \ -H 'Content-Type: application/json' \ -H 'x-message-id: Ig7pfvgQQFiLjrKoBFJ0xg' \ -H 'x-service-id: {YOUR_SERVICE_ID}' \ -H 'x-service-key: {YOUR_SERVICE_KEY}' \ -H 'x-country-code: KR'
Response
{ "messageId": "a30a1a28922240cd9b9373", "requestId": "Dk6yZpYbKJvkuDvKHYP2oY", "response": {}, "responseCode": "0000", "statusCode": 202, "timestamp": "2020-08-25T05:46:35.922378" }
푸시 구독 해지
DELETE /v2/devices/push-async
사용자가 소유한 모든 디바이스에 대해 푸시 구독을 해지합니다.
요청
DELETE /v2/devices/push-async HTTP/1.1 Host: kic-connect.lgthinq.com Content-Type: application/json Authorization: Bearer {ACCESS_TOKEN} x-message-id: {MESSAGE_ID} x-service-id: {SERVICE_ID} x-service-key: {SERVICE_KEY} x-country-code: {COUNTRY_CODE}
Parameter
Location |
Name |
Required |
Type |
Default |
Description |
Example |
---|---|---|---|---|---|---|
Header |
Y | - | - | - | - |
응답
응답 메시지에 대해서는 다음을 참조하십시오
성공
성공 시, responseCode가 정상 코드 (0000
)로 리턴됩니다. 응답 결과는 response 오브젝트를 통해 확인할 수 있습니다.
Property |
Type |
Description |
---|---|---|
response |
object |
비어있는 값을 반환합니다. |
실패
실패 시, responseCode가 정상 코드 (0000
)가 아닌 다른 값으로 리턴됩니다. 상세 에러 내용은 response > error 오브젝트를 통해 확인할 수 있습니다.
Callback
{ "messageId": "6Wv3DMDsSWKvigZoxB90iw", "requestId": "eDBuBTfRySZVhwiZrqkWpp", "response": { "pushType": "DEVICE_PUSH_UNSUBSCRIBED", "deviceId": "TQS-B2E5FF4D-FC14-4E6F-928C-EFC8536B60EA", "deviceType": "DEVICE_STYLER", "serviceId": {SERVICE_ID}, "userNumber": {USER_NUMBER}, "result": {} }, "responseCode": "0000", "statusCode": 200, "timestamp": "2020-08-26T07:19:26.123128" }
Property |
Type |
Description |
---|---|---|
pushType |
string |
|
deviceId |
string |
구독 해지가 요청된 디바이스의 ID |
deviceType |
string |
구독 해지가 요청된 디바이스의 타입 |
serviceId |
string |
서비스를 등록한 후에 발급되는 서비스 ID |
userNumber |
string |
API를 호출한 사용자의 User Number |
result |
object |
비어있는 값을 반환합니다. |
Example
Request
curl -v -X DELETE 'https://kic-connect.lgthinq.com/v2/devices/push-async' \ -H 'Authorization: Bearer {EMP_ACCESS_TOKEN}' \ -H 'Content-Type: application/json' \ -H 'x-message-id: Ig7pfvgQQFiLjrKoBFJ0xg' \ -H 'x-service-id: {YOUR_SERVICE_ID}' \ -H 'x-service-key: {YOUR_SERVICE_KEY}' \ -H 'x-country-code: KR'
Response
{ "messageId": "a30a1a28922240cd9b9373", "requestId": "Dk6yZpYbKJvkuDvKHYP2oY", "response": {}, "responseCode": "0000", "statusCode": 202, "timestamp": "2020-08-25T05:46:35.922378" }