# Retiring a learner from ecommerce

**URL:** <https://discuss.openedx.org/t/retiring-a-learner-from-ecommerce/2951>\
**Category:** Site Operations Help\
**Created:** [August 12, 2020, 7:36am UTC](https://discuss.openedx.org/t/retiring-a-learner-from-ecommerce/2951 "2020-08-12T07:36:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mahyard](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/mahyard/32/54_2.png) [@mahyard](https://discuss.openedx.org/u/mahyard)\
**Post date:** [August 12, 2020, 7:36am UTC](https://discuss.openedx.org/t/retiring-a-learner-from-ecommerce/2951/1 "2020-08-12T07:36:27Z")

</div>

Hi everybody,  
I faced a problem with enabling my edX users to delete their accounts,  
I managed to run `retire_one_learner.py` script from tubular repo but it fails when reaches to RETIRING\_ECOM .  
in the output I found that it fails when trying to request this URI:  
[https://ecommerce.address.tld/api/v2/user/retire/](https://ecommerce.address.tld/api/v2/user/retire/)  
so going further I guess that this api is not implemented yet.  
Is that right? Or I have made a mistake somewhere?  
Maybe I have to enable that api or what?  
any help would be appreciated

---

<div class="post-metadata">

**Author:** ![MoisesGonzalezS](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/moisesgonzalezs/32/1996_2.png) [@MoisesGonzalezS](https://discuss.openedx.org/u/MoisesGonzalezS)\
**Post date:** [June 17, 2024, 8:41pm UTC](https://discuss.openedx.org/t/retiring-a-learner-from-ecommerce/2951/2 "2024-06-17T20:41:09Z")

</div>

I’ve recently been trying the [tutor-contrib-retirement](https://github.com/hastexo/tutor-contrib-retirement/) plugin and faced the exact same issue.

I would like to know if that endpoint ever worked. I skimmed through the ecommerce code but the only thing related to retirement [was this](https://github.com/openedx/ecommerce/blob/5e54f4cafdb24802cc9ac486000bd5b0ca3c990d/ecommerce/extensions/api/v2/urls.py#L64).

The tubular scripts were deprecated and instead merged into the edx-platform code directly, but even then I still see the [same call to the endpoint](https://github.com/openedx/edx-platform/blob/master/scripts/user_retirement/utils/edx_api.py#L407).

@farhan, I saw that you were the one that merged the script into edx-platform, do you have any pointers?

---

<div class="post-metadata">

**Author:** ![farhan](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/farhan/32/5927_2.png) [@farhan](https://discuss.openedx.org/u/farhan)\
**Post date:** [June 20, 2024, 9:23am UTC](https://discuss.openedx.org/t/retiring-a-learner-from-ecommerce/2951/3 "2024-06-20T09:23:59Z")

</div>

@MoisesGonzalezS

I did move some tubular scripts related to open source community in [ticket](https://github.com/openedx/axim-engineering/issues/881); relevant PR’s [PR1](https://github.com/openedx/edx-platform/pull/34063), [PR2](https://github.com/openedx/edx-platform/pull/34328)

but didn’t change any functionality.  
I had tested the basic user retirement functionality but don’t know about history of `retiring a learner from ecommerce`

Perhaps pluggin contributors or the code owners can help you best.  
Or can about it [here](https://openedx.slack.com/archives/C0WL6SPRA)

---

<div class="post-metadata">

**Author:** ![MoisesGonzalezS](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/moisesgonzalezs/32/1996_2.png) [@MoisesGonzalezS](https://discuss.openedx.org/u/MoisesGonzalezS)\
**Post date:** [July 3, 2024, 2:25pm UTC](https://discuss.openedx.org/t/retiring-a-learner-from-ecommerce/2951/4 "2024-07-03T14:25:42Z")

</div>

A small update on this:

I reported the issue on [Ecommerce retirement fails · Issue #36 · hastexo/tutor-contrib-retirement · GitHub](https://github.com/hastexo/tutor-contrib-retirement/issues/36) and eventually we discovered that indeed the `retire_one_learner` step in ecommerce calls a non-existent API that causes the error. Considering the state of deprecation of ecommerce, is best to simply ignore the retirement on the ecommerce service.

Thanks a lot for the help in solving the mistery to @BrianMesick and @fghaas.

---

<div class="post-metadata">

**Author:** ![deborahgu](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/deborahgu/32/5782_2.png) [@deborahgu](https://discuss.openedx.org/u/deborahgu)\
**Post date:** [December 3, 2025, 8:03pm UTC](https://discuss.openedx.org/t/retiring-a-learner-from-ecommerce/2951/5 "2025-12-03T20:03:07Z")

</div>

a year and 1/2 later, I have finally ticketed cleaning up this old code: [remove nonfunctional code from retirement · Issue #37720 · openedx/edx-platform · GitHub](https://github.com/openedx/edx-platform/issues/37720)
