Slash '/' on PartNum URL Patch Rest API

I Need patch rows externally for UD table, The trouble is when the partnum have a ‘/’ I get this request.

“HttpStatus”: 404,
“ReasonPhrase”: “REST API Exception”,
“ErrorMessage”: “OData path is undefined for the request”

No Problem with this part when I call GET method.

https://myserver.com/ERP102500/api/v1/Ice.BO.UD37Svc/UD37s(COMPANY,FisicoALREPDS134041,427,TSA/KO15208-01B02L-N’,Fisico,0)

can any one help me?

Might need to url encode the part. Are you trying in swagger or code? I’d try in swagger and pass a url encoded part num and see if that works

4 Likes

Hi @Aaron_Moreng same error in Postman with url encode

https://myseecer.com/ERP102500/api/v1/Ice.BO.UD37Svc/UD37s(COMPANY%2CFisicoALREPDS134041%2C427%2CTSA%2FKO15208-01B02L-N'%2CFisico%2C0)

ALSO

https://myserver.com/ERP102500/api/v1/Ice.BO.UD37Svc/UD37s(COMPANY,FisicoALREPDS134041,427,‘TSA%2FKO15208-01B02L-N’,Fisico,0)

Are you passing a body too? I thought you had to with PATCH but it’s been a while…

Yes this is the body

{“Number05”:“1.0”,“Number01”:“11.0”}

Testing, give me a minute

You might have better luck using the Custom Methods.
This worked fine for me.

your request URL is similar but just pass the body identifying the record and the update fields you want and change your method to POST
https://{yourserver}/{instance}/api/v1/Ice.BO.UD37Svc/UpdateExt

2 Likes

Great!! works like a charm!! thank you @Aaron_Moreng

1 Like