# Bug report: List invitations endpoint does not return "totals"

**URL:** <https://community.auth0.com/t/bug-report-list-invitations-endpoint-does-not-return-totals/66226>\
**Category:** Get Help\
**Tags:** invitations, bug\
**Created:** [July 15, 2021, 12:54pm UTC](https://community.auth0.com/t/bug-report-list-invitations-endpoint-does-not-return-totals/66226 "2021-07-15T12:54:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![henrique](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/henrique/32/25248_2.png) [@henrique](https://community.auth0.com/u/henrique)\
**Post date:** [July 15, 2021, 12:54pm UTC](https://community.auth0.com/t/bug-report-list-invitations-endpoint-does-not-return-totals/66226/1 "2021-07-15T12:54:24Z")

</div>

Hello! I found the bug described below on endpoint `/api/v2/organizations/{id}/invitations` of Management API.

The bug: `totals` is not returned in the response when requested via `https://xxx.auth0.com/api/v2/organizations/{id}/invitations?include_totals=true`

Thanks!

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [July 15, 2021, 4:54pm UTC](https://community.auth0.com/t/bug-report-list-invitations-endpoint-does-not-return-totals/66226/3 "2021-07-15T16:54:18Z")

</div>

Hi @henrique,

Welcome to the Auth0 Community!

When I make the request with `include_totals=true` I see:

```auto
{
  "invitations": [
  {...},
  {...}
  ],
  "start": 0,
  "limit": 2
}

```

With `include_totals=false`:

```auto
[
  {...},
  {...}
]

```

Is that not what you are expecting?

---

<div class="post-metadata">

**Author:** ![henrique](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/henrique/32/25248_2.png) [@henrique](https://community.auth0.com/u/henrique)\
**Post date:** [July 15, 2021, 9:58pm UTC](https://community.auth0.com/t/bug-report-list-invitations-endpoint-does-not-return-totals/66226/4 "2021-07-15T21:58:25Z")

</div>

Thank you, Dan! Nice to meet you. About the bug, actually the expected return would be something like:

```auto
{
  "invitations": [
  {...},
  {...}
  ],
  "start": 0,
  "limit": 2,
  "total": 2
}

```

`start` and `limit` are related with params `page` and `per_page` respectively. `total` is a different information. For example, if I set `page` to `0`, `per_page` to `3` and I have `5` invitations the expected result would be

```auto
{
  "invitations": [
  {...},
  {...},
  {...}
  ],
  "start": 0,
  "limit": 3,
  "total": 5
}

```

As I understand it, the return of this call would be something similar to calls `https://xxx.auth0.com/api/v2/users?include_totals=true` or `https://xxx.auth0.com/api/v2/organizations?include_totals=true`.

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [July 16, 2021, 5:27pm UTC](https://community.auth0.com/t/bug-report-list-invitations-endpoint-does-not-return-totals/66226/5 "2021-07-16T17:27:55Z")

</div>

Thanks for providing the extra context.

I see what you mean, there is certainly some inconsistency there. I’ll submit the bug report and update here when it is resolved. Thanks for helping us improve 😄

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [August 23, 2021, 4:22pm UTC](https://community.auth0.com/t/bug-report-list-invitations-endpoint-does-not-return-totals/66226/7 "2021-08-23T16:22:46Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
