Notification API

기본 정보

BaseURL

Phase

URL

Description

QA (DEV)

https://{region}-qa-connect.lgthinq.com

region

  • KIC : Asia
  • EIC : Europe
  • AIC : North/South America

OP

https://{region}-connect.lgthinq.com

API List

Method

End-point

Sync/ Async

Response Format

Summary

GET

/v2/devices/push

동기

JSON

사용자의 푸쉬 알림 디바이스 목록을 조회합니다.

POST

/v2/devices/push/{DEVICE_ID}

동기

JSON

지정된 디바이스의 푸시를 구독합니다.

DELETE

/v2/devices/push/{DEVICE_ID}

동기

JSON

지정된 디바이스의 푸시 구독을 해지합니다.

POST

/v2/devices/push-async/{DEVICE_ID}

비동기

JSON

비동기 방식으로, 지정된 디바이스의 푸시를 구독합니다.

DELETE

/v2/devices/push-async/{DEVICE_ID}

비동기

JSON

비동기 방식으로, 지정된 디바이스의 푸시 구독을 해지합니다.

POST

/v2/users/push

동기

JSON

사용자의 디바이스 설정 (디바이스 추가/삭제/별명 수정)에 대한 푸시를 구독합니다.

DELETE

/v2/users/push

동기

JSON

사용자의 디바이스 설정 (디바이스 추가/삭제/별명 수정)에 대한 푸시 구독을 해지합니다.

POST

/v2/users/push-async

비동기

JSON

비동기 방식으로, 사용자의 디바이스 설정 (디바이스 추가/삭제/별명 수정)에 대한 푸시를 구독합니다.

DELETE

/v2/users/push-async

비동기

JSON

비동기 방식으로, 사용자의 디바이스 설정 (디바이스 추가/삭제/별명 수정)에 대한 푸시 구독을 해지합니다.

 

디바이스 푸시 구독 관리

디바이스 푸시 구독 목록 조회

GET /v2/devices/push

서비스를 사용하는 특정 사용자에 대해, 푸쉬 알림 디바이스 목록을 조회합니다

요청

GET /v2/devices/push 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

Common Header

Y - - - -

 

응답

응답 메시지에 대해서는 다음을 참조하십시오

성공 

성공 시, responseCode가 정상 코드 (0000)로 리턴됩니다. 응답 결과는 response 오브젝트를 통해 확인할 수 있습니다.

Property

 

Type

Description

response

object

-

deviceId

string

사용자가 등록한 디바이스의 ID

실패

실패 시, responseCode가 정상 코드 (0000)가 아닌 다른 값으로 리턴됩니다. 상세 에러 내용은 response > error 오브젝트를 통해 확인할 수 있습니다.  

 

Example

Request
curl -v -X GET 'https://kic-connect.lgthinq.com/v2/devices/push' \
-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": "Ig7pfvgQQFiLjrKoBFJ0xg",
  "requestId": "n9Wj2DsEs9rSdk77iUdXok",
  "response": [{
      "deviceId": "TQS-7E950117-52AF-4E8E-8ED3-4778C6D67435",
    },
    {
      "deviceId": "TQS-A0FA49E5-1B95-4F9A-89B5-E4156706276A"
    }
  ],
  "responseCode": "0000",
  "statusCode": 200,
  "timestamp": "2020-08-20T01:09:58.224604"
}

 

 

디바이스 푸시 구독

POST /v2/devices/push/{DEVICE_ID}

요청된 디바이스의 푸시를 구독합니다.  

요청

POST /v2/devices/push/{DEVICE_ID} 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

Common Header

Y - - - -

Path

DEVICE_ID

Y string -

디바이스 목록 조회를 통해 확인한 사용자의 디바이스 ID

 

 

응답

응답 메시지에 대해서는 다음을 참조하십시오

성공 

성공 시, responseCode가 정상 코드 (0000)로 리턴됩니다. 응답 결과는 response 오브젝트를 통해 확인할 수 있습니다.

Property

Type

Description

response

object

비어있는 값을 반환합니다.

실패

실패 시, responseCode가 정상 코드 (0000)가 아닌 다른 값으로 리턴됩니다. 상세 에러 내용은 response > error 오브젝트를 통해 확인할 수 있습니다.  

 

Example

Request
curl -v -X POST 'https://kic-connect.lgthinq.com/v2/devices/push/{DEVICE_ID}' \
-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": 200,
  "timestamp": "2020-08-25T05:46:35.922378"
}

 

 

디바이스 푸시 구독 해지

DELETE /v2/devices/push/{DEVICE_ID}

요청된 디바이스의 푸시 구독을 해지합니다. 

요청

DELETE /v2/devices/push/{DEVICE_ID} 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

Common Header

Y - - - -

Path

DEVICE_ID

Y string -

디바이스 목록 조회를 통해 확인한 사용자의 디바이스 ID

 

 

응답

응답 메시지에 대해서는 다음을 참조하십시오

성공 

성공 시, responseCode가 정상 코드 (0000)로 리턴됩니다. 응답 결과는 response 오브젝트를 통해 확인할 수 있습니다.

Property

Type

Description

response

object

비어있는 값을 반환합니다.

실패

실패 시, responseCode가 정상 코드 (0000)가 아닌 다른 값으로 리턴됩니다. 상세 에러 내용은 response > error 오브젝트를 통해 확인할 수 있습니다.  

 

Example

Request
curl -v -X DELETE 'https://kic-connect.lgthinq.com/v2/devices/push/{DEVICE_ID}' \
-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": 200,
  "timestamp": "2020-08-25T05:46:35.922378"
}

 

 

디바이스 푸시 구독 관리 (비동기)

디바이스 푸시 구독 (비동기)

POST /v2/devices/push-async/{DEVICE_ID}

요청된 디바이스의 푸시를 구독합니다.  

이 API는 비동기 방식으로 동작합니다. 동작 방식은 API Call Sequence > 비동기 호출을 참조하시기 바랍니다. 

요청

POST /v2/devices/push-async/{DEVICE_ID} 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

Common Header

Y - - - -

Path

DEVICE_ID

Y string -

디바이스 목록 조회를 통해 확인한 사용자의 디바이스 ID

 

 

응답

응답 메시지에 대해서는 다음을 참조하십시오

성공 

성공 시, responseCode가 정상 코드 (0000)로 리턴됩니다. 응답 결과는 response 오브젝트를 통해 확인할 수 있습니다.

Property

Type

Description

response

object

비어있는 값을 반환합니다.

실패

실패 시, responseCode가 정상 코드 (0000)가 아닌 다른 값으로 리턴됩니다. 상세 에러 내용은 response > error 오브젝트를 통해 확인할 수 있습니다.  

 

Callback

{
  "messageId": "0nvVEXz4TzOGgkc35fpXtg",
  "requestId": "imrXNdmqiqx7hKFJC5Fb2M",
  "response": {
    "deviceId": {DEVICE_ID},
    "deviceType": "DEVICE_AIR_CONDITIONER",
    "pushType": "DEVICE_PUSH_SUBSCRIBED",
    "serviceId": {SERVICE_ID},
    "userNumber": {USER_NUMBER},
    "result": {}
  },
  "responseCode": "0000",
  "statusCode": 200,
  "timestamp": "2021-04-01T13:59:34.759463"
}

Property

Type

Description

deviceId

string

디바이스 ID

deviceType

string

디바이스 타입

pushType

string

DEVICE_PUSH_SUBSCRIBED

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/{DEVICE_ID}' \
-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": "Ig7pfvgQQFiLjrKoBFJ0xg",
  "requestId": "imrXNdmqiqx7hKFJC5Fb2M",
  "response": {},
  "responseCode": "0000",
  "statusCode": 202,
  "timestamp": "2021-04-01T13:59:33.754455"
}

 

 

디바이스 푸시 구독 해지 (비동기)

DELETE /v2/devices/push-async/{DEVICE_ID}

요청된 디바이스의 푸시 구독을 해지합니다. 

이 API는 비동기 방식으로 동작합니다. 동작 방식은 API Call Sequence > 비동기 호출을 참조하시기 바랍니다. 

요청

DELETE /v2/devices/push-async/{DEVICE_ID} 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

Common Header

Y - - - -

Path

DEVICE_ID

Y string -

디바이스 목록 조회를 통해 확인한 사용자의 디바이스 ID

 

 

응답

응답 메시지에 대해서는 다음을 참조하십시오

성공 

성공 시, responseCode가 정상 코드 (0000)로 리턴됩니다. 응답 결과는 response 오브젝트를 통해 확인할 수 있습니다.

Property

Type

Description

response

object

비어있는 값을 반환합니다.

실패

실패 시, responseCode가 정상 코드 (0000)가 아닌 다른 값으로 리턴됩니다. 상세 에러 내용은 response > error 오브젝트를 통해 확인할 수 있습니다.  

 

Callback

{
  "messageId": "Ig7pfvgQQFiLjrKoBFJ0xg",
  "requestId": "b5YwFXSWHz3GqBCZbRjTZS",
  "response": {
    "deviceId": {DEVICE_ID},
    "deviceType": "DEVICE_AIR_CONDITIONER",
    "pushType": "DEVICE_PUSH_UNSUBSCRIBED",
    "serviceId": {SERVICE_ID},
    "userNumber": {USER_NUMBER},
    "result": {}
  },
  "responseCode": "0000",
  "statusCode": 200,
  "timestamp": "2021-04-01T13:55:28.622032"
}

Propery

Type

Description

deviceId

string

디바이스 ID

deviceType

string

디바이스 타입

pushType

string

DEVICE_PUSH_UNSUBSCRIBED

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/{DEVICE_ID}' \
-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": "Ig7pfvgQQFiLjrKoBFJ0xg",
  "requestId": "b5YwFXSWHz3GqBCZbRjTZS",
  "response": {},
  "responseCode": "0000",
  "statusCode": 202,
  "timestamp": "2021-04-01T13:55:27.602659"
}

 

 

사용자 푸시 구독 관리 (동기)

사용자 푸시 구독 (동기)

POST /v2/users/push

사용자의 디바이스 설정(추가/ 삭제/ 별명 수정)에 대한 푸시를 구독합니다. 

요청

POST /v2/users/push 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

Common Header

Y - - - -

 

응답

응답 메시지에 대해서는 다음을 참조하십시오

성공 

성공 시, responseCode가 정상 코드 (0000)로 리턴됩니다. 응답 결과는 response 오브젝트를 통해 확인할 수 있습니다.

Property

Type

Description

response

object

비어있는 값을 반환합니다.

실패

실패 시, responseCode가 정상 코드 (0000)가 아닌 다른 값으로 리턴됩니다. 상세 에러 내용은 response > error 오브젝트를 통해 확인할 수 있습니다.  

 

Example

Request
curl -v -X POST 'https://kic-connect.lgthinq.com/v2/users/push' \
-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": 200,
  "timestamp": "2020-08-25T05:46:35.922378"
}

 

사용자 푸시 구독 해지 (동기)

DELETE /v2/users/push

사용자의 디바이스 설정(추가/ 삭제/ 별명 수정)에 대한 푸시 구독을 해지합니다.  

요청

DELETE /v2/users/push 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

Common Header

Y - - - -

응답

응답 메시지에 대해서는 다음을 참조하십시오

성공 

성공 시, responseCode가 정상 코드 (0000)로 리턴됩니다. 응답 결과는 response 오브젝트를 통해 확인할 수 있습니다.

Property

Type

Description

response

object

비어있는 값을 반환합니다.

실패

실패 시, responseCode가 정상 코드 (0000)가 아닌 다른 값으로 리턴됩니다. 상세 에러 내용은 response > error 오브젝트를 통해 확인할 수 있습니다.  

 

Example

Request
curl -v -X DELETE 'https://kic-connect.lgthinq.com/v2/users/push' \
-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": 200,
  "timestamp": "2020-08-25T05:46:35.922378"
}

사용자 푸시 구독 관리 (비동기)

사용자 푸시 구독 (비동기)

POST /v2/users/push-async

사용자의 디바이스 설정(추가/ 삭제/ 별명 수정)에 대한 푸시를 구독합니다. 

이 API는 비동기 방식으로 동작합니다. 동작 방식은 API Call Sequence > 비동기 호출을 참조하시기 바랍니다. 

요청

POST /v2/users/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

Common Header

Y - - - -

응답

응답 메시지에 대해서는 다음을 참조하십시오

성공 

성공 시, responseCode가 정상 코드 (0000)로 리턴됩니다. 응답 결과는 response 오브젝트를 통해 확인할 수 있습니다.

Property

Type

Description

response

object

비어있는 값을 반환합니다.

실패

실패 시, responseCode가 정상 코드 (0000)가 아닌 다른 값으로 리턴됩니다. 상세 에러 내용은 response > error 오브젝트를 통해 확인할 수 있습니다.  

Callback

{
  "messageId": "6Wv3DMDsSWKvigZoxB90iw",
  "requestId": "eDBuBTfRySZVhwiZrqkWpp",
  "response": {
    "pushType": "USER_PUSH_SUBSCRIBED",
    "userNumber": {USER_NUMBER},
    "serviceId": {SERVICE_ID},
    "result": {}
  },
  "responseCode": "0000",
  "statusCode": 200,
  "timestamp": "2020-08-26T07:19:26.123128"
}

Property

Type

Description

pushType

string

USER_PUSH_SUBSCRIBED

userNumber

string

API를 호출한 사용자의 User Number

serviceId

string

서비스를 등록한 후에 발급되는 서비스 ID

result

object

비어있는 값을 반환합니다.

Example

Request
curl -v -X POST 'https://kic-connect.lgthinq.com/v2/users/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/users/push-async

사용자의 디바이스 설정(추가/ 삭제/ 별명 수정)에 대한 푸시 구독을 해지합니다.

이 API는 비동기 방식으로 동작합니다. 동작 방식은 API Call Sequence > 비동기 호출을 참조하시기바랍니다. 

요청

DELETE /v2/users/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

Common Header

Y - - - -

 

응답

응답 메시지에 대해서는 다음을 참조하십시오

성공 

성공 시, responseCode가 정상 코드 (0000)로 리턴됩니다. 응답 결과는 response 오브젝트를 통해 확인할 수 있습니다.

Property

Type

Description

response

object

비어있는 값을 반환합니다.

실패

실패 시, responseCode가 정상 코드 (0000)가 아닌 다른 값으로 리턴됩니다. 상세 에러 내용은 response > error 오브젝트를 통해 확인할 수 있습니다.  

 

Callback

{
  "messageId": "6Wv3DMDsSWKvigZoxB90iw",
  "requestId": "eDBuBTfRySZVhwiZrqkWpp",
  "response": {
    "pushType": "USER_PUSH_UNSUBSCRIBED",
    "userNumber": {USER_NUMBER},
    "serviceId": {SERVICE_ID},
    "result": {}
  },
  "responseCode": "0000",
  "statusCode": 200,
  "timestamp": "2020-08-26T07:19:26.123128"
}

Property

Type

Description

pushType

string

USER_PUSH_UNSUBSCRIBED

userNumber

string

API를 호출한 사용자의 User Number

serviceId

string

서비스를 등록한 후에 발급되는 서비스 ID

result

object

비어있는 값을 반환합니다.

Example

Request
curl -v -X DELETE 'https://kic-connect.lgthinq.com/v2/users/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"
}