API Test/POSTMAN2025. 1. 30. 09:41
pm.test("Status code is 400", function () {
    pm.response.to.have.status(400);
});

pm.test("Error message is '업체상품아이디는 숫자형으로 입력해주세요.'", function () {
    var jsonData = pm.response.json();
    pm.expect(jsonData.message).to.include("업체상품아이디는 숫자형으로 입력해주세요.");
});

쿠팡 상품조회 API 테스트 케이스를 만들어 볼까요?

 

등록상품 ID(sellerProductId)로 등록된 상품의 정보를 조회합니다.
상품 가격/재고/판매상태 수정 시 필요한 옵션ID(vendorItemId)를 확인할 수 있습니다. 
또한, 상품 정보를 조회하여 상품 수정 시 활용할 수 있는 전문을 얻을 수 있습니다.
 

Path

GET

/v2/providers/seller_api/apis/api/v1/marketplace/seller-products/{sellerProductId}

Example Endpoint

https://api-gateway.coupang.com/v2/providers/seller_api/apis/api/v1/marketplace/seller-products/{sellerProductId}

Request Parameters

Path Segment Parameter

NameRequiredTypeDescription
sellerProductId O Number
등록상품ID
상품 생성 시, 결과 값으로 획득한 ID

Request Example

not require body

Response Message

NameTypeDescription
code String
결과코드
SUCCES/ERROR
message String
 
data  
 
  sellerProductId Number
등록상품ID
  statusName String
등록상품상태
심사중/ 임시저장/ 승인대기중/ 승인완료/ 부분승인완료/ 승인반려/ 상품삭제
  displayCategoryCode Number
노출카테고리코드
카테고리 목록 조회 API 또는 카테고리 정보 excel을 다운받아 노출카테고리코드 확인 가능
  sellerProductName String
등록상품명
발주서에 사용되는 상품명
  vendorId String
판매자ID
쿠팡에서 업체에게 발급한 고유 코드
  saleStartedAt String
판매시작일시
"yyyy-MM-dd'T'HH:mm:ss" 형식
  saleEndedAt String
판매종료일시
"yyyy-MM-dd'T'HH:mm:ss" 형식, *2099년 까지 길게 선택 가능
  displayProductName String
노출상품명
실제 쿠팡 판매페이지에서 노출될 상품명이나 실제 노출 시 변경될 수 있으며 브랜드, 제품명, 상품군의 변경에 의해 변경됩니다.
  brand String
브랜드
브랜드명은 한글/영어 표준이름 입력
  generalProductName String
제품명
구매옵션[Attribute exposed] 정보(사이즈, 색상 등)를 포함하지 않는 상품명. 모델명 추가 기입 가능
  productGroup String
상품군
상품의 그룹으로 노출카테고리의 최하위명을 참고하여 입력.
제품명[generalProductName]과 중복될 경우, 입력 불필요
  deliveryMethod String
배송방법
 
  deliveryCompanyCode String
택배사 코드
  deliveryChargeType String
배송비종류

● 무료배송 설정 시
초도반품배송비(편도)[deliveryChargeOnReturn]와, 반품배송비(편도)[returnCharge] 금액 설정
● 유료배송 설정 시
기본배송비[deliveryCharge]와 반품배송비(편도) 금액 설정
● 조건부 무료배송 설정 시
기본배송비와 반품배송비(편도) 금액 설정
● 착불배송 설정 시
착불배송 가능 카테고리는 따로 정리되어 있으며, 판매자 안내를 위해 판매자콜센터에 공유가 되었습니다.
※ [CONDITIONAL_FREE] 사용 시, 원하는 조건부 무료배송 금액을 별도로 설정할 수 있습니다.
  deliveryCharge Number
기본배송비
유료배송 또는 조건부 무료배송 시, 편도 배송비 금액 입력
  freeShipOverAmount Number
무료배송을 위한 조건 금액
● 예시 : 10,000원 이상 조건부 무료배송을 설정하기 원할 경우 [deliveryChargeType]을 'CONDITIONAL_FREE'로 설정 후, [freeShipOverAmount]에 10000을 입력
※ 100원 이상 단위로 입력 가능
※ 무료배송인 경우, 0 입력
  deliveryChargeOnReturn Number
초도반품배송비
무료배송인 경우 반품시 소비자가 지불하는 배송비
  remoteAreaDeliverable String
도서산간 배송여부
 
  unionDeliveryType String
묶음 배송여부

※ 묶음 배송 조건
출고지 정보 필수 입력 (출고지 정보가 같은 상품만 묶음 배송 가능)
착불배송 불가 설정 불가
  returnCenterCode String
반품지센터코드
쿠팡 Wing에서 배송지 등록 후 확인
  returnChargeName String
반품지담당자명
쿠팡 Wing에서 배송지 등록 후 확인
  companyContactNumber String
반품지연락처
쿠팡 Wing에서 배송지 등록 후 확인
  returnZipCode String
반품지우편번호
쿠팡 Wing에서 배송지 등록 후 확인
  returnAddress String
반품지주소
쿠팡 Wing에서 배송지 등록 후 확인
  returnAddressDetail String
반품지주소상세
쿠팡 Wing에서 배송지 등록 후 확인
  returnCharge Number
반품배송비
반품회수시 편도 배송비
  outboundShippingPlaceCode Number
출고지주소코드
묶음 배송 선택할 경우 필수, 출고지 조회 API를 통해 조회 가능
  vendorUserId String
실사용자아이디(쿠팡 Wing 아이디)
업체(Vendor)에 소속된 사용자아이디
  requested Boolean
자동승인요청여부
 
  items List
업체상품옵션목록
    sellerProductItemId Number
업체상품옵션아이디
    isAutoGenerated String
자동생성옵션 여부 ( true or false)
자동생성옵션일 경우 true로 표시됩니다.
    vendorItemId Number
옵션아이디
임시저장 상태일 경우 값이 null 입니다. 상품 승인완료 시에 값이 표시됩니다.
    itemName String
업체상품옵션명
    originalPrice Number
할인율기준가
할인율(%)표시를 위한 할인전 금액으로, 판매가격과 동일하게 입력시 '쿠팡가'로 노출. 승인완료 이후 할인율기준가 수정은 [옵션별 할인율기준가 변경] API를 통해 변경가능
    salePrice Number
판매가격
판매가격을 입력.
'최초' 업체상품 등록시 판매가격은 상품 승인 요청 전에만 가능하며, 승인완료 이후 판매가격 수정은 [옵션별 가격 변경] API를 통해 변경가능
    maximumBuyCount Number
판매가능수량
판매가능한 재고수량을 입력.
'최초' 업체상품 등록시 판매수량은 상품 승인 요청 전에만 가능하며, 승인완료 이후 재고 수정은 [옵션별 수량 변경] API를 통해 변경가능
    maximumBuyForPerson Number
인당 최대 구매 수량
1인당 최대 구매 가능한 수량.
제한이 없을 경우 ‘0’을 입력
(예: 인당 최대 구매 수량 100, 최대 구매 수량 기간 3 입력 시, 1인당 3일 동안 최대 100개까지 구매 가능함을 의미)
    maximumBuyForPersonPeriod Number
최대 구매 수량 기간
1인당 해당 상품을 구매할 수 있는 주기 설정.
제한이 없을 경우 ‘1’을 입력
(예: 인당 최대 구매 수량 100, 최대 구매 수량 기간 3 입력 시, 1인당 3일 동안 최대 100개까지 구매 가능함을 의미)
    outboundShippingTimeDay Number
기준출고일(일)
주문일(D-Day) 이후 배송을 위한 출고예정일자를 '일' 단위로 입력. (다음날(D+1) 출고일 경우 '1' 입력)
    adultOnly String
19세이상
 
    taxType String
과세여부
 
    parallelImported String
병행수입여부
 
    overseasPurchased String
해외구매대행여부
 
    pccNeeded Boolean
PCC(개인통관부호) 필수/비필수 여부
해외구매대행 상품의 경우 상품 PCC(개인통관번호) 필수/비필수 여부 기본값 : 비필수(false), true를 입력할 경우 구매시 고객이 개인통관부호를 반드시 입력해야하나 false일 경우 입력하지 않고 상품구매가 가능.
    bestPriceGuaranteed3P Boolean
최저가 보장 여부
true/false
    externalVendorSku String
판매자상품코드 (업체상품코드)
업체고유의 item 코드값을 임의로 세팅할 수 있으며, 입력값은 발주서 조회 API response 에 포함됨.
    barcode String
바코드
    emptyBarcode Boolean
바코드 없음
바코드가 없으면 true
    emptyBarcodeReason String
바코드 없음 사유
바코드없음에 대한 사유 100자 제한
    modelNo String
모델번호
    extraProperties  
업체상품옵션추가정보
Key : Value 형태로 필요한 만큼 반복입력가능
      Key String
Value
    certifications List
상품인증정보
상품 인증 정보
      certificationType String
인증정보Type
카테고리 메타정보 조회 API를 통해 등록가능한 Type을 구할 수 있다.
인증대상이 아닌 카테고리일 경우 : NOT_REQUIRED
      certificationCode String
상품인증정보코드
인증기관에서 발급받은 코드
      certificationAttachments List<Map<String,String>>
인증정보 첨부파일
이동통신사전승낙서 및 인증대리점 인증서 등록 시 사용함
1.이동통신 사전승낙서 또는 인증대리점 인증서
2.판매점 사전승낙 인증마크 또는 이동통신사 대리점 인증마크
 
아래 업체이미지 경로 또는 쿠팡CDN 경로 중 하나 이상 필수 입력 필요
1. vendorPath: 업체에서 사용하는 이미지 경로, http://로 시작하는 경로일 경우 자동 다운로드하여 쿠팡 CDN에 추가됨
2. cdnPath: 쿠팡 CDN 서버에 올린 경우 직접 입력
 
 
    searchTags List
검색어
필요한 만큼 반복입력가능.
['검색어1','검색어2']
    images List
이미지목록
필요한 만큼 반복 입력 가능
      imageOrder Number
이미지표시순서
0,1,2...
      imageType String
이미지타입
대표이미지 타입
3MB 이하의 정사각형 이미지를 JPG, PNG로 등록 가능 (최소 500 x 500px, 최대 5000 x 5000px)

● 필수
REPRESENTATION : 정사각형 대표이미지
● 선택
DETAIL : 기타이미지 (최대 9개까지 등록 가능)
USED_PRODUCT : 중고상태 이미지 (최대 4개까지 등록 가능)
      cdnPath String
쿠팡CDN경로
쿠팡 CDN 에 올린 경우 직접 입력, vendorPath와 cdnPath 중 하나 이상 필수
      vendorPath String
업체이미지경로
업체에서 사용하는 이미지 경로, http://로 시작하는 경로일 경우 자동 다운로드하여 쿠팡 CDN에 추가됨, vendorPath와 cdnPath 중 하나 이상 필수
    notices List
상품고시정보 목록
      noticeCategoryName String
상품고시정보카테고리명
카테고리별 입력 가능한 상품고시정보 카테고리 중 하나를 입력
      noticeCategoryDetailName String
상품고시정보카테고리상세명
      content String
내용
    attributes List
옵션목록(속성)
카테고리 기준으로 정해진 옵션을 입력하는 객체의 목록으로 판매요청 승인이전에는 입력한 옵션항목만 조회되며 승인 이후에는 해당 상품이 쿠팡 카탈로그 노출을 위해 권장되는 옵션항목이 모두 조회되며 입력하지 않은 항목은 attributeValueName이 ""값 입니다. 또한 쿠팡 시스템에 의해 자동으로 상품 속성이 추출되어 추가될 수 있습니다.(Response Example 참조)
      attributeTypeName String
옵션타입명
      attributeValueName String
옵션값
      exposed String
구매옵션/검색옵션 구분필드.
EXPOSED : 구매옵션
NONE : 검색옵션
      editable String
수정 여부 구분필드.
true : 수정가능
false : 수정불가
    contents List
컨텐츠목록
필요한 만큼 반복 입력 가능
      contentsType String
컨텐츠타입
 
      contentDetails List
상세컨텐츠목록
        content String
내용
        detailType String
세부타입
 
    offerCondition String
상품상태
상품 생성 후에는 offerCondition 변경 불가능
    offerDescription String
중고상품 상세설명
중고상품 상태를 설명, 700자 제한
offerCondition을 중고로 입력한 경우에만 작성
  requiredDocuments List
구비 서류 필수인 경우 입력
    templateName String
구비서류템플릿명
    documentPath String
구비서류 쿠팡CDN경로
documentPath 와 vendorDocumentPath 중 하나 필수
    vendorDocumentPath String
구비서류벤더경로
구비서류 경로, http://로 시작하는 경로일 경우 자동 다운로드하여 쿠팡 CDN에 추가됨. documentPath 와 vendorDocumentPath 중 하나 필수
  extraInfoMessage String
주문제작 안내 메시지
배송 방법을 '주문제작'으로 선택했을 경우, 고객에게 안내할 메시지를 입력
  manufacture String
제조사
  bundleInfo Map<String,String>
번들상품
    bundleType String
번들상품 구분
● SINGLE : 단일구성상품 (기본값)
● AB : 혼합구성상품
혼합 구성 상품 등록 시에는 옵션을 구성할 수 없으며, 번들 상품 정보를 추가한 뒤에는 번들 상품 값을 수정할 수 없습니다. 이는 새로운 상품 등록과 동일한 것으로 간주되어 적용된 사항입니다.

Response Example

 

{
    "code": "SUCCESS",
    "message": "",
    "data": {
        "sellerProductId": 123459542,
        "sellerProductName": "test_클렌징오일_관리용_상품명",
        "displayCategoryCode": 56137,
        "categoryId": 1617,
        "productId": 131023672,
        "vendorId": "A0001235",
        "mdId": "NLUP",
        "mdName": "dummy",
        "saleStartedAt": "2019-01-09T18:41:14",
        "saleEndedAt": "2099-01-01T23:59:59",
        "displayProductName": "해피바스 솝베리 클렌징 오일",
        "brand": "해피바스",
        "generalProductName": "솝베리 클렌징 오일",
        "productGroup": "클렌징 오일",
        "statusName": "승인완료",
        "deliveryMethod": "VENDOR_DIRECT",
        "deliveryCompanyCode": "KDEXP",
        "deliveryChargeType": "FREE",
        "deliveryCharge": 0,
        "freeShipOverAmount": 0,
        "deliveryChargeOnReturn": 2500,
        "deliverySurcharge": 0,
        "remoteAreaDeliverable": "N",
        "bundlePackingDelivery": 0,
        "unionDeliveryType": "UNION_DELIVERY",
        "returnCenterCode": "1234274592",
        "returnChargeName": "반품지_1",
        "companyContactNumber": "02-1234-678",
        "returnZipCode": "06168",
        "returnAddress": "서울특별시 강남구 삼성동",
        "returnAddressDetail": "1-23 19층",
        "returnCharge": 2500,
        "outboundShippingPlaceCode": 74010,
        "vendorUserId": "wing_loginId_123",
        "requested": false,
        "items": [{
                "offerCondition": "NEW",
                "offerDescription": null,
                "sellerProductItemId": 1271845812,
                "vendorItemId": 4279191312,
                "itemId": 362266710,
                "itemName": "200ml_1개_(변경될수있음)",
                "originalPrice": 0,
                "salePrice": 1280960,
                "supplyPrice": 1111873,
                "maximumBuyCount": 1,
                "maximumBuyForPerson": 0,
                "outboundShippingTimeDay": 2,
                "maximumBuyForPersonPeriod": 1,
                "unitCount": 1,
                "adultOnly": "EVERYONE",
                "freePriceType": null,
                "taxType": "TAX",
                "parallelImported": "NOT_PARALLEL_IMPORTED",
                "overseasPurchased": "NOT_OVERSEAS_PURCHASED",
                "externalVendorSku": "0001",
                "pccNeeded": false,
                "bestPriceGuaranteed3P": false,
                "emptyBarcode": true,
                "emptyBarcodeReason": "상품확인불가_바코드없음사유",
                "barcode": null,
                "saleAgentCommission": 9,
                "modelNo": "171717",
                "images": [{
                        "imageOrder": 0,
                        "imageType": "REPRESENTATION",
                        "cdnPath": "vendor_inventory/images/2019/01/09/18/9/3c1cee6d-9ab1-454a-8742-de94215cab1b.jpg",
                        "vendorPath": "151009021007000006.jpg"
                    }, {
                        "imageOrder": 1,
                        "imageType": "DETAIL",
                        "cdnPath": "vendor_inventory/images/2019/01/09/18/4/b43651a8-974e-4965-a650-9238ea1ecc15.jpg",
                        "vendorPath": "plg27673_0000004440.jpg"
                    }
                ],
                "notices": [{
                        "noticeCategoryName": "화장품",
                        "noticeCategoryDetailName": "용량(중량)",
                        "content": "상세페이지 참조"
                    }, {
                        "noticeCategoryName": "화장품",
                        "noticeCategoryDetailName": "제품 주요 사양",
                        "content": "상세페이지 참조"
                    }, {
                        "noticeCategoryName": "화장품",
                        "noticeCategoryDetailName": "사용기한 또는 개봉 후 사용기간",
                        "content": "상세페이지 참조"
                    }, {
                        "noticeCategoryName": "화장품",
                        "noticeCategoryDetailName": "사용방법",
                        "content": "상세페이지 참조"
                    }, {
                        "noticeCategoryName": "화장품",
                        "noticeCategoryDetailName": "제조업자 및 제조판매업자",
                        "content": "상세페이지 참조"
                    }, {
                        "noticeCategoryName": "화장품",
                        "noticeCategoryDetailName": "제조국",
                        "content": "상세페이지 참조"
                    }, {
                        "noticeCategoryName": "화장품",
                        "noticeCategoryDetailName": "화장품법에 따라 기재, 표시하여야 하는 모든 성분",
                        "content": "상세페이지 참조"
                    }, {
                        "noticeCategoryName": "화장품",
                        "noticeCategoryDetailName": "식품의약품안전처 심사 필 유무",
                        "content": "상세페이지 참조"
                    }, {
                        "noticeCategoryName": "화장품",
                        "noticeCategoryDetailName": "사용할 때 주의사항",
                        "content": "상세페이지 참조"
                    }, {
                        "noticeCategoryName": "화장품",
                        "noticeCategoryDetailName": "품질보증기준",
                        "content": "제품 이상 시 공정거래위원회 고시 소비자분쟁해결기준에 의거 보상합니다."
                    }, {
                        "noticeCategoryName": "화장품",
                        "noticeCategoryDetailName": "소비자상담관련 전화번호",
                        "content": "상세페이지 참조"
                    }
                ],
                "attributes": [{
                        "attributeTypeName": "피부타입",
                        "attributeValueName": "",
                        "exposed": "NONE",
                        "editable": true
                    }, {
                        "attributeTypeName": "피부고민",
                        "attributeValueName": "",
                        "exposed": "NONE",
                        "editable": true
                    }, {
                        "attributeTypeName": "수량",
                        "attributeValueName": "1개",
                        "exposed": "EXPOSED",
                        "editable": true
                    }, {
                        "attributeTypeName": "개당 중량",
                        "attributeValueName": "",
                        "exposed": "EXPOSED",
                        "editable": true
                    }, {
                        "attributeTypeName": "사용 부위",
                        "attributeValueName": "",
                        "exposed": "NONE",
                        "editable": true
                    }, {
                        "attributeTypeName": "개당 용량",
                        "attributeValueName": "200ml",
                        "exposed": "EXPOSED",
                        "editable": true
                    }
                ],
                "contents": [{
                        "contentsType": "TEXT",
                        "contentDetails": [{
                                "content": "<div><\/div> <div> <img src=\"http://img1a.coupangcdn.com/image/vendor_inventory/images/2019/01/09/18/7/0338f9a4-d6cb-4713-9948-5f49c4a61f27.jpeg\"> <div><\/div> <\/div>",
                                "detailType": "TEXT"
                            }
                        ]
                    }
                ],
                "certifications": [{
                        "certificationType": "NOT_REQUIRED",
                        "certificationCode": ""
                    }
                ],
                "extraProperties": {
                    "transactionType": "manufacturer",
                    "onlineSalePriceForBooks": "10000",
                    "coupangSalePrice": "5000",
                    "businessType": "Beauty"
                },
                "searchTags": [
                    "검색어1",
                    "검색어2"
                ]
            }, {
                "offerCondition": "NEW",
                "offerDescription": null,
                "sellerProductItemId": 1271845813,
                "vendorItemId": 4279191317,
                "itemId": 385617482,
                "itemName": "200ml_2개(변경될 수 있음)",
                "originalPrice": 13000,
                "salePrice": 10000,
                "supplyPrice": 8680,
                "maximumBuyCount": 1,
                "maximumBuyForPerson": 0,
                "outboundShippingTimeDay": 2,
                "maximumBuyForPersonPeriod": 1,
                "unitCount": 1,
                "adultOnly": "EVERYONE",
                "freePriceType": null,
                "taxType": "TAX",
                "parallelImported": "NOT_PARALLEL_IMPORTED",
                "overseasPurchased": "NOT_OVERSEAS_PURCHASED",
                "externalVendorSku": "0001",
                "pccNeeded": false,
                "bestPriceGuaranteed3P": false,
                "emptyBarcode": true,
                "emptyBarcodeReason": "상품확인불가_바코드없음사유",
                "barcode": null,
                "saleAgentCommission": 9,
                "modelNo": "171717",
                "images": [{
                        "imageOrder": 0,
                        "imageType": "REPRESENTATION",
                        "cdnPath": "vendor_inventory/images/2019/01/09/18/7/17173ab4-db79-48ab-8d29-4e1a7126abbf.jpg",
                        "vendorPath": "151009021007000006.jpg"
                    }, {
                        "imageOrder": 1,
                        "imageType": "DETAIL",
                        "cdnPath": "vendor_inventory/images/2019/01/09/18/3/a455fe6a-ea81-40e8-85ca-547db8d27c16.jpg",
                        "vendorPath": "plg27673_0000004440.jpg"
                    }
                ],
                "notices": [{
                        "noticeCategoryName": "화장품",
                        "noticeCategoryDetailName": "용량(중량)",
                        "content": "상세페이지 참조"
                    }, {
                        "noticeCategoryName": "화장품",
                        "noticeCategoryDetailName": "제품 주요 사양",
                        "content": "상세페이지 참조"
                    }, {
                        "noticeCategoryName": "화장품",
                        "noticeCategoryDetailName": "사용기한 또는 개봉 후 사용기간",
                        "content": "상세페이지 참조"
                    }, {
                        "noticeCategoryName": "화장품",
                        "noticeCategoryDetailName": "사용방법",
                        "content": "상세페이지 참조"
                    }, {
                        "noticeCategoryName": "화장품",
                        "noticeCategoryDetailName": "제조업자 및 제조판매업자",
                        "content": "상세페이지 참조"
                    }, {
                        "noticeCategoryName": "화장품",
                        "noticeCategoryDetailName": "제조국",
                        "content": "상세페이지 참조"
                    }, {
                        "noticeCategoryName": "화장품",
                        "noticeCategoryDetailName": "화장품법에 따라 기재, 표시하여야 하는 모든 성분",
                        "content": "상세페이지 참조"
                    }, {
                        "noticeCategoryName": "화장품",
                        "noticeCategoryDetailName": "식품의약품안전처 심사 필 유무",
                        "content": "상세페이지 참조"
                    }, {
                        "noticeCategoryName": "화장품",
                        "noticeCategoryDetailName": "사용할 때 주의사항",
                        "content": "상세페이지 참조"
                    }, {
                        "noticeCategoryName": "화장품",
                        "noticeCategoryDetailName": "품질보증기준",
                        "content": "상세페이지 참조"
                    }, {
                        "noticeCategoryName": "화장품",
                        "noticeCategoryDetailName": "소비자상담관련 전화번호",
                        "content": "상세페이지 참조"
                    }
                ],
                "attributes": [{
                        "attributeTypeName": "피부타입",
                        "attributeValueName": "",
                        "exposed": "NONE",
                        "editable": true
                    }, {
                        "attributeTypeName": "피부고민",
                        "attributeValueName": "",
                        "exposed": "NONE",
                        "editable": true
                    }, {
                        "attributeTypeName": "수량",
                        "attributeValueName": "2개",
                        "exposed": "EXPOSED",
                        "editable": true
                    }, {
                        "attributeTypeName": "개당 중량",
                        "attributeValueName": "",
                        "exposed": "EXPOSED",
                        "editable": true
                    }, {
                        "attributeTypeName": "사용 부위",
                        "attributeValueName": "",
                        "exposed": "NONE",
                        "editable": true
                    }, {
                        "attributeTypeName": "개당 용량",
                        "attributeValueName": "200ml",
                        "exposed": "EXPOSED",
                        "editable": true
                    }
                ],
                "contents": [{
                        "contentsType": "TEXT",
                        "contentDetails": [{
                                "content": "<div><\/div> <div> <img src=\"http://img1a.coupangcdn.com/image/vendor_inventory/images/2019/01/09/18/7/0338f9a4-d6cb-4713-9948-5f49c4a61f27.jpeg\"> <div><\/div> <\/div>",
                                "detailType": "TEXT"
                            }
                        ]
                    }
                ],
                "certifications": [{
                        "certificationType": "NOT_REQUIRED",
                        "certificationCode": ""
                    }
                ],
                "extraProperties": {
                    "transactionType": "manufacturer",
                    "onlineSalePriceForBooks": "10000",
                    "coupangSalePrice": "5000",
                    "businessType": "Beauty"
                },
                "searchTags": [
                    "검색어1",
                    "검색어2"
                ]
            }
        ],
        "requiredDocuments": [

        ],
        "extraInfoMessage": null,
        "manufacture": "제조사_테스트",
        "bundleInfo": {
            "bundleType": "SINGLE"
        }
    }

 

Error Spec

HTTP 상태 코드 (오류 유형)오류 메시지해결 방법
400 (요청변수확인) 상품 정보가 등록 또는 수정되고 있습니다. 잠시 후 다시 조회해 주시기 바랍니다. [1320***883] 상품등록 요청 수행 이후 최소 10분 이후에 조회 요청합니다. 
400 (요청변수확인) 업체[A00123456]는 다른 업체[A0011***5]의 상품을 조회할 수 없습니다. 등록상품ID(sellerProductId) 값을 올바로 입력했는지 확인합니다.
400 (요청변수확인) 상품(123456789)의 데이터가 없습니다. 등록상품ID(sellerProductId) 값을 올바로 입력했는지 확인합니다.
400 (요청변수확인) 업체상품아이디[null]는 숫자형으로 입력해주세요. 등록상품ID(sellerProductId) 값을 올바른 숫자로 입력했는지 확인합니다.

URL API Name

GET_PRODUCT_BY_PRODUCT_ID

 

 

# 테스트케이스

Scripts > Post-response 부분에 추가 되어야 합니다.

 

pm.test("Status code is 200", function () {
    pm.response.to.have.status(200);
});

 

  • pm.test: Postman에서 테스트를 정의하는 함수입니다. 첫 번째 인자는 테스트의 설명이며, 두 번째 인자는 테스트 로직을 포함하는 함수입니다.
  • pm.response.to.have.status(200): 응답의 상태 코드가 200(OK)인지 확인하는 부분입니다.

 

 

테스트 케이스 1: 잘못된 sellerProductId

GET /v2/providers/seller_api/apis/api/v1/marketplace/seller-products/999999999

 

예상 응답:

  • 상태 코드: 400 (Bad Request)
  • 응답 본문: 제품 ID가 없거나 잘못되었다는 오류 메시지가 포함되어 있어야 합니다.

 

테스트 케이스 2: sellerProductId 누락

GET /v2/providers/seller_api/apis/api/v1/marketplace/seller-products/

 

예상 응답:

  • 상태 코드: 400 (Bad Request)
  • 응답 본문: 제품 ID가 필요하다는 오류 메시지가 포함되어 있어야 합니다.

 

테스트 케이스 3: 잘못된 데이터 타입의 sellerProductId

GET /v2/providers/seller_api/apis/api/v1/marketplace/seller-products/abcd1234

 

예상 응답:

  • 상태 코드: 400 (Bad Request)
  • 응답 본문: 업체상품아이디[null]는 숫자형으로 입력해주세요.
pm.test("Status code is 400", function () {
    pm.response.to.have.status(400);
});

pm.test("Error message is '업체상품아이디는 숫자형으로 입력해주세요.'", function () {
    var jsonData = pm.response.json();
    pm.expect(jsonData.message).to.include("업체상품아이디는 숫자형으로 입력해주세요.");
});

 

 

테스트 케이스 4: 상품 데이터가 없는 경우

GET /v2/providers/seller_api/apis/api/v1/marketplace/seller-products/123456789

 

Expected Response:

  • 상태 코드: 400 (Bad Request)
  • 응답 본문: "상품(123456789)의 데이터가 없습니다."
pm.test("Status code is 400", function () {
    pm.response.to.have.status(400);
});

pm.test("Error message is '상품(123456789)의 데이터가 없습니다.'", function () {
    var jsonData = pm.response.json();
    pm.expect(jsonData.message).to.include("상품(123456789)의 데이터가 없습니다.");
});

 

 

테스트 케이스 5: 유효한 sellerProductId /응답 구조 검증

GET /v2/providers/seller_api/apis/api/v1/marketplace/seller-products/123459542

 

예상 응답:

  • 상태 코드: 200 (OK)
  • 응답 본문: 응답 JSON에 sellerProductId, sellerProductName, statusName, items, images 등 필요한 모든 필드가 포함되어 있는지 확인해야 합니다.

 

 

 

 

/**
 * pm.test: Postman에서 테스트를 정의하는 함수입니다. 
 * 첫 번째 인자는 테스트의 설명이며, 두 번째 인자는 테스트 로직을 포함하는 함수입니다.
 */
 pm.test("Status code is 200", function () {
    pm.response.to.have.status(200);
});

/**
 * pm.response.to.have.status(200): 
 * 응답의 상태 코드가 200(OK)인지 확인하는 부분입니다.
 */
 
pm.test("Response has all required fields", function () {
    //pm.response.json(): 응답 본문을 JSON 형식으로 파싱합니다.
    var jsonData = pm.response.json();
    
    //파싱된 JSON 데이터에 "code" 속성이 있는지 확인합니다.
    pm.expect(jsonData).to.have.property("code");
    
    //파싱된 JSON 데이터에 "message" 속성이 있는지 확인합니다.
    pm.expect(jsonData).to.have.property("message");
    
    //파싱된 JSON 데이터에 "data" 속성이 있는지 확인합니다.
    pm.expect(jsonData).to.have.property("data");

    //var data = jsonData.data: 응답 JSON 데이터의 "data" 속성을 변수 data에 할당합니다.
    var data = jsonData.data;

    //data 객체에 "sellerProductId" 속성이 있는지 확인합니다.
    pm.expect(data).to.have.property("sellerProductId");
    
    pm.expect(data).to.have.property("sellerProductName");
    pm.expect(data).to.have.property("displayCategoryCode");
    pm.expect(data).to.have.property("categoryId");
    pm.expect(data).to.have.property("productId");
    pm.expect(data).to.have.property("vendorId");
    pm.expect(data).to.have.property("mdId");
    pm.expect(data).to.have.property("mdName");
    pm.expect(data).to.have.property("saleStartedAt");
    pm.expect(data).to.have.property("saleEndedAt");
    pm.expect(data).to.have.property("displayProductName");
    pm.expect(data).to.have.property("brand");
    pm.expect(data).to.have.property("generalProductName");
    pm.expect(data).to.have.property("productGroup");
    pm.expect(data).to.have.property("statusName");
    pm.expect(data).to.have.property("deliveryMethod");
    pm.expect(data).to.have.property("deliveryCompanyCode");
    pm.expect(data).to.have.property("deliveryChargeType");
    pm.expect(data).to.have.property("deliveryCharge");
    pm.expect(data).to.have.property("freeShipOverAmount");
    pm.expect(data).to.have.property("deliveryChargeOnReturn");
    pm.expect(data).to.have.property("deliverySurcharge");
    pm.expect(data).to.have.property("remoteAreaDeliverable");
    pm.expect(data).to.have.property("bundlePackingDelivery");
    pm.expect(data).to.have.property("unionDeliveryType");
    pm.expect(data).to.have.property("returnCenterCode");
    pm.expect(data).to.have.property("returnChargeName");
    pm.expect(data).to.have.property("companyContactNumber");
    pm.expect(data).to.have.property("returnZipCode");
    pm.expect(data).to.have.property("returnAddress");
    pm.expect(data).to.have.property("returnAddressDetail");
    pm.expect(data).to.have.property("returnCharge");
    pm.expect(data).to.have.property("outboundShippingPlaceCode");
    pm.expect(data).to.have.property("vendorUserId");
    pm.expect(data).to.have.property("requested");
    pm.expect(data).to.have.property("items");

    //응답 데이터에서 첫 번째 item 객체를 가져와서 변수 `items`에 할당합니다.
    var items = data.items[0];
    
    //items` 객체에 "offerCondition" 속성이 있는지 확인합니다.
    pm.expect(items).to.have.property("offerCondition");
    
    pm.expect(items).to.have.property("offerDescription");
    pm.expect(items).to.have.property("sellerProductItemId");
    pm.expect(items).to.have.property("vendorItemId");
    pm.expect(items).to.have.property("itemId");
    pm.expect(items).to.have.property("itemName");
    pm.expect(items).to.have.property("originalPrice");
    pm.expect(items).to.have.property("salePrice");
    pm.expect(items).to.have.property("supplyPrice");
    pm.expect(items).to.have.property("maximumBuyCount");
    pm.expect(items).to.have.property("maximumBuyForPerson");
    pm.expect(items).to.have.property("outboundShippingTimeDay");
    pm.expect(items).to.have.property("maximumBuyForPersonPeriod");
    pm.expect(items).to.have.property("unitCount");
    pm.expect(items).to.have.property("adultOnly");
    pm.expect(items).to.have.property("freePriceType");
    pm.expect(items).to.have.property("taxType");
    pm.expect(items).to.have.property("parallelImported");
    pm.expect(items).to.have.property("overseasPurchased");
    pm.expect(items).to.have.property("externalVendorSku");
    pm.expect(items).to.have.property("pccNeeded");
    pm.expect(items).to.have.property("bestPriceGuaranteed3P");
    pm.expect(items).to.have.property("emptyBarcode");
    pm.expect(items).to.have.property("emptyBarcodeReason");
    pm.expect(items).to.have.property("barcode");
    pm.expect(items).to.have.property("saleAgentCommission");
    pm.expect(items).to.have.property("modelNo");
    pm.expect(items).to.have.property("images");
    pm.expect(items).to.have.property("notices");
    pm.expect(items).to.have.property("attributes");
    pm.expect(items).to.have.property("contents");
    pm.expect(items).to.have.property("certifications");
    pm.expect(items).to.have.property("extraProperties");
    pm.expect(items).to.have.property("searchTags");
});

 

테스트 케이스 6: 상품 정보가 등록 또는 수정 중일 때

 

GET /v2/providers/seller_api/apis/api/v1/marketplace/seller-products/123456789

 

예상 응답:

  • 상태 코드: 400 (Bad Request)
  • 응답 본문: "상품 정보가 등록 또는 수정되고 있습니다. 잠시 후 다시 조회해 주시기 바랍니다. [1320***883]"
pm.test("Status code is 400", function () {
    pm.response.to.have.status(400);
});

pm.test("Error message is '상품 정보가 등록 또는 수정되고 있습니다.'", function () {
    var jsonData = pm.response.json();
    pm.expect(jsonData.message).to.include("상품 정보가 등록 또는 수정되고 있습니다.");
});

 

테스트 케이스 7: 다른 업체의 상품을 조회하려 할 때

GET /v2/providers/seller_api/apis/api/v1/marketplace/seller-products/123456789

 

예상 응답:

  • 상태 코드: 400 (Bad Request)
  • 응답 본문: "업체[A00123456]는 다른 업체[A0011***5]의 상품을 조회할 수 없습니다."
pm.test("Status code is 400", function () {
    pm.response.to.have.status(400);
});

pm.test("Error message is '업체[A00123456]는 다른 업체의 상품을 조회할 수 없습니다.'", function () {
    var jsonData = pm.response.json();
    pm.expect(jsonData.message).to.include("업체[A00123456]는 다른 업체의 상품을 조회할 수 없습니다.");
});

 

 

테스트 케이스 8 : 등록된 IP가 아닌 경우

 

GET /v2/providers/seller_api/apis/api/v1/marketplace/seller-products/15311950397

 

예상응답:

  • 상태 코드: 403 (Forbidden)
  • 응답 본문: "Your ip address 127.255.255.255 is not allowed for this request. If you need service access, please contact the Coupang seller call center. (Tel: +82-1600-9879, Email: openapisupport@coupang.com)"
pm.test("Status code is 403", function () {
    pm.response.to.have.status(403);
});

pm.test("Error message is 'Your ip address is not allowed for this request'", function () {
    var jsonData = pm.response.json();
    pm.expect(jsonData.message).to.include("Your ip address 127.255.255.255 is not allowed for this request");
});

pm.test("Contact details are present", function () {
    var jsonData = pm.response.json();
    pm.expect(jsonData.message).to.include("contact the Coupang seller call center");
    pm.expect(jsonData.message).to.include("Tel: +82-1600-9879");
    pm.expect(jsonData.message).to.include("Email: openapisupport@coupang.com");
});

 

 

 

"이 포스팅은 쿠팡 파트너스 활동의 일환으로, 이에 따른 일정액의 수수료를 제공받습니다."
Posted by 프리스케이터