콘솔워크

파이썬 우커머스 REST API 사용 본문

프로그래밍/python

파이썬 우커머스 REST API 사용

콘솔워크 2022. 12. 6. 08:52
반응형

[우커머스 REST_API]

 

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())
반응형