Validate Key
This API helps you to validate the Studiocart API key.
HTTP request
POST/wp-json/sc/v1/webhook/validate/?api_key={sc-api-key}
Parameters
api_key – string | studiocart api key Required
Response
200
Body
{}
Subscribe
This API helps you register a resthook.
HTTP request
POST/wp-json/sc/v1/webhook/subscribe/?api_key={sc-api-key}&product_id={product-id}
Parameters
api_key – string | studiocart api key Required
product_id – integer | studiocart product ID Optional
Request Body
hook_url – string | subscription url Required
plan_id – integer/array | studiocart product’s plan id Optional
source – string | e.g. zapier Optional
status – string | e.g. purchased, refunded, lead etc. Optional
prices_in_cents – boolean e.g. 1 or 0, Optional. Default 0
Response
200
Body
{"id": "123"}
Delete
This API helps you to delete a resthook.
HTTP request
POST/wp-json/sc/v1/webhook/delete/
Request Body
id – integer| resthook id Required
Response
200
Body
{"id": "123"}
List Products
This API helps you to list all the products.
HTTP request
GET/wp-json/sc/v1/webhook/products/
Response
200
Body
[{"id":1,"name":"Product 1"},{"id":2,"name":"Product 2"},{"id":3,"name":"Product 3"}]
List Payment Plans
This API helps you to list all the payment plans for a product.
HTTP request
GET/wp-json/sc/v1/webhook/plans/?product_id=<product_id>
Response
200
Body
[{"id":"my-plan","name":"My Plan"},{"id":"bump","name":"Purchased as a bump"},{"id":"upsell","name":"Purchased as an upsell"}]
Get Latest Orders
This API helps you to get a list of latest orders.
HTTP request
POST/wp-json/sc/v1/webhook/latest-orders/
Parameters
api_key – string | studiocart api key Required
product_id – integer Optional
Request Body
plan_id – integer/array Optional
status – string | active, completed, canceled. Optional
Response
200
Body
[{
"order_id": 1234,
"product_name": "Product 1",
"customer_email": "john@doe.com",
"customer_firstname": "John",
"customer_lastname": "Doe",
"customer_name": "John Doe",
"order_status": "paid",
"product_id": "1",
"order_amount": "10.00",
"currency": "USD"
},
{
"order_id": 1233,
"product_name": "Product 1",
"customer_email": "jane@roe.com",
"customer_firstname": "Jane",
"customer_lastname": "Roe",
"customer_name": "Jane Roe",
"order_status": "paid",
"product_id": "1",
"order_amount": "10.00",
"currency": "USD"
}]