# New record being added instead of existing record being updated.

**URL:** <https://forum.kintone.dev/t/new-record-being-added-instead-of-existing-record-being-updated/305>\
**Category:** General\
**Created:** [March 16, 2020, 10:27am UTC](https://forum.kintone.dev/t/new-record-being-added-instead-of-existing-record-being-updated/305 "2020-03-16T10:27:08Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![legacy\_user](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.kintone.dev/legacy_user/32/25_2.png) [@legacy\_user](https://forum.kintone.dev/u/legacy_user)\
**Post date:** [March 16, 2020, 10:27am UTC](https://forum.kintone.dev/t/new-record-being-added-instead-of-existing-record-being-updated/305/1 "2020-03-16T10:27:08Z")

</div>

When I try to update a record with the following json, it is adding a new record instead of updating.&nbsp; Any ideas what might be causing this?

{“app”:23,“records”:[{“id”:14,“record”:{“issue”:{“value”:“testA”}}}]}

---

<div class="post-metadata">

**Author:** ![legacy\_user](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.kintone.dev/legacy_user/32/25_2.png) [@legacy\_user](https://forum.kintone.dev/u/legacy_user)\
**Post date:** [March 16, 2020, 9:05pm UTC](https://forum.kintone.dev/t/new-record-being-added-instead-of-existing-record-being-updated/305/2 "2020-03-16T21:05:57Z")

</div>

Hello Dave,

Most&nbsp; likely the id doesn’t exist or possibly incorrect so that’s why it’s creating a new record.

---

<div class="post-metadata">

**Author:** ![legacy\_user](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.kintone.dev/legacy_user/32/25_2.png) [@legacy\_user](https://forum.kintone.dev/u/legacy_user)\
**Post date:** [March 17, 2020, 12:43am UTC](https://forum.kintone.dev/t/new-record-being-added-instead-of-existing-record-being-updated/305/3 "2020-03-17T00:43:48Z")

</div>

Definitely a record 14 (see below.)&nbsp; Any other ideas?

&nbsp;

![](https://developer.kintone.io/hc/user_images/R5QjwC099eWqP98TEqS1YQ.png)

---

<div class="post-metadata">

**Author:** ![legacy\_user](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.kintone.dev/legacy_user/32/25_2.png) [@legacy\_user](https://forum.kintone.dev/u/legacy_user)\
**Post date:** [March 17, 2020, 1:50am UTC](https://forum.kintone.dev/t/new-record-being-added-instead-of-existing-record-being-updated/305/4 "2020-03-17T01:50:07Z")

</div>

Dave, could you share more details about the API request?

We can have a better overview if we know how you are sending the requests (for example, you may be using a POST request instead of a PUT request, but we can’t tell yet from your info)

---

<div class="post-metadata">

**Author:** ![legacy\_user](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.kintone.dev/legacy_user/32/25_2.png) [@legacy\_user](https://forum.kintone.dev/u/legacy_user)\
**Post date:** [March 19, 2020, 10:39am UTC](https://forum.kintone.dev/t/new-record-being-added-instead-of-existing-record-being-updated/305/5 "2020-03-19T10:39:02Z")

</div>

Sure, I am doing a POST to [kintone.com/k/v1/records.json](http://kintone.com/k/v1/records.json) with an API token, from outside kintone.

---

<div class="post-metadata">

**Author:** ![legacy\_user](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.kintone.dev/legacy_user/32/25_2.png) [@legacy\_user](https://forum.kintone.dev/u/legacy_user)\
**Post date:** [March 19, 2020, 8:51pm UTC](https://forum.kintone.dev/t/new-record-being-added-instead-of-existing-record-being-updated/305/6 "2020-03-19T20:51:01Z")

</div>

Hello Dave,

&nbsp;

As William mentioned above, could you try and use the PUT request instead of the POST request?

When you are trying to update the record, you must use the PUT request.

Let us know if you still have a problem after you have changed it.

Hope this helps.

---

<div class="post-metadata">

**Author:** ![legacy\_user](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.kintone.dev/legacy_user/32/25_2.png) [@legacy\_user](https://forum.kintone.dev/u/legacy_user)\
**Post date:** [March 19, 2020, 10:54pm UTC](https://forum.kintone.dev/t/new-record-being-added-instead-of-existing-record-being-updated/305/7 "2020-03-19T22:54:44Z")

</div>

That did the trick, thanks!
