# Encountered "links" in payload, but no model was found for model name "link"

**URL:** <https://discuss.emberjs.com/t/encountered-links-in-payload-but-no-model-was-found-for-model-name-link/6668>\
**Category:** Ember Data\
**Created:** [November 11, 2014, 7:53pm UTC](https://discuss.emberjs.com/t/encountered-links-in-payload-but-no-model-was-found-for-model-name-link/6668 "2014-11-11T19:53:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chris](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/chris/32/9783_2.png) [@chris](https://discuss.emberjs.com/u/chris)\
**Post date:** [November 11, 2014, 7:53pm UTC](https://discuss.emberjs.com/t/encountered-links-in-payload-but-no-model-was-found-for-model-name-link/6668/1 "2014-11-11T19:53:12Z")

</div>

My response looks like this

```
{ "members": [
    { "id": "1"
      "name": "My Name"
      "followerCount": 2
      "followingCount": 4
    },
    { "id": "2"
      "name": "My Name Too"
      "followerCount": 12
      "followingCount": 6
    }
  ],
  "links": {
      "members.followers": "http://example.com/members/{members.id}/followers",
      "members.following": "http://example.com/members/{members.id}/following",
      }
  }
}

```

This is a standard JSON API way to do links instead of including it in the member objects themselves, but I am getting the warning message:

> Encountered “links” in payload, but no model was found for model name “link”

Is there support for this format that I’m missing somehow or do I need to hack away at this?

---

<div class="post-metadata">

**Author:** ![Preexo](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/preexo/32/9776_2.png) [@Preexo](https://discuss.emberjs.com/u/Preexo)\
**Post date:** [November 12, 2014, 4:23am UTC](https://discuss.emberjs.com/t/encountered-links-in-payload-but-no-model-was-found-for-model-name-link/6668/2 "2014-11-12T04:23:11Z")

</div>

I make the links part of the members properties, don’t know if that is the official way, but works for me 😃e.g.

```
{ "members": [
    { "id": "1"
      "name": "My Name"
      "followerCount": 2
      "followingCount": 4
      "links": {
          "members.followers": "http://example.com/members/1/followers",
          "members.following": "http://example.com/members/1/following",
       }
    },
    ...
  ],
}

```

but you can always adjust your (un)serializer and put the answer of the API in shape by hand…

---

<div class="post-metadata">

**Author:** ![chris](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/chris/32/9783_2.png) [@chris](https://discuss.emberjs.com/u/chris)\
**Post date:** [November 12, 2014, 3:16pm UTC](https://discuss.emberjs.com/t/encountered-links-in-payload-but-no-model-was-found-for-model-name-link/6668/3 "2014-11-12T15:16:55Z")

</div>

Thanks for the response. They are both valid ways of doing links. Some of our APIs come back that way as well. The top level way is more convenient in the case that there are many members coming back, with 10+ links each. I wrote some serializer code to move the links inside the member property, but it would be nicer to have this as built in support if it should be.
