Users

Create / Update User

Creates new users or updates user information.

Endpoint

POST {{baseUrl}}/users

 

Request

Path Parameter

N/A

 

Request Header

You should enter the following information in the request header in JSON format.

 

Request Header (Common Header) Information

Name

Type

Required

Description

x-service-id

string

mandatory

The Service ID value which used to identify the owner of the request

x-service-token

string

mandatory

The Service Token value to ensure that the request is valid. It is issued before service integration.

x-message-id

string

optional

The value for tracing the processing of target requests

x-country-code

string

mandatory

The country code to provide the service. The ISO country code is used. (E.g. KR, US, TW, CN, ......)

 

Request Body

You should enter the following information in the request body in JSON format.

 

Request Body Information

Key

Type

Required

Description

id

string

mandatory

A user-specific identification value, which is the user's unique ID registered in the LG EMP service.

You can get this value using the Get Profile API provided by LG EMP service.

This information should not contain personal information or provide clues to track that user.

resourceID

string

mandatory

The uniquely identifiable resource ID, which is registered to LG DR service.

userNo

string

mandatory

A user-specific identification value, which is the user's unique User Number registered in the LG EMP service.

You can get this value using the Get Profile API provided by LG EMP service.

This information should not contain personal information or provide clues to track that user.

accessToken

string

mandatory

The access_token issued by LG EMP service

refreshToken

string

mandatory

The refresh_token issued by LG EMP service

insertTs

number

optional

Timestamp at the time the request was called (10 digits)

 

Request Example 

$ curl '{{baseUrl}}/users' -i -X POST
    -H 'Accept: application/json'
    -H 'x-message-id: message-id'
    -H 'x-service-id: 3rd-party-service-id'
    -H 'x-service-token: 3rd-party-service-token'
    -H 'x-country-code: us'
    -d '{"id": "user1234",
        "resourceID":"lgeDR-CE-TV",
        "userNo":"12345UR",
        "accessToken": "abcd123456",
        "refreshToken": "qaz2wsx345",
        "insertTs": 1234566000
    }'

 

Response

Response Body

In response to the request, the following information is returned in the JSON format in the response body.

 

Response Body Information

Key

Value

code

Result code for the request

For a description of the code values, please refer to the Common Response page.

data

Result data corresponding to the result code

 

id

A user-specific identification value, which is the user's unique ID registered in the LG EMP service.

 

Response Example

{
    "code": 2000,
    "data": { 
        "id": "user1234"
    }
}

 

Delete User

Deletes a specific user.

Endpoint

DELETE {{baseUrl}}/users/{user-id}

 

Request

Path Parameter

Enters the user-id to deliver the user identification value.

 

Parameter Information

Name

Type

Required

Description

user-id

string

mandatory

User identification value, which is the user ID registered in LG EMP service

You can get this value using the Get Profile API provided by LG EMP service. 

 

Request Header

You should enter the following information in the request header in JSON format.

 

Request Header (Common Header) Information

Name

Type

Required

Description

x-service-id

string

mandatory

The Service ID value which used to identify the owner of the request

x-service-token

string

mandatory

The Service Token value to ensure that the request is valid. It is issued before service integration.

x-message-id

string

optional

The value for tracing the processing of target requests

x-country-code

string

mandatory

The country code to provide the service. The ISO country code is used. (E.g. KR, US, TW, CN, ......)

 

Request Body

N/A

 

Request Example

$ curl '{{baseUrl}}/users/{user-id}' -i -X DELETE
    -H 'Accept: application/json'
    -H 'x-message-id: message-id'
    -H 'x-service-id: 3rd-party-service-id'
    -H 'x-service-token: 3rd-party-service-token'
    -H 'x-country-code: us'

 

Response

Response Body

In response to the request, the following information is returned in the JSON format in the response body.

 

Response Body Information

Key

Value

code

Result code for the request

For a description of the code values, please refer to the Common Response page.

data

Result data corresponding to the result code

 

id

User identification value, which is the user ID registered in LG EMP service

 

Response Example

{
    "code": 2000,
    "data": { 
        "id": "user1234"
    }
}

 

Get User

Checks a specific user or a user registered under a specific resource.

Endpoint

GET {{baseUrl}}/users/{user-id} or {resource-id}

 

Request

Path Parameter

Enters the user-id or resource-id to check.

 

Parameter Information

Name

Type

Required

Description

user-id

or

resource-id

string

mandatory

user-id: The user identification value, which is the user ID registered in LG EMP service. You can get this value using the Get Profile API provided by the LG EMP service. 

resource-id: The uniquely identifiable resource ID, which is registered to LG DR service. You can get this value using the Get Resource API.

 

Request Header

You should enter the following information in the request header in JSON format.

 

Request Header (Common Header) Information

Name

Type

Required

Description

x-service-id

string

mandatory

The Service ID value which used to identify the owner of the request

x-service-token

string

mandatory

The Service Token value to ensure that the request is valid. It is issued before service integration.

x-message-id

string

optional

The value for tracing the processing of target requests

x-country-code

string

mandatory

The country code to provide the service. The ISO country code is used. (E.g. KR, US, TW, CN, ......)

 

Request Body

N/A

 

Request Example

$ curl '{{baseUrl}}/users/{user-id}' -i -X GET
    -H 'Accept: application/json'
    -H 'x-message-id: message-id'
    -H 'x-service-id: 3rd-party-service-id'
    -H 'x-service-token: 3rd-party-service-token'
    -H 'x-country-code: us'

 

Response

Response Body

In response to the request, the following information is returned in the JSON format in the response body.

 

Response Body Informaition

Key

Value

code

Result code for the request

For a description of the code values, please refer to the Common Response page.

data

Result data corresponding to the result code

 

id

The user ID

 

resourceID

The uniquely identifiable resource ID, which is registered to LG DR service.

 

userNo

The user number

 

insertTs

The registered time (10 digits) 

 

Response Example

{
    "code": 2000,
    "data": [
        {
            "id": "testMail@email.com",
            "resourceID":"CE-TV",
            "userNo": "LGAO723A02",
            "insertTs": "1234567890"
        }
    ]
}