쿠팡 파트너스 API 가이드

파트너스 API

가이드

개요
쿠팡 파트너스 API 가이드 페이지에 오신 것을 환영합니다.
파트너스 API는 쿠팡 파트너스에서 제공하는 기능을 더 쉽고 유연하게 개발자가 사용 할 수 있도록 지원합니다. 이 문서의 취지는 파트너스 API를 사용하기 위해 필요한 정보를 개발자에게 전달하기 위함입니다.
시작하기
1. Access Key와 Secret Key 생성
파트너스 API는 최종 승인 된 쿠팡 파트너스 회원에게만 제공됩니다.
최종 승인 전 파트너스 API 사용이 필요하신 경우 AF ID와 함께 광고를 게재할 영역과 광고형태 에 대해 파트너스 메일로 보내주시면 검토 후 안내 드리겠습니다.
Access Key와 Secret Key는 쿠팡 파트너스 상단 메뉴바의 Tools -> 파트너스 API 에서 발급 받을 수 있습니다.


쿠팡 파트너스로 최종 승인된 회원은 생성 버튼 클릭과 함께 Access Key와 Secret Key가 곧바로 제공됩니다.


보안상의 문제로 Access Key와 Secret Key가 절대 노출되지 않도록 유의해 주시기 바랍니다. 만약 보안 키를 분실하거나 유출된 경우 쿠팡 파트너스에 직접 문의해 주시기 바랍니다.
2. HMAC 서명 생성 및 API 호출
HMAC은 해시 메시지 인증코드(Hash Message Authentication Code)의 준말로써 RFC2104 표준 암호화 프로토콜입니다. 파트너스 API는 HMAC기반으로 제작되었으며 모든 request header의 Authorization에 생성한 HMAC signature를 함께 보내주셔야 합니다. 아래는 HMAC signature 생성 및 API 호출 예시입니다.

JAVA

HmacGenerator.java
import org.apache.commons.codec.binary.Hex;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import java.nio.charset.Charset;
import java.security.GeneralSecurityException;
import java.text.SimpleDateFormat; import java.util.Date;
import java.util.TimeZone;
public final class HmacGenerator {
private static final String ALGORITHM = "HmacSHA256";
private static final Charset STANDARD_CHARSET = Charset.forName("UTF-8");
/** * Generate HMAC signature
* @param method
* @param uri http request uri
* @param secretKey secret key that Coupang partner granted for calling open api
* @param accessKey access key that Coupang partner granted for calling open api
* @return HMAC signature
*/

public static String generate(String method, String uri, String secretKey, String accessKey) {
String[] parts = uri.split("\\?");
if (parts.length > 2) {
throw new RuntimeException("incorrect uri format");
} else {
String path = parts[0];
String query = "";
if (parts.length == 2) {
query = parts[1];
}
SimpleDateFormat dateFormatGmt = new SimpleDateFormat("yyMMdd'T'HHmmss'Z'");
dateFormatGmt.setTimeZone(TimeZone.getTimeZone("GMT"));
String datetime = dateFormatGmt.format(new Date());
String message = datetime + method + path + query;
String signature;
try {
SecretKeySpec signingKey = new SecretKeySpec(secretKey.getBytes(STANDARD_CHARSET), ALGORITHM);
Mac mac = Mac.getInstance(ALGORITHM); mac.init(signingKey);
byte[] rawHmac = mac.doFinal(message.getBytes(STANDARD_CHARSET));
signature = Hex.encodeHexString(rawHmac);
} catch (GeneralSecurityException e) {
throw new IllegalArgumentException("Unexpected error while creating hash: " + e.getMessage(), e);
}

return String.format("CEA algorithm=%s, access-key=%s, signed-date=%s, signature=%s", "HmacSHA256", accessKey, datetime, signature);
}
}
}

HTTP 신호를 보내기 전에 Authorization 헤더를 이용하여 HMAC signature를 설정해야합니다.

OpenApiTestApplication.java
import org.apache.http.entity.StringEntity;
import org.apache.http.util.EntityUtils;
import org.apache.http.HttpHost;
import org.apache.http.HttpRequest;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.RequestBuilder;
import org.apache.http.impl.client.HttpClientBuilder;
import java.io.IOException;

ublic final class OpenApiTestApplication {
private final static String REQUEST_METHOD = "POST";
private final static String DOMAIN = "https://api-gateway.coupang.com";
private final static String URL = "/v2/providers/affiliate_open_api/apis/openapi/deeplink"; // Replace with your own ACCESS_KEY and SECRET_KEY
private final static String ACCESS_KEY = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
private final static String SECRET_KEY = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
private final static String REQUEST_JSON = "{\"coupangUrls\": [\"https://www.coupang.com/np/search?component=&q=good&channel=user\",\"https://www.coupang.com/np/coupangglobal\"]}";

public static void main(String[] args) throws IOException {
// Generate HMAC string
String authorization = HmacGenerator.generate(REQUEST_METHOD, URL, SECRET_KEY, ACCESS_KEY);
// Send request
StringEntity entity = new StringEntity(REQUEST_JSON, "UTF-8");
entity.setContentEncoding("UTF-8");
entity.setContentType("application/json");
org.apache.http.HttpHost host = org.apache.http.HttpHost.create(DOMAIN);
org.apache.http.HttpRequest request = org.apache.http.client.methods.RequestBuilder
.post(URL).setEntity(entity)
.addHeader("Authorization", authorization)
.build();

org.apache.http.HttpResponse httpResponse = org.apache.http.impl.client.HttpClientBuilder.create().build().execute(host, request);
// verify System.out.println(EntityUtils.toString(httpResponse.getEntity()));
}
}

정상적으로 작동되었다면 콘솔에서 아래 결과를 확인 할 수 있습니다.
{
"rCode": "0",
"rMessage": "",
"data": [
{ "originalUrl": "https://www.coupang.com/np/search?component=&q=good&channel=user",
"shortenUrl": "https://coupa.ng/bgQjht"
},
{
"originalUrl": "https://www.coupang.com/np/coupangglobal",
"shortenUrl": "https://coupa.ng/bgQjjb"
}
]
}

파트너스 API 사용
이제 파트너스 API를 사용할 준비가 되었습니다. 각 API에 대한 문서와 세부 사항은 파트너스 API 가이드에서 문서 탭을 확인해 주시기 바랍니다.

자주 발생하는 문제
API 사용이 처음이라면 인증과 관련한 아래와 같은 문제가 발생 할 수 있습니다.
Unknown error occurred
Access Key가 잘못 입력되었을 때 아래와 같은 메시지가 출력됩니다.
{
"code": "ERROR",
"message": "Unknown error occurred, please contact api-gateway channel for the details.",
"transactionId": "f57c356c-e3f5-4b71-b45f-3db19f6b092b"
}

Invalid signature
Secret Key가 잘못 입력되었을 때 아래와 같은 메시지가 출력됩니다.
{
"code": "ERROR", "message":
"Invalid signature.",
"transactionId": "78dcba12-7e64-400a-8f1d-0c185a1f3ce1"
}

Request is not authorized
Authorization 헤더가 없거나 잘못된 값을 설정했을 때 아래와 같은 메시지가 출력됩니다.
{
"code": "ERROR",
"message": "Request is not authorized.",
"transactionId": "9fa11d4c-bcbd-4702-a994-b699f5968d8a",
"messages": {
"korean": "미인증된 요청은 허용되지 않습니다. 클라이언트의 정보가 정상적으로 설정되어 있는지 확인 부탁드립니다. (CMDB, 컨수머 토큰 또는 HMAC)",
"english": "Unauthorized request is denied. Check if the client's credential meets the requirements (CMDB, consumer token or HMAC)."
}
}

HMAC signature is expired
HMAC signature가 만료 되었을 때 아래와 같은 메시지가 출력됩니다. HMAC signature를 다시 생성해야 합니다.
{
"code": "ERROR",
"message": "Specified signature is expired.",
"transactionId": "2d2ccd2b-2e3f-480b-966d-e9ceedaaa91f"
}

HMAC format is invalid
HMAC signature의 포맷이 올바르지 않을 때 아래와 같은 메시지가 출력됩니다. 위 예시를 사용하여 HMAC signature를 생성하십시오.
{
"code": "ERROR",
"message": "HMAC format is invalid.",
"transactionId": "b806c1f1-1b6c-4ca6-9040-0418f695a315"
}

Python

import hmac
import hashlib
import binascii
import os
import time
import requests
import json
REQUEST_METHOD = "POST"
DOMAIN = "https://api-gateway.coupang.com"
URL = "/v2/providers/affiliate_open_api/apis/openapi/v1/deeplink"
# Replace with your own ACCESS_KEY and SECRET_KEY
ACCESS_KEY = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
SECRET_KEY = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
REQUEST = { "coupangUrls": [
"https://www.coupang.com/np/search?component=&q=good&channel=user", "https://www.coupang.com/np/coupangglobal"
]}

def generateHmac(method, url, secretKey, accessKey):
path, *query = url.split("?")
os.environ["TZ"] = "GMT+0"
datetime = time.strftime('%y%m%d')+'T'+time.strftime('%H%M%S')+'Z'
message = datetime + method + path + (query[0] if query else "")
signature = hmac.new(bytes(secretKey, "utf-8"),
message.encode("utf-8"),
hashlib.sha256).hexdigest()
return "CEA algorithm=HmacSHA256, access-key={}, signed-date={}, signature={}".format(accessKey, datetime, signature)
authorization = generateHmac(REQUEST_METHOD, URL, SECRET_KEY, ACCESS_KEY)
url = "{}{}".format(DOMAIN, URL)
resposne = requests.request(method=REQUEST_METHOD, url=url,
headers={
"Authorization": authorization,
"Content-Type": "application/json"
},
data=json.dumps(REQUEST)
)
print(resposne.json())

정상적으로 작동되었다면 콘솔에서 아래 결과를 확인 할 수 있습니다.
{
"rCode": "0",
"rMessage": "",
"data": [
{
"originalUrl": "https://www.coupang.com/np/search?component=&q=good&channel=user",
"shortenUrl": "https://coupa.ng/bgQjht"
},
{
"originalUrl": "https://www.coupang.com/np/coupangglobal",
"shortenUrl": "https://coupa.ng/bgQjjb"
}
]
}

파트너스 API 사용
이제 파트너스 API를 사용할 준비가 되었습니다. 각 API에 대한 문서와 세부 사항은 파트너스 API 가이드에서 문서 탭을 확인해 주시기 바랍니다.
자주 발생하는 문제
API 사용이 처음이라면 인증과 관련한 아래와 같은 문제가 발생 할 수 있습니다.
Unknown error occurred
Access Key가 잘못 입력되었을 때 아래와 같은 메시지가 출력됩니다.
{
"code": "ERROR",
"message":
"Unknown error occurred, please contact api-gateway channel for the details.", "transactionId": "f57c356c-e3f5-4b71-b45f-3db19f6b092b"
}

Invalid signature
Secret Key가 잘못 입력되었을 때 아래와 같은 메시지가 출력됩니다.
{
"code": "ERROR",
"message": "Invalid signature.",
"transactionId": "78dcba12-7e64-400a-8f1d-0c185a1f3ce1"
}

Request is not authorized
Authorization 헤더가 없거나 잘못된 값을 설정했을 때 아래와 같은 메시지가 출력됩니다.
{
"code": "ERROR",
"message": "Request is not authorized.",
"transactionId": "9fa11d4c-bcbd-4702-a994-b699f5968d8a",
"messages": {
"korean": "미인증된 요청은 허용되지 않습니다. 클라이언트의 정보가 정상적으로 설정되어 있는지 확인 부탁드립니다. (CMDB, 컨수머 토큰 또는 HMAC)",
"english": "Unauthorized request is denied. Check if the client's credential meets the requirements (CMDB, consumer token or HMAC)."
}
}

HMAC signature is expired
HMAC signature가 만료 되었을 때 아래와 같은 메시지가 출력됩니다. HMAC signature를 다시 생성해야 합니다.
{
"code": "ERROR", "message":
"Specified signature is expired.",
"transactionId": "2d2ccd2b-2e3f-480b-966d-e9ceedaaa91f"
}

HMAC format is invalid
HMAC signature의 포맷이 올바르지 않을 때 아래와 같은 메시지가 출력됩니다. 위 예시를 사용하여 HMAC signature를 생성하십시오.
{
"code": "ERROR", "message":
"HMAC format is invalid.",
"transactionId": "b806c1f1-1b6c-4ca6-9040-0418f695a315"
}

PHP



<?php
date_default_timezone_set("GMT+0");
$datetime = date("ymd").'T'.date("His").'Z';
$method = "POST";
$path = "/v2/providers/affiliate_open_api/apis/openapi/v1/deeplink";
$message = $datetime.$method.str_replace("?", "", $path);
// Replace with your own ACCESS_KEY and SECRET_KEY
$ACCESS_KEY = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
$SECRET_KEY = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
$algorithm = "HmacSHA256";
$signature = hash_hmac('sha256', $message, $SECRET_KEY);
print($message."\n".$SECRET_KEY."\n".$signature."\n");
$authorization = "CEA algorithm=HmacSHA256, access-key=".$ACCESS_KEY.", signed-date=".$datetime.", signature=".$signature;
$url = 'https://api-gateway.coupang.com'.$path;
$strjson='
{
"coupangUrls": [
"https://www.coupang.com/np/search?component=&q=good&channel=user",
"https://www.coupang.com/np/coupangglobal"
]
}
';
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($curl, CURLOPT_HTTPHEADER, array("Content-Type: application/json;charset=UTF-8", "Authorization:".$authorization));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $strjson);
$result = curl_exec($curl);
$httpcode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
echo($httpcode);
echo($result);
?>

정상적으로 작동되었다면 콘솔에서 아래 결과를 확인 할 수 있습니다.
{
"rCode": "0",
"rMessage": "",
"data": [
{
"originalUrl": "https://www.coupang.com/np/search?component=&q=good&channel=user",
"shortenUrl": "https://coupa.ng/bgQjht"
},
{
"originalUrl": "https://www.coupang.com/np/coupangglobal",
"shortenUrl": "https://coupa.ng/bgQjjb"
}
]
}

파트너스 API 사용
이제 파트너스 API를 사용할 준비가 되었습니다. 각 API에 대한 문서와 세부 사항은 파트너스 API 가이드에서 문서 탭을 확인해 주시기 바랍니다.
자주 발생하는 문제
API 사용이 처음이라면 인증과 관련한 아래와 같은 문제가 발생 할 수 있습니다.
Unknown error occurred
Access Key가 잘못 입력되었을 때 아래와 같은 메시지가 출력됩니다.
{
"code": "ERROR",
"message": "Unknown error occurred, please contact api-gateway channel for the details.",
"transactionId": "f57c356c-e3f5-4b71-b45f-3db19f6b092b"
}

Invalid signature
Secret Key가 잘못 입력되었을 때 아래와 같은 메시지가 출력됩니다.
{
"code": "ERROR",
"message": "Invalid signature.",
"transactionId": "78dcba12-7e64-400a-8f1d-0c185a1f3ce1"
}

Request is not authorized
Authorization 헤더가 없거나 잘못된 값을 설정했을 때 아래와 같은 메시지가 출력됩니다.
{
"code": "ERROR",
"message": "Request is not authorized.",
"transactionId": "9fa11d4c-bcbd-4702-a994-b699f5968d8a",
"messages": {
"korean": "미인증된 요청은 허용되지 않습니다. 클라이언트의 정보가 정상적으로 설정되어 있는지 확인 부탁드립니다. (CMDB, 컨수머 토큰 또는 HMAC)",
"english": "Unauthorized request is denied. Check if the client's credential meets the requirements (CMDB, consumer token or HMAC)."
}
}

HMAC signature is expired
HMAC signature가 만료 되었을 때 아래와 같은 메시지가 출력됩니다. HMAC signature를 다시 생성해야 합니다.
{
"code": "ERROR",
"message": "Specified signature is expired.",
"transactionId": "2d2ccd2b-2e3f-480b-966d-e9ceedaaa91f"
}

HMAC format is invalid
HMAC signature의 포맷이 올바르지 않을 때 아래와 같은 메시지가 출력됩니다. 위 예시를 사용하여 HMAC signature를 생성하십시오.
{
"code": "ERROR",
"message": "HMAC format is invalid.",
"transactionId": "b806c1f1-1b6c-4ca6-9040-0418f695a315"
}

C#


HmacGenerator.cs
using System;
using System.Text;
using System.Security.Cryptography;
namespace OpenApi.Affiliate.Coupang
{
public static class HmacGenerator
{
public static String GenerateHmac(String method, String url, String accessKey, String secretKey)
{
var dateTimeStamp = DateTime.Now.ToUniversalTime().ToString("yyMMddTHHmmssZ");
var message = String.Format("{0}{1}{2}", dateTimeStamp, method, url.Replace("?", String.Empty));
var keyBytes = ASCIIEncoding.Default.GetBytes(secretKey);
var messageBytes = ASCIIEncoding.Default.GetBytes(message);
var hashBytes = default(Byte[]);
using (var hash = new HMACSHA256(keyBytes))
{
hashBytes = hash.ComputeHash(messageBytes);
}
var signature = BitConverter.ToString(hashBytes).Replace("-", String.Empty).ToLower();
return String.Format("CEA algorithm=HmacSHA256, access-key={0}, signed-date={1}, signature={2}", accessKey, dateTimeStamp, signature);
}
}
}

HTTP 신호를 보내기 전에 Authorization 헤더를 이용하여 HMAC signature를 설정해야합니다.
Program.cs
using System;
using System.Text;
using System.Net;
using System.IO;
namespace OpenApi.Affiliate.Coupang
{
class Program
{
private static readonly String REQUEST_METHOD = "POST";
private static readonly String DOMAIN = "https://api-gateway.coupang.com";
private static readonly String URL = "/v2/providers/affiliate_open_api/apis/openapi/deeplink";
// Replace with your own ACCESS_KEY and SECRET_KEY
private static readonly String ACCESS_KEY = "**";
private static readonly String SECRET_KEY = "**";
private static readonly String REQUEST_JSON = @"{
""coupangUrls"": [
""https://www.coupang.com/np/search?component=&q=good&channel=user"",
""https://www.coupang.com/np/coupangglobal""
]
}";

static void Main(string[] args)
{
var signature = HmacGenerator.GenerateHmac(REQUEST_METHOD, URL, ACCESS_KEY, SECRET_KEY);
var postBytes = UTF8Encoding.Default.GetBytes(REQUEST_JSON);
var apiUrl = String.Format("{0}{1}", DOMAIN, URL);
var request = HttpWebRequest.Create(apiUrl);
request.Method = REQUEST_METHOD;
request.ContentType = "application/json";
request.Headers.Add("Authorization", signature);
request.ContentLength = postBytes.Length;

try
{
using (var requestStream = request.GetRequestStream())
{
requestStream.Write(postBytes, 0, postBytes.Length);
}
using (var response = request.GetResponse() as HttpWebResponse)
{
using (var responseStream = response.GetResponseStream())
{
var reader = new StreamReader(responseStream);
var respText = reader.ReadToEnd();
Console.WriteLine(respText);
}
}
}
catch (Exception ex)
{
Console.Error.WriteLine(ex.Message);
}
}
}
}

정상적으로 작동되었다면 콘솔에서 아래 결과를 확인 할 수 있습니다.
{
"rCode": "0",
"rMessage": "",
"data": [
{
"originalUrl": "https://www.coupang.com/np/search?component=&q=good&channel=user",
"shortenUrl": "https://coupa.ng/bgQjht"
},
{
"originalUrl": "https://www.coupang.com/np/coupangglobal",
"shortenUrl": "https://coupa.ng/bgQjjb"
}
]
}

파트너스 API 사용
이제 파트너스 API를 사용할 준비가 되었습니다. 각 API에 대한 문서와 세부 사항은 파트너스 API 가이드에서 문서 탭을 확인해 주시기 바랍니다.
자주 발생하는 문제
API 사용이 처음이라면 인증과 관련한 아래와 같은 문제가 발생 할 수 있습니다.
Unknown error occurred
Access Key가 잘못 입력되었을 때 아래와 같은 메시지가 출력됩니다.
{
"code": "ERROR",
"message": "Unknown error occurred, please contact api-gateway channel for the details.",
"transactionId": "f57c356c-e3f5-4b71-b45f-3db19f6b092b"
}

Invalid signature
Secret Key가 잘못 입력되었을 때 아래와 같은 메시지가 출력됩니다.
{
"code": "ERROR",
"message": "Invalid signature.",
"transactionId": "78dcba12-7e64-400a-8f1d-0c185a1f3ce1"
}

Request is not authorized
Authorization 헤더가 없거나 잘못된 값을 설정했을 때 아래와 같은 메시지가 출력됩니다.
{
"code": "ERROR",
"message": "Request is not authorized.",
"transactionId": "9fa11d4c-bcbd-4702-a994-b699f5968d8a",
"messages": {
"korean": "미인증된 요청은 허용되지 않습니다. 클라이언트의 정보가 정상적으로 설정되어 있는지 확인 부탁드립니다. (CMDB, 컨수머 토큰 또는 HMAC)",
"english": "Unauthorized request is denied. Check if the client's credential meets the requirements (CMDB, consumer token or HMAC)."
}
}

HMAC signature is expired
HMAC signature가 만료 되었을 때 아래와 같은 메시지가 출력됩니다. HMAC signature를 다시 생성해야 합니다.
{
"code": "ERROR",
"message": "Specified signature is expired.",
"transactionId": "2d2ccd2b-2e3f-480b-966d-e9ceedaaa91f"
}

HMAC format is invalid
HMAC signature의 포맷이 올바르지 않을 때 아래와 같은 메시지가 출력됩니다. 위 예시를 사용하여 HMAC signature를 생성하십시오.
{
"code": "ERROR",
"message": "HMAC format is invalid.",
"transactionId": "b806c1f1-1b6c-4ca6-9040-0418f695a315"
}

Node.js

hmacGenerator.js
const crypto = require('crypto');
const moment = require('moment');
module.exports = {
generateHmac: (method, url, secretKey, accessKey) => {
const parts = url.split(/\?/);
const [path, query = ''] = parts;
const datetime = moment.utc().format('YYMMDD[T]HHmmss[Z]');
const message = datetime + method + path + query;
const signature = crypto.createHmac('sha256', secretKey)
.update(message)
.digest('hex');
return `CEA algorithm=HmacSHA256, access-key=${accessKey}, signed-date=${datetime}, signature=${signature}`;
}
};

HTTP 신호를 보내기 전에 Authorization 헤더를 이용하여 HMAC signature를 설정해야합니다.
app.js
const axios = require('axios');
const { generateHmac } = require('./hmacGenerator');
const REQUEST_METHOD = "POST";
const DOMAIN = "https://api-gateway.coupang.com";
const URL = "/v2/providers/affiliate_open_api/apis/openapi/v1/deeplink";
// Replace with your own ACCESS_KEY and SECRET_KEY
const ACCESS_KEY = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
const SECRET_KEY = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
const REQUEST = { "coupangUrls": [
"https://www.coupang.com/np/search?component=&q=good&channel=user",
"https://www.coupang.com/np/coupangglobal"
]};

(async () => {
const authorization = generateHmac(REQUEST_METHOD, URL, SECRET_KEY, ACCESS_KEY);
axios.defaults.baseURL = DOMAIN;
try {
const response = await axios.request({
method: REQUEST_METHOD,
url: URL,
headers: { Authorization: authorization },
data: REQUEST
});
console.log(response.data);
} catch (err) {
console.error(err.response.data);
}
})();

정상적으로 작동되었다면 콘솔에서 아래 결과를 확인 할 수 있습니다.
{
"rCode": "0",
"rMessage": "",
"data": [
{
"originalUrl": "https://www.coupang.com/np/search?component=&q=good&channel=user",
"shortenUrl": "https://coupa.ng/bgQjht"
},
{
"originalUrl": "https://www.coupang.com/np/coupangglobal",
"shortenUrl": "https://coupa.ng/bgQjjb"
}
]
}

파트너스 API 사용
이제 파트너스 API를 사용할 준비가 되었습니다. 각 API에 대한 문서와 세부 사항은 파트너스 API 가이드에서 문서 탭을 확인해 주시기 바랍니다.
자주 발생하는 문제
API 사용이 처음이라면 인증과 관련한 아래와 같은 문제가 발생 할 수 있습니다.
Unknown error occurred
Access Key가 잘못 입력되었을 때 아래와 같은 메시지가 출력됩니다.
{
"code": "ERROR",
"message": "Unknown error occurred, please contact api-gateway channel for the details.",
"transactionId": "f57c356c-e3f5-4b71-b45f-3db19f6b092b"
}

Invalid signature
Secret Key가 잘못 입력되었을 때 아래와 같은 메시지가 출력됩니다.
{
"code": "ERROR",
"message": "Invalid signature.",
"transactionId": "78dcba12-7e64-400a-8f1d-0c185a1f3ce1"
}

Request is not authorized
Authorization 헤더가 없거나 잘못된 값을 설정했을 때 아래와 같은 메시지가 출력됩니다.
{
"code": "ERROR",
"message": "Request is not authorized.",
"transactionId": "9fa11d4c-bcbd-4702-a994-b699f5968d8a",
"messages": {
"korean": "미인증된 요청은 허용되지 않습니다. 클라이언트의 정보가 정상적으로 설정되어 있는지 확인 부탁드립니다. (CMDB, 컨수머 토큰 또는 HMAC)",
"english": "Unauthorized request is denied. Check if the client's credential meets the requirements (CMDB, consumer token or HMAC)."
}
}

HMAC signature is expired
HMAC signature가 만료 되었을 때 아래와 같은 메시지가 출력됩니다. HMAC signature를 다시 생성해야 합니다.
{
"code": "ERROR",
"message": "Specified signature is expired.",
"transactionId": "2d2ccd2b-2e3f-480b-966d-e9ceedaaa91f"
}

HMAC format is invalid
HMAC signature의 포맷이 올바르지 않을 때 아래와 같은 메시지가 출력됩니다. 위 예시를 사용하여 HMAC signature를 생성하십시오.
{
"code": "ERROR",
"message": "HMAC format is invalid.",
"transactionId": "b806c1f1-1b6c-4ca6-9040-0418f695a315"
}

'*공지사항-알림' 카테고리의 다른 글
쿠팡 파트너스 회원가입 방법 (0) | 2020.11.19 |
---|---|
Coupang Partners - 다이나믹 배너 (0) | 2020.11.18 |
쿠팡 마케팅 제휴 프로그램 운영정책 (0) | 2020.11.18 |
쿠팡 마케팅 제휴 프로그램 이용약관 (0) | 2020.11.18 |