# Patch company project wells and project wells with one endpoint

**URL:** <https://forum.api.combocurve.com/t/patch-company-project-wells-and-project-wells-with-one-endpoint/178>\
**Category:** Feedback\
**Created:** [December 21, 2022, 6:56pm UTC](https://forum.api.combocurve.com/t/patch-company-project-wells-and-project-wells-with-one-endpoint/178 "2022-12-21T18:56:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![josh](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.api.combocurve.com/josh/32/172_2.png) [@josh](https://forum.api.combocurve.com/u/josh)\
**Post date:** [December 21, 2022, 6:56pm UTC](https://forum.api.combocurve.com/t/patch-company-project-wells-and-project-wells-with-one-endpoint/178/1 "2022-12-21T18:56:55Z")

</div>

Hi all! I’ve been working with the ComboCurve API lately and it’s been working well for my use case so far.

I was wondering if there might be any interest in adding a new endpoint that combines both patch endpoints for `projects/:projectId/wells` and `wells` to allow submitting a single request containing a mix of company-scoped wells and project-scoped wells for a project.

I’d like to avoid storing `scope` to avoid it potentially becoming stale (e.g., during import the well might be company-scoped but later converted to project-scoped), so my update flow currently looks like this:

1. get a list of project-scoped chosen IDs from the `projects/:projectId/wells` endpoint
2. get a list of company-scoped chosen IDs from the `projects/:projectId/company-wells` endpoint
3. filter my list of updates to project-scoped chosen IDs (based on the response in 1) and send a patch for project-scoped wells
4. filter my list of updates to company-scoped chosen IDs (based on the response in 2) and send a patch for company-scoped wells

Ideally I’d like to send the unfiltered list containing both project-scoped and company-scoped wells (combining 3 and 4) which would remove the need to query `scope` (skipping 1 and 2).

This would be a minor improvement overall but would reduce the chattiness for update flows similar to this quite a bit (1 request instead of 4 for smaller projects, probably more substantial savings for larger projects). Technically if you already know the full list of chosen IDs in the project, you could skip 1 or 2 (e.g., knowing which wells are project-scoped implies the rest are company-scoped), but it could be useful to query both for validation anyway.

Similarly for querying well header data from a project, it would be useful to be able to query all wells (both project- and company-scoped) in a project at a single endpoint instead of having to hit both endpoints (`projects/:projectId/company-wells` and `projects/:projectId/wells`). Also not a big deal but would improve the ergonomics slightly - I’d guess most people will query both anyway.

Just thought I’d share this feedback in case there’s some interest in improving the ergonomics here slightly in case there are other people using a similar flows for updating/querying well headers in a project. Thank you!

---

<div class="post-metadata">

**Author:** ![HGantz](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.api.combocurve.com/hgantz/32/95_2.png) [@HGantz](https://forum.api.combocurve.com/u/HGantz)\
**Post date:** [December 21, 2022, 8:23pm UTC](https://forum.api.combocurve.com/t/patch-company-project-wells-and-project-wells-with-one-endpoint/178/2 "2022-12-21T20:23:46Z")

</div>

Hey @josh,  
thanks for taking the time to write this feedback! The team will discuss your suggestions internally and when we come to some sort of conclusion I’ll let you know.

Happy Holidays,  
-Harry
