Products API

PUT - /api/v1/courses/:course_id/products/:id - Updating

PUT /api/v1/courses/:course_id/products/:id

Parameters

Name Description
id id
course_id Id of the course
affiliate_revenue_share attribute
billing_interval_days attribute
currency attribute
description description
is_published attribute
is_recurring attribute
name attribute
price attribute
author_revenue_share attribute

Request

Headers

Accept: application/json
X-Api-Token: 56T5ay4PB8x9Pny6FmyLs6LhU_gv8exGjw
X-Api-Email: user-283@example.com

Route

PUT /api/v1/courses/177/products/67

Body

{}

cURL

curl "http://localhost:3000/api/v1/courses/177/products/67" -d '{}' -X PUT \
	-H "Accept: application/json" \
	-H "X-Api-Token: 56T5ay4PB8x9Pny6FmyLs6LhU_gv8exGjw" \
	-H "X-Api-Email: user-283@example.com" \
	-H "Content-Type: application/json" \
	-H "Host: school.worksonmy.computer"

Response

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 474

Status

202 Accepted

Body

{
  "created_at": "2019-10-31T22:03:26Z",
  "formatted_price": "$10",
  "name": "product name",
  "description": "product description",
  "billing_interval": "month",
  "detailed_description": null,
  "currency": "USD",
  "position": 1,
  "price": 1000,
  "is_recurring": false,
  "is_published": true,
  "course_id": 177,
  "author_revenue_share": null,
  "num_payments_required": null,
  "id": 67,
  "meta": {
    "class": "product",
    "url": "/courses/177/products/67",
    "name": "product name",
    "description": "product description",
    "image_url": null
  }
}