I am able to find the REST API docs for WooCommerce: https://woocommerce.github.io/woocommerce-rest-api-docs/#create-a-product but am unable to figure out how to create a subscription product via. this API.
I am able to also edit a user's subscription once it has been created via the REST API: https://prospress.github.io/subscriptions-rest-api-docs/ however I don't see any documentation for how to create subscription products.
I am able to create a simple subscription product with the following code:
data = {
"name": subscription_product_name,
"type": "subscription",
"regular_price": subscription_product_price,
}
wcapi.post("products", data)
However, the price is set incorrectly, and I am unable to figure out the fields that would be used to set the signup_fee, billing period, and other various fields.
Any help would be greatly appreciated. Thanks!