상품 삭제
v1 API 상세: 상품
등록된 상품을 삭제합니다.
API 엔드포인트
요청 파라미터
요청 파라미터
| 파라미터 | 타입 | 필수 | 설명 |
|---|---|---|---|
| product_id | String | Y | 삭제할 상품 ID (URL 경로) |
코드 예제
curl -X DELETE "https://api.bootapi.com/v1/products/67c95e64d01640bb9859c629" \
-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.delete('67c95e64d01640bb9859c629')
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.delete('67c95e64d01640bb9859c629')
print(response)use Bootpay\ServerPhp\BootpayCommerceApi;
$commerce = new BootpayCommerceApi("your-commerce-client-key", "your-commerce-secret-key");
$response = $commerce->product->delete('67c95e64d01640bb9859c629');
print_r($response);import kr.co.bootpay.store.BootpayStore;
import kr.co.bootpay.store.model.request.TokenPayload;
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();
BootpayStoreResponse response = commerce.product.delete(
"67c95e64d01640bb9859c629"
);
System.out.println(response);require 'bootpay'
commerce = BootpayStore::RestClient.new(
client_key: 'your-commerce-client-key',
secret_key: 'your-commerce-secret-key'
)
response = commerce.product_delete(
product_id: '67c95e64d01640bb9859c629'
)
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.Delete("67c95e64d01640bb9859c629")
fmt.Println(response, err)using Bootpay.Commerce;
var commerce = new BootpayCommerceApi("your-commerce-client-key", "your-commerce-secret-key");
var response = await commerce.ProductDelete("67c95e64d01640bb9859c629");
Console.WriteLine(await response.Content.ReadAsStringAsync());응답
성공 응답
HTTP 200 에 본문은 null 입니다.
JSON
null에러 코드
오류 코드
| 코드 | 메시지 | 대처 방법 |
|---|---|---|
PRODUCT_NOT_FOUND | 존재하지 않는 상품입니다 | product_id를 확인합니다 |
PRODUCT_ACTIVE_CANNOT_BE_DELETED | 전시중이거나 판매중인 상품은 삭제할 수 없습니다. | status_sale·status_display 를 모두 false 로 바꾼 뒤 삭제합니다 |
PRODUCT_FROZEN | 판매금지된 상품은 편집/저장 안됩니다. 관리자에게 문의 바랍니다 | 관리자에게 문의합니다 |