title: How to use DELETE on custom route when using json-server
body: <p>I'm having a couple of issues when calling DELETE on some custom endpoints defined in my routes.json</p>
  <p>I have some data that looks like this -</p>
  <pre><code>{
    &quot;apps&quot;: [
      {
        &quot;creation_time&quot;: &quot;2018-06-07 15:56:01&quot;,
        &quot;description&quot;: &quot;Test App&quot;,
        &quot;id&quot;: &quot;2&quot;,
        &quot;name&quot;: &quot;Test&quot;,
        &quot;update_time&quot;: &quot;2018-06-07 15:56:01&quot;
      },
    ],
    &quot;account_types&quot;: [
      {
        &quot;app&quot;: {
          &quot;description&quot;: &quot;Test app&quot;,
          &quot;id&quot;: &quot;2&quot;,
          &quot;name&quot;: &quot;Test&quot;,
          &quot;user_id&quot;: &quot;337&quot;
        },
        &quot;creation_time&quot;: &quot;2018-06-07 16:00:31&quot;,
        &quot;description&quot;: &quot;Regular Test account type&quot;,
        &quot;id&quot;: &quot;2&quot;,
        &quot;max&quot;: &quot;None&quot;,
        &quot;name&quot;: &quot;BASIC&quot;,
        &quot;update_time&quot;: &quot;2018-06-07 16:00:31&quot;
      },
      {
        &quot;app&quot;: {
          &quot;description&quot;: &quot;Test app&quot;,
          &quot;id&quot;: &quot;2&quot;,
          &quot;name&quot;: &quot;Test&quot;,
          &quot;user_id&quot;: &quot;337&quot;
        },
        &quot;creation_time&quot;: &quot;2018-08-02 13:48:45&quot;,
        &quot;description&quot;: &quot;Premium Test account type&quot;,
        &quot;id&quot;: &quot;8&quot;,
        &quot;max&quot;: &quot;None&quot;,
        &quot;name&quot;: &quot;PREMIUM&quot;,
        &quot;update_time&quot;: &quot;2018-08-02 13:48:45&quot;
      }
    ]
  }
  
  </code></pre>
  <p>And this is my routes.json</p>
  <pre><code>{
      &quot;/test/:app_id/accounts/type&quot;: &quot;/account_types?app.id=:app_id&quot;,
      &quot;/test/:app_id/accounts/type/:type_id&quot;: &quot;/account_types?app.id=:app_id&amp;id=:type_id&quot;
  }
  </code></pre>
  <p>This is the output</p>
  <pre><code>  \{^_^}/ hi!
  
    Loading mock-data/apps.json
    Loading routes.json
    Done
  
    Resources
    http://localhost:3000/apps
    http://localhost:3000/account_types
  
    Other routes
    /test/:app_id/accounts/type -&gt; /account_types?app.id=:app_id
    /test/:app_id/accounts/type/:type_id -&gt; /account_types?app.id=:app_id&amp;id=:type_id
  
    Home
    http://localhost:3000
  
    Type s + enter at any time to create a snapshot of the database
    Watching...
  
  GET /account_types?app.id=2&amp;id=2 200 85.703 ms - 334
  GET /account_types?app.id=2&amp;id=4 200 81.023 ms - 2
  GET /account_types?app.id=2&amp;id=8 200 38.714 ms - 336
  DELETE /account_types?app.id=2&amp;id=8 404 26.290 ms - 2
  
  </code></pre>
  <p>This is how I run json-sever</p>
  <pre><code>json-server --watch mock-data/apps.json -r routes.json
  </code></pre>
  <p>When I call GET on these two endpoints, I retrieve the correct info but when I call DELETE on them I receive status code 404, is there something I am doing wrong or is this a known issue?</p>
  <p>Any help would be appreciated</p>