CourseProgresses API

updates the course progress with the new certificate id

PUT /api/v1/course_progresses/:id/issue_certificate

Parameters

Name Description
course_id Id of course for enrollments
certificate_page_id Id of course for enrollments
id Id of course progress

Request

Headers

Accept: application/json
X-Api-Token: cc5yV-8JBq--Zz9TDJZ_yExr6t68khxinw
X-Api-Email: user-453@example.com

Route

PUT /api/v1/course_progresses/40/issue_certificate

Body

{"certificate_page_id":1800}

cURL

curl "http://localhost:3000/api/v1/course_progresses/40/issue_certificate" -d '{"certificate_page_id":1800}' -X PUT \
	-H "Accept: application/json" \
	-H "X-Api-Token: cc5yV-8JBq--Zz9TDJZ_yExr6t68khxinw" \
	-H "X-Api-Email: user-453@example.com" \
	-H "Content-Type: application/json" \
	-H "Host: school.worksonmy.computer"

Response

Headers

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

Status

200 OK

Body

{
  "created_at": "2019-10-31T22:04:54Z",
  "user_id": 813,
  "course_id": 225,
  "is_active": true,
  "enrolled_at": "2019-10-31T22:04:54Z",
  "percent_complete": 0,
  "has_full_access": false,
  "id": 40,
  "completed_at": null,
  "certificate_page_id": 1800,
  "certificate_serial_number": "cert_hl16nn97",
  "certificate_issued_at": "2019-10-31T22:04:54Z",
  "meta": {
    "class": "courseprogress",
    "url": null,
    "name": "40",
    "description": "",
    "image_url": null
  },
  "course": {
    "created_at": "2019-10-31T00:00:00Z",
    "path": "/courses/225",
    "safe_image_url": "https://process.fs.teachablecdn.com/ADNupMnWyR7kCWRvm76Laz/resize=width:705/https://assets.teachablecdn.com/icons/default-course-image.png",
    "has_published_lecture": false,
    "has_published_product": false,
    "promo_video": null,
    "name": "Course Name 79",
    "heading": "Course Heading",
    "page_title": "Course Name 79",
    "meta_description": "Course Heading",
    "friendly_url": "friendly-url-79",
    "description": "Course Description",
    "author_bio_id": 292,
    "position": 1,
    "conversion_pixels": null,
    "closing_letter": "Closing Letter",
    "image_url": null,
    "hero_image_url": null,
    "is_published": true,
    "bundled_courses_count": 0,
    "child_course_ids": [

    ],
    "preenrollment_call_to_action": "Sign up to get this course when it launches",
    "is_open": true,
    "is_accepting_preenrollments": false,
    "use_old_course_page": null,
    "skip_thank_you_page": null,
    "onboarded_at": null,
    "id": 225,
    "default_page_id": 1797,
    "checkout_sidebar_page_id": 1798,
    "certificate_page_id": null,
    "purchase_redirect_url": null,
    "mobile_thumbnail_url": "https://assets.teachablecdn.com/icons/default-course-image.png",
    "mobile_hero_image_url": "https://assets.teachablecdn.com/bg/default-hero.png",
    "post_purchase_page_id": 1799,
    "issue_certificates_manually": null,
    "is_video_completion_enforced": null,
    "is_lecture_order_enforced": null,
    "is_minimum_quiz_score_enforced": null,
    "minimum_quiz_score": null,
    "maximum_quiz_retakes": null,
    "meta": {
      "class": "course",
      "url": "/courses/225/",
      "name": "Course Name 79",
      "description": "Course Description",
      "image_url": null
    },
    "categories": [

    ],
    "author_bio": {
      "created_at": "2019-10-31T22:04:53Z",
      "headline": "MyText",
      "profile_image_url": "http://www.example.com",
      "bio": "MyText",
      "position": null,
      "user_id": 814,
      "name": "Author Name",
      "id": 292,
      "meta": {
        "class": "authorbio",
        "url": "/author_bios/292",
        "name": "Author Name",
        "description": "",
        "image_url": null
      }
    }
  }
}