For the complete documentation index, see llms.txt. This page is also available as Markdown.

Customer Information Integration

This feature allows you to view information from an external service (not Contiple) within the ticket management system by configuring the API settings.


➊ API Authentication Method

1-1. Security Key

  • Configure the API encryption settings in [Customer Info Management] → [Customer Info. Contact] → [API Settings].

  • An Security key is automatically generated and can be used for API authentication.

1-2. Authorization String Generation

다음2가지 방법으로 문자열을 생성할 수 있습니다.

① HmacSHA256로 암호화

② (request URI + 파라미터 값(json) + 현재 UTC시간 값)문자열에 대해 암호화

  • Java 예시

String token= request.getHeader("Authorization");
String time = request.getHeader("X-TC-Timestamp");
if (!StringUtils.isNumeric(time)) {
    logger.error("X-TC-Timestamp is not numeric: " + time);
    throw new Exception("error.bad_request");
}
DateTime date = null;
date = new DateTime(Long.parseLong(time));
if (date.minusMinutes(5).isAfterNow() || date.plusMinutes(5).isBeforeNow()) {
    logger.error("X-TC-Timestamp is expired: " + time + ", now timestamp: " + Calendar.getInstance().getTimeInMillis());
    throw new Exception("error.bad_request");
}

String apiKey = "bf7769e5321448de88838cdb";
String content= new String(IOUtils.toByteArray(request.getInputStream()), StandardCharsets.UTF_8) + time;

SecretKeySpec signingKey = new SecretKeySpec(apiKey.getBytes(StandardCharsets.UTF_8), "HmacSHA256");
Mac mac = Mac.getInstance(signingKey.getAlgorithm());
mac.init(signingKey);
byte[] rawHmac = mac.doFinal(content.getBytes(StandardCharsets.UTF_8));
String localAuthorization = new String(Base64.encodeBase64(rawHmac));
logger.debug("Local token: " + localAuthorization);
if (StringUtils.equals(token, localAuthorization)) {
    return true;
}  else {
        logger.info("Local sha2 token: " + localAuthorization);
        return false;
    }
}


➋ Customer Information Integration API

(1) Interface Description

Interface Name
Protocol
Request Format
Encoding
Response Format
URL
Access Required

Customer Information Integration API

HTTPS

POST

UTF-8

JSON

Default URL

Common Authentication


(2) Request parameter

Name
Field (Parameter)
Type
Required
Description

Configured Query Fields

callNum

String

O

nation

String


(3) Request body


(4) Response data

Name
Field (Parameter)
Type
Required
Description

Configured Result Fields

userName

String

id

String


(5) Response Body


➌ Return Result

(1) Parameter Definition

Name
Field (Parameter)
Type
Required
Description

Return Result on Success

data

JSON

O

Returns the configured result values defined in Contiple(OC).

String

O

Name
Field (Parameter)
Type
Required
Description

Return Result on Failure

error

JSON

O

code

String

O

message

String

O

detail

String

O


(2) HTTP Status code

Return Code
Contiple(OC) Message

200 : SUCCESS

Request successful

400 : Bad Request

No data found

403 : Forbidden

Access to the requested resource is denied

404 : Not Data Found

An error occurred on the server

500 : Server Error

Invalid request or error occurred


(3) Response Example

Last updated