등록된 상품 목록을 조회해요.
API 엔드포인트
GET
https://api.bootapi.com/v1/productsBasic Auth요청 파라미터
| 파라미터 | 타입 | 필수 | 설명 |
|---|---|---|---|
keyword |
String | 선택 | 검색 키워드 (상품명) |
category_id |
String | 선택 | 카테고리 ID |
status_sale |
Boolean | 선택 | 판매 상태 필터 |
page |
Integer | 선택 | 페이지 번호 (기본: 1) |
limit |
Integer | 선택 | 페이지당 데이터 수 (기본: 20) |
코드 예제
const { BootpayCommerce } = require('@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)javascriptfrom 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)pythonuse Bootpay\ServerPhp\BootpayCommerceApi;
$commerce = new BootpayCommerceApi(
'your-commerce-client-key',
'your-commerce-secret-key'
);
$response = $commerce->productList([
'page' => 1,
'limit' => 20
]);
print_r($response);phpimport kr.co.bootpay.store.BootpayStore;
import kr.co.bootpay.store.model.request.TokenPayload;
import java.util.HashMap;
TokenPayload tp = new TokenPayload(
"your-commerce-client-key",
"your-commerce-secret-key"
);
BootpayStore commerce = new BootpayStore(tp);
HashMap<String, Object> params = new HashMap<>();
params.put("page", 1);
params.put("limit", 20);
HashMap<String, Object> response = commerce.productList(params);
System.out.println(response);javacommerce = BootpayStore::Api.new(
'your-commerce-client-key',
'your-commerce-secret-key'
)
response = commerce.product_list(page: 1, limit: 20)
puts responserubycommerce := bootpay.NewCommerceApi(
"your-commerce-client-key",
"your-commerce-secret-key",
)
response, err := commerce.ProductList(map[string]interface{}{
"page": 1,
"limit": 20,
})
fmt.Println(response)gousing Bootpay.Commerce;
var commerce = new BootpayCommerceApi(
"your-commerce-client-key",
"your-commerce-secret-key"
);
var response = await commerce.ProductList(new {
page = 1,
limit = 20
});
Console.WriteLine(response);csharp응답
성공 응답
{
"count": 3,
"list": [
{
"_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"
}
]
}json응답 필드 설명
| 필드 | 타입 | 설명 |
|---|---|---|
count |
Integer | 총 상품 수 |
list |
Array | 상품 목록 |
list[]._id |
String | 상품 ID (= product_id) |
list[].name |
String | 상품명 |
list[].display_price |
Integer | 판매가 |
list[].use_subscription |
Boolean | 구독 상품 여부 |
list[].status_sale |
Boolean | 판매 상태 |
list[].stock |
Integer | 재고 수량 |
