I am trying to run a PATCH through the REST GUI for PriceLstPartsSrv::PLPartBrks(‘{Company}’,‘{ListCode}’,‘{PartNum}’,{Quantity},‘{UOMCode}’) and keep getting a 400 response (posted below).
The connection is super basic, as I’m only trying to update a price for a particular list/part/qty. When running PATCH for other services (e.g. Ship Via to update a single description) I have no issues. Below are the responses from the REST GUI. Are you able to run a PATCH to update an individual price for an individual list/part/qty? Any ideas?
curl
curl -X PATCH “https://our_server/pilot700/api/v2/odata/GLCT/Erp.BO.PriceLstPartsSvc/PLPartBrks(‘GLCT’,‘MFGCINST’,‘811-63786-1000’,2,‘EA’)” -H “accept: application/json” -H “X-API-Key: ourapikey” -H “Content-Type: application/json” -H “Authorization: Bearer ourauthorizationbearer” -d “{ "UnitPrice": 68.99}”
Request URL
https://our_server/pilot700/api/v2/odata/GLCT/Erp.BO.PriceLstPartsSvc/PLPartBrks(‘GLCT’,‘MFGCINST’,‘811-63786-1000’,2,‘EA’)
Response
{
“HttpStatus”: 400,
“ReasonPhrase”: “REST API Exception”,
“ErrorMessage”: “Create not allowed.”,
“ErrorType”: “Ice.Common.BusinessObjectException”,
“ErrorDetails”: [
{
“Message”: “Create not allowed.”,
“Type”: “Error”,
“Table”: “PLPartBrk”,
“Program”: “Epicor.RESTApi.dll”,
“Method”: “ThrowUpdateExtException”,
“ColumnNumber”: 17,
“LineNumber”: 48
}
],
“CorrelationId”: “56db7d7d-01b1-400f-aadc-b22bd7c3087c”
}
Response Headers
access-control-allow-credentials: true
access-control-allow-origin: https://ourserver
access-control-expose-headers: ContextHeader
cache-control: private
content-length: 381
content-type: application/json; charset=utf-8
date: Thu16 Jun 2022 14:46:26 GMT
server: Microsoft-IIS/10.0
x-aspnet-version: 4.0.30319