# Bug MEET-552 - GET /api/v3/meetings/{id}/agenda_items returns incorrect section link format — unusable for PATCH and POST requests

Project: Stream Meetings
Status: closed
URL: https://community.openproject.org/work_packages/MEET-552

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module | Modules and project features / Meetings, API |
| Target versions | 17.6.0 |
| Observed in versions | 17.4.0 |
| Bug found in version (deprecated) | 17.4.x |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee | Yan Zubrytskyi |
| Accountable |  |
| Product manager |  |
| Developers | Oliver Günther |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

**Steps to reproduce:**

1.  Have a meeting with at least two sections and one agenda item assigned to a section

2.  Call `GET /api/v3/meetings/{meeting_id}/agenda_items`

3.  Find an agenda item and note the `section` link in `_links`, e.g.:  
    "section": {  
     "href": "/api/v3/meetings/3/sections/4"  
    }

4.  Try to move this agenda item to another section using `PATCH /api/v3/meetings/{meeting_id}/agenda_items/{id}` with the body:  
    {  
     "lockVersion": 4,  
     "\_links": {  
       "section": {  
         "href": "/api/v3/meetings/3/sections/90"  
       }  
     }  
    }

**What is the buggy behavior?**

  - The PATCH request returns `422 Unprocessable Content` with the following error:  
    {  
     "\_type": "Error",  
     "errorIdentifier": "urn:openproject-org:api:v3:errors:ResourceTypeMismatch",  
     "message": "For property 'section' a link like '/api/v3/meeting\_sections/:id' is expected, but got '/api/v3/meetings/3/sections/90'."  
    }

  - The link format returned by `GET /api/v3/meetings/{id}/agenda_items` in the `_links.section.href` field (`/api/v3/meetings/{meeting_id}/sections/{id}`) is different from the format required by the PATCH endpoint (`/api/v3/meeting_sections/{id}`)

  - This means the link returned by the GET response cannot be used directly to construct a valid PATCH request

  - ***UPDATED***: same problem for **post** /api/v3/meetings/{id}/agenda\_items: when user is trying to create a new agenda item in the section and uses \_links.self.href from **get** /api/v3/meetings/{id}/sections, then user receives the same error as for PATCH-request

**What is the expected behavior?**

  - The `_links.section.href` format returned by `GET /api/v3/meetings/{id}/agenda_items` should be consistent with the format accepted by `PATCH /api/v3/meetings/{meeting_id}/agenda_items/{id}`

  - Either the GET response should return `/api/v3/meeting_sections/{id}`, or the PATCH endpoint should accept `/api/v3/meetings/{meeting_id}/sections/{id}`

**Environment information**

  - **Browser:** N/A (reproduced via API client / Postman)
