Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

https://docs.openedx.org/projects/wordpress-ecommerce-plugin/en/latest/decisions/0002-api-connection.html

Copied here for the convenience of the reader

We use the LMS APIs to do the basic functionalities.

  • To obtain info about enrollments, we use GET /enrollment/v1/enrollments/

  • To create enrollments, POST /enrollment/v1/enrollment

  • To perform an unenroll, we use the same endpoint to create enrollment, but we set the attribute is_active in False.

  • We can pass the flag force in the request to allow you to enroll; disregard the course’s enrollment end dates.

  • To know if a user exists in the platform, GET /user/v1/accounts

  • If the user does not exist yet, we can get, create, or delete an enrollment allowed with: GET, POST, DELETE /api/enrollment/v1/enrollment_allowed/

MIT’s Ecommerce Middleware

Besides account registration and authentication, MIT’s ecommerce middleware (xpro.mit.edu and mitxonline.mit.edu) uses the following open edX APIs:

  • Create Enrollment (/api/enrollment/v1/enrollment)

  • LIst Enrollment (/api/enrollment/v1/enrollments)

...