# Invalid request trying to PATCH Erp.BO.PartSvc

**URL:** <https://www.epiusers.help/t/invalid-request-trying-to-patch-erp-bo-partsvc/71786>\
**Category:** Epicor ERP 10\
**Tags:** rest\
**Created:** [October 13, 2020, 7:52pm UTC](https://www.epiusers.help/t/invalid-request-trying-to-patch-erp-bo-partsvc/71786 "2020-10-13T19:52:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Epicorus](https://www.epiusers.help/user_avatar/www.epiusers.help/epicorus/32/12102_2.png) [@Epicorus](https://www.epiusers.help/u/Epicorus)\
**Post date:** [October 13, 2020, 7:52pm UTC](https://www.epiusers.help/t/invalid-request-trying-to-patch-erp-bo-partsvc/71786/1 "2020-10-13T19:52:24Z")

</div>

I’m using the API help/explorer and trying to test why my REST API call isn’t working.

https://$SERVER/$INSTANCE/api/help/v1/odata/Erp.BO.PartSvc/index#!/OData/updateExt\_Part

No matter what I try (and I’ve tried including all fields, only field that changes, with and without RowMod=“U” and UD\_SysRevID being absent or being the value returned by GetByID) I keep getting a 400 error:

```
{
  "odata.error": {
    "code": "",
    "message": {
      "lang": "en-US",
      "value": "The request is invalid."
    },
    "innererror": {
      "message": "patch : An error has occurred.\r\n",
      "type": "",
      "stacktrace": ""
    }
  }
}

```

Not exactly very descriptive in telling me what went wrong!

I’m using the exact format provided in the example, which appears to be the same as an element from “Part” as returned by GetByID. The example appears to list “0” for numeric types and “string” for string types, so I’m not exactly sure if I’m missing a specific value I need to have somewhere - I’m using RowMod=“U” although I have also tried omitting it completely and setting it to the empty string.

---

<div class="post-metadata">

**Author:** ![Asz0ka](https://www.epiusers.help/letter_avatar_proxy/v4/letter/a/a698b9/32.png) [@Asz0ka](https://www.epiusers.help/u/Asz0ka)\
**Post date:** [October 13, 2020, 8:07pm UTC](https://www.epiusers.help/t/invalid-request-trying-to-patch-erp-bo-partsvc/71786/2 "2020-10-13T20:07:55Z")

</div>

Have you been able to get the call to work to update anything part related? Can you post a screen shot of your parameters you’re trying?

---

<div class="post-metadata">

**Author:** ![Epicorus](https://www.epiusers.help/user_avatar/www.epiusers.help/epicorus/32/12102_2.png) [@Epicorus](https://www.epiusers.help/u/Epicorus)\
**Post date:** [October 13, 2020, 8:26pm UTC](https://www.epiusers.help/t/invalid-request-trying-to-patch-erp-bo-partsvc/71786/3 "2020-10-13T20:26:48Z")

</div>

No, I haven’t been able to get anything to update through the API. Here’s a screenshot of one particular input:

 ![Screenshot_2020-10-13_13-23-01](https://www.epiusers.help/uploads/default/original/3X/1/5/15cbeefbdfbcc7e31ce734f3214f9f1504ef6ebf.png)

Here’s another… the web page gets a little wonky when you resize the input and wouldn’t let me scroll left, but the start of the input is visible:

 ![Screenshot_2020-10-13_13-25-45](https://www.epiusers.help/uploads/default/original/3X/e/4/e4110bb54b4dd2672f78dd455da62e88a201b919.png)

---

<div class="post-metadata">

**Author:** ![Asz0ka](https://www.epiusers.help/letter_avatar_proxy/v4/letter/a/a698b9/32.png) [@Asz0ka](https://www.epiusers.help/u/Asz0ka)\
**Post date:** [October 13, 2020, 8:34pm UTC](https://www.epiusers.help/t/invalid-request-trying-to-patch-erp-bo-partsvc/71786/4 "2020-10-13T20:34:48Z")

</div>

With the UpdateExt calls, you should only have to specify the fields you want to update (should). The “required inputs” (company and partnum text boxes) are the keys that will make sure the right thing gets updated. I would try getting any old update to go through and go from there. I was able to update a random part description with the following:

 ![image](https://www.epiusers.help/uploads/default/original/3X/6/f/6f0c1b72c6169ec6b23c0cd65d99264099a91f3f.png)

I also received an error message for this SAME exact call saying it needed a PartClass…sometimes it seems the API’s can be finicky. I refreshed the help page and it went through.

---

<div class="post-metadata">

**Author:** ![Epicorus](https://www.epiusers.help/user_avatar/www.epiusers.help/epicorus/32/12102_2.png) [@Epicorus](https://www.epiusers.help/u/Epicorus)\
**Post date:** [October 13, 2020, 8:41pm UTC](https://www.epiusers.help/t/invalid-request-trying-to-patch-erp-bo-partsvc/71786/5 "2020-10-13T20:41:53Z")

</div>

Oh wow, you’re right… guess I had stuff it _didn’t_ want. I guess this means that I also don’t need a corresponding call to retrieve the part info first just to set a checkbox. Thanks!

---

<div class="post-metadata">

**Author:** ![Asz0ka](https://www.epiusers.help/letter_avatar_proxy/v4/letter/a/a698b9/32.png) [@Asz0ka](https://www.epiusers.help/u/Asz0ka)\
**Post date:** [October 13, 2020, 8:44pm UTC](https://www.epiusers.help/t/invalid-request-trying-to-patch-erp-bo-partsvc/71786/6 "2020-10-13T20:44:24Z")

</div>

Glad you got it working! That’s the nice thing about UpdateExt calls, as long as you have the keys you’re set!
