PCC API
This API allows your service to subscribe/unsubscribe to PCC event notifications from the target device.
Overview
What is PCC?
PCC (Proactive Customer Care) is a service that analyzes any failures that home appliances experience through artificial intelligence (AI). LG PCC Platform analyzes the failure information of home appliances, determines the conditions and progress of the failures, and recommends instructions using AI. Partners can use LG PCC API to provide their service users with these preventive maintenance functions for their services.
Basic Concept
This figure briefly describes the structure of the PCC service.
LG PCC Platform transfers PCC elements to partner platforms using PCC API. PCC elements are essential elements that need to be transferred to partners’ service users in their services. They include short messages and full instructions for home appliances for which notifications related to failure diagnosis, appliance conditions, and maintenance are necessary.
- Short message: Diagnosis details for home appliances and link to check full instruction
- Full instruction: Instructions for diagnosis details (e.g., troubleshooting guide, maintenance guide)
PCC Logic Table
In PCC service, the condition (diagnosis details) of home appliances is called Logic. And a table that summarizes detailed descriptions of each logic and the PCC elements transmitted according to logic is called PCC Logic Table. We provide this table to our partners. For information on the PCC Logic Table, check the PCC API > PCC Logic Table page.
Supported Devices
Currently, PCC API supports four types of home appliances.
Washer |
Refrigerator |
Dish Washer |
Oven |
Basic Information
Pre-requisites
-
LG issues pre-defined EMP, which is LG membership service, accounts to B2B partner.
-
B2B partner installs LG appliances such as a wifi-enabled air conditioner with the LG ThinQ installer app.
-
The callback URL, on which PCC events are delivered, must be registered before integrating PCC APIs.
Method | Summary |
---|---|
POST {{baseUrl}}/pcc/{device-id} |
Subscribes PCC event notification from the target device. |
DELETE {{baseUrl}}/pcc/{device-id} |
Unsubscribes PCC event notification from the target device. |
GET {{baseUrl}}/pcc |
Gets a list of devices from which the user receives PCC event notifications. |
PCC Event Subscription
POST {{baseUrl}}/pcc/{device-id}
Description
A POST request to subscribe to PCC event notification from the target device.
GET {{baseUrl}}/pcc/{device-id}
If this method is successfully called, your service will subscribe to PCC event notifications from the device specified as device-id
. Refer to PCC Callback Contents for more details.
When a PCC event occurs, it is sent to the callback URL of your service. The callback URL must be registered before integrating PCC APIs.
Parameter
Header Parameters
Refer to Common Header.
Path Parameters
Name |
Type |
Required |
Description |
---|---|---|---|
device-id |
string |
mandatory |
The device ID issued by ThinQ Platform |
Body Parameters
N/A
Result
There are two results (Succeeded, Failed) for this method call.
Succeeded
If succeeded, it returns a null value.
Failed
If failed, it returns error codes and error messages defined in the Common Response.
Example of Request
curl -X POST \ https:{{baseUrl}}/pcc/{device-id} \ -H 'authorization: Bearer 3b565aa79ac4abaa37809a8b8350ad2cdfa3643bed579dd' \ -H 'cache-control: no-cache' \ -H 'content-type: application/json' \ -H 'postman-token: 913766de-e033-5c24-c150-13a7b98f7756' \ -H 'x-country-code: KR' \ -H 'x-message-id: 0123456789012345678912' \ -H 'x-service-id: 470ae4c534ba143cad86e5c3' \ -H 'x-service-key: NlWc2UAFvoiIYDw0SCJDoY5xVCNnUyUJeiI'
Example of Response
{ “messageId”: “c2d362a0-dd0f-11e6-a7c7-abfb76e3e664”, “timestamp”: “1284101485”, “response”: {} }
PCC Event Unsubscription
DELETE {{baseUrl}}/pcc/{device-id}
Description
A DELETE request to unsubscribe PCC event notification from the target device.
This method allows your service to cancel subscriptions to the PCC event notifications of the device.
DELETE {{baseUrl}}/pcc/{device-id}
If the method is successfully called, your service does not receive PCC events anymore from the device specified as device-id
.
PCC event notifications of that device cannot be received until a subscription has been requested again using POST /pcc/{device-id}
.
Parameter
Header Parameters
Refer to Common Header.
Path Parameters
Name |
Type |
Required |
Description |
---|---|---|---|
device-id |
string |
mandatory |
The device ID issued by ThinQ Platform |
Body Parameters
N/A
Result
There are two results (Succeeded, Failed) for this method call.
Succeeded
If succeeded, it returns a null value.
Failed
If failed, it returns error codes and error messages defined in the Common Response.
Example of Request
curl -X DELETE \ https:{{baseUrl}}/pcc/{device-id} \ -H 'authorization: Bearer 3b565aa79ac4abaa37809a8b8350ad2cdfa3643bed579dd' \ -H 'cache-control: no-cache' \ -H 'content-type: application/json' \ -H 'postman-token: 913766de-e033-5c24-c150-13a7b98f7756' \ -H 'x-country-code: KR' \ -H 'x-message-id: 0123456789012345678912' \ -H 'x-service-id: 470ae4c534ba143cad86e5c3' \ -H 'x-service-key: NlWc2UAFvoiIYDw0SCJDoY5xVCNnUyUJeiI'
Example of Response
{ “messageId”: “c2d362a0-dd0f-11e6-a7c7-abfb76e3e664”, “timestamp”: “1284101485”, “response”: {} }
Device List under Subscription
GET {{baseUrl}}/pcc
Description
A GET request to get a list of devices from which the user receives PCC event notifications.
-
You can add a device to this list by requesting the subscription with
POST /pcc/{device-id}
. -
You can delete a device from this list by requesting the unsubscription with
DELETE /pcc/{device-id}
.
GET {{baseUrl}}/pcc
If this method is successfully called, it returns the user’s device list subscribed to PCC event notifications.
Parameter
Header Parameters
Refer to Common Header.
Path Parameters
N/A
Body Parameters
N/A
Result
There are two results (Succeeded, Failed) for this method call.
Succeeded
If succeeded, the list of users' devices subscribed to Push notifications is returned. If there are no subscribed devices, a null value is returned.
Failed
If failed, it returns error codes and error messages defined in the Common Response.
Example of Request
curl -X GET \ https:{{baseUrl}}/pcc/ \ -H 'authorization: Bearer 3b565aa79ac4abaa37809a8b8350ad2cdfa3643bed579dd' \ -H 'cache-control: no-cache' \ -H 'content-type: application/json' \ -H 'postman-token: 913766de-e033-5c24-c150-13a7b98f7756' \ -H 'x-country-code: KR' \ -H 'x-message-id: 0123456789012345678912' \ -H 'x-service-id: 470ae4c534ba143cad86e5c3' \ -H 'x-service-key: NlWc2UAFvoiIYDw0SCJDoY5xVCNnUyUJeiI'
Example of Response
{ "messageId": "AFvLxlWNTbGN0kLLmYqUJQ", "timestamp": "2020-08-21T09:10:38.414928", "response": [ { "deviceId": "7121f083d9df33c29483843fe4181663508e36cd733db8b868269c11a2512a10" }, { "deviceId": "ff6389951a25dd411bfa5d86636c85909650514c35f55ef25a03c75d6d4dc6f9" } ] }
PCC Callback Contents
PCC event occurs non-periodically if PCC service on ThinQ Platform detects abnormal situations on ThinQ connected device.
Types of PCC events are categorized as follows:
-
Installation
-
Misuse
-
Malfunction
-
Maintenance
-
Part Inquiry
Supported device types and specific diagnosis logics (services) will be updated further.
Name |
Type |
Description |
|
---|---|---|---|
messageId |
string |
A value for tracking the information requested by LG ThinQ Platform. It is used to track the flow of a specific API and to find the cause of an error. |
|
timestamp |
string |
Refers to the time when the event is distributed. Follows the ISO 8601 format.
|
|
event |
object |
An object containing the followings: |
|
|
pushType |
enum |
Type of notification which is fixed to PCC_EVENT |
|
deviceId |
string |
An ID that can identify the device |
|
deviceType |
string |
Appliance type of the device. Refer to Common Data Type > Device Type. |
|
diagnosisType |
enum (string) |
It is the pre-defined type of diagnosis. It is used to identify a specific diagnosis. |
|
contentUrl |
string |
Content URL which gives guidelines how to resolve or fix the current issue.
|
|
diagnosisTimestamp |
string |
Time on which diagnosis is performed on ThinQ Platform. Follows the ISO 8601 format.
|