상품 목록 조회
v1 API 상세: 상품
등록된 상품 목록을 조회합니다.
쇼핑몰에 노출 중인 상품만 나옵니다. 발행 상태(임시저장 아님)이고, 노출(status_visible)·전시(status_display) 중이며, 전시 기간을 쓰면 그 기간 안인 상품입니다. 숨김·임시저장 상품은 ex_uid 로도 찾을 수 없습니다. 상세 조회는 별도의 공개 조건을 적용합니다.
API 엔드포인트
요청 파라미터
요청 파라미터
| 파라미터 | 타입 | 필수 | 설명 |
|---|---|---|---|
| category_id | String | N | 카테고리 ID (하위 카테고리 상품까지 포함) |
| ex_uid | String | N | 가맹점 자체 상품 식별자로 조회 |
| keyword | String | N | 검색어 — 상품명·SKU·바코드·검색 태그에서 찾습니다 |
| sort | String | N | 정렬 기준 — position · -created_at(최신순) · created_at(오래된순) · price(낮은가격순) · -price(높은가격순) · -sold(판매량순). 미지정이거나 모르는 값이면 쇼핑몰 설정값 |
| page | Integer | N | 페이지 번호 (기본: 1) |
| limit | Integer | N | 페이지당 데이터 수 (기본: 20, 최대 100) |
코드 예제
curl -X GET "https://api.bootapi.com/v1/products?page=1&limit=20" \
-H "Authorization: Basic {base64(client_key:secret_key)}"import { BootpayCommerce } from '@bootpay/backend-js'
const commerce = new BootpayCommerce({
client_key: 'your-commerce-client-key',
secret_key: 'your-commerce-secret-key',
mode: 'production'
})
const response = await commerce.product.list({
page: 1,
limit: 20
})
console.log(response)from bootpay_backend import BootpayCommerce
commerce = BootpayCommerce(
client_key='your-commerce-client-key',
secret_key='your-commerce-secret-key',
mode='production'
)
response = commerce.product.list({'page': 1, 'limit': 20})
print(response)use Bootpay\ServerPhp\BootpayCommerceApi;
$commerce = new BootpayCommerceApi("your-commerce-client-key", "your-commerce-secret-key");
$response = $commerce->product->getList([
'page' => 1,
'limit' => 20
]);
print_r($response);import kr.co.bootpay.store.BootpayStore;
import kr.co.bootpay.store.model.request.TokenPayload;
import kr.co.bootpay.store.model.request.product.ProductListParams;
import kr.co.bootpay.store.model.response.BootpayStoreResponse;
TokenPayload tp = new TokenPayload(
"your-commerce-client-key",
"your-commerce-secret-key"
);
BootpayStore commerce = new BootpayStore(tp).withToken();
ProductListParams params = new ProductListParams();
params.page = 1;
params.limit = 20;
BootpayStoreResponse response = commerce.product.list(params);
System.out.println(response);require 'bootpay'
commerce = BootpayStore::RestClient.new(
client_key: 'your-commerce-client-key',
secret_key: 'your-commerce-secret-key'
)
response = commerce.products(page: 1, limit: 20)
puts response.dataimport "github.com/bootpay/backend-go/v2"
commerce := bootpay.NewCommerceAPI("your-commerce-client-key", "your-commerce-secret-key", nil, "production")
response, err := commerce.Product.List(&bootpay.ProductListParams{
ListParams: bootpay.ListParams{Page: 1, Limit: 20},
})
fmt.Println(response, err)using Bootpay.Commerce;
using Bootpay.Commerce.Models;
var commerce = new BootpayCommerceApi("your-commerce-client-key", "your-commerce-secret-key");
var response = await commerce.ProductList(new ProductListParams { Page = 1, Limit = 20 });
Console.WriteLine(await response.Content.ReadAsStringAsync());응답
성공 응답
JSON
{
"count": 3,
"list": [
{
"product_id": "67e4b4425ec892162491d0ec",
"name": "Professional 플랜",
"desc": "전문가를 위한 구독 서비스",
"display_price": 29900,
"use_stock": false,
"stock": 0,
"status_display": true,
"status_sale": true,
"use_subscription": true,
"use_discount": false,
"discount_price": 0,
"created_at": "2025-03-27T11:13:23+09:00",
"updated_at": "2025-03-31T17:37:29+09:00"
}
]
}응답 필드 설명
| 필드 | 타입 | 설명 |
|---|---|---|
count | Integer | 조건에 맞는 전체 상품 수 |
list | Array | 상품 목록 |
└─ product_id | String | 상품 ID |
└─ name | String | 상품명 |
└─ display_price | Integer | 판매가 |
└─ use_subscription | Boolean | 구독 상품 여부 |
└─ status_sale | Boolean | 판매 중 여부 |
└─ stock | Integer | 재고 수량 |
└─ ex_uid | String | 가맹점 자체 상품 식별자 |
└─ category | Object | 카테고리 정보 (없으면 null) |
└─ options | Array | 상품 옵션 목록 |
└─ option_count | Integer | 옵션 수 |
└─ review_count | Integer | 리뷰 수 |
└─ review_average | Number | 리뷰 평균 평점 |
에러 코드
오류 코드
| 코드 | 메시지 | 대처 방법 |
|---|---|---|
MALL_INACTIVE | 접근가능한 쇼핑몰이 아닙니다. 쇼핑몰 관리자에게 문의해주세요. | 쇼핑몰 운영 상태를 확인합니다 |