# Plugin Development: record.save() returns 404

**URL:** <https://meta.discourse.org/t/plugin-development-record-save-returns-404/88998>\
**Category:** Product Support\
**Created:** [June 2, 2018, 2:12pm UTC](https://meta.discourse.org/t/plugin-development-record-save-returns-404/88998 "2018-06-02T14:12:45Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![kleinfreund](https://avatars.discourse-cdn.com/v4/letter/k/a6a055/32.png) [@kleinfreund](https://meta.discourse.org/u/kleinfreund)\
**Post date:** [June 2, 2018, 2:12pm UTC](https://meta.discourse.org/t/plugin-development-record-save-returns-404/88998/1 "2018-06-02T14:12:45Z")

</div>

I’m trying to develop a plugin and save records to the store (as described in [Upgrading our front end models to use a store](https://meta.discourse.org/t/upgrading-our-front-end-models-to-use-a-store/27837)). I can create the record successfully, call `save()`, but it will only return a 404 at `/routes`.

**`./plugins/plugin-name/assets/javascripts/discourse/controllers/admin-plugins-plugin-name.js.es6`** :

```plaintext
const routeRecord = this.store.createRecord('route', { propA, propB });
routeRecord.save()
  .then(result => {
    console.log(result);
  }
  .catch(error => {
    console.error(error);
  }
  .finally(() => {
    console.log('Done');
  }

```

I seem to be missing some sort of model for the type of record I want to store. Without the model below, the POST request to `routes` isn’t sent out. Implementing the model on my own, the request is sent, but returns a 404. I don’t know what is necessary for it to work properly. It looks like this:

**`./plugins/plugin-name/assets/javascripts/discourse/models/route.js.es6`** :

```plaintext
import RestModel from 'discourse/models/rest';

export default RestModel.extend({
  _init: function() {
    this._super();
  }.on('init'),

  createProperties() {
    return {
      propA: this.getProperties('propA'),
      propB: this.getProperties('propB')
    };
  }
});

```

What is required for `/routes` to be a valid end point?

---

_[View the full topic](https://meta.discourse.org/t/plugin-development-record-save-returns-404/88998)._
