반응형
[우커머스 REST_API]
- API키발급: https://woocommerce.com/document/woocommerce-rest-api
- RESTAPI 설명서: https://woocommerce.github.io/woocommerce-rest-api-docs/#introduction
WooCommerce REST API Documentation - WP REST API v3
Introduction WooCommerce (WC) 2.6+ is fully integrated with the WordPress REST API. This allows WC data to be created, read, updated, and deleted using requests in JSON format and using WordPress REST API Authentication methods and standard HTTP verbs whic
woocommerce.github.io
우커머스 라이브러리 설치
pip install woocommerce
주문조회 예시
CUSUMER_KEY = ''
CUSUMER_SECRET = ''
wcapi = API(
url="https://carple.kr", # Your store URL
consumer_key=CUSUMER_KEY, # Your consumer key
consumer_secret=CUSUMER_SECRET, # Your consumer secret
wp_api=True, # Enable the WP REST API integration
version="wc/v3" ,# WooCommerce WP REST API version
verify_ssl = False
)
print(wcapi.get("orders").json())
반응형
'프로그래밍 > python' 카테고리의 다른 글
네이버 커머스 API 사용해보기 (0) | 2022.12.07 |
---|---|
if문 한줄로 표현하기 (0) | 2022.12.07 |
dataframe에서 data를 제외하고 형태만 복사해오기 (0) | 2022.12.05 |
[pyqt5] 코드 실행 중 오류 발생 시 프로그램 강제 종료 현상 방지 (0) | 2022.12.01 |
함수 호출 방식 (0) | 2022.11.29 |