REST API>>PATCH record with multiple fields in main key
Paul Timms
2020-09-02
Operating system: Windows
Using the REST API, is it possible to PATCH a record which has multiple fields in its main key? An example is DelAddrVc, whose main key consists of CustCode and DelCode. Looking at the manual, PATCHing a record requires the record "identifier" to be inside the URI, per the example below:


http://hostname.domain.top:web_port/api/1/IVVc/10000014?set_row_field.0.Quant=100

In UK sample data for example, I would like to PATCH delivery address with DelCode 001/1 for CustCode 001. (This might uncover another interesting point - what happens when the code contains a / ?)
Carolina Valentino
2020-09-04
thanks to contact us, We ll answer you soon
Swati D.
2020-09-15
Hi Paul

We are still waiting to get you a response, thanks for your patience


Swati 15.9
Omar Dottin
2020-09-15
Hi Paul, yes it is. Please url encode segments and separate with /

Example: api/1/xxvc/001/001%2f1 if custcode is 1st segment



Hope this helps. Thanks!

Best Regards,
Omar
David Delač
2020-09-15
Hi Paul,

Like Omar has mentioned this can be done. Example:

url = "http://hostname.domain.top:web_port/api/1/MyVc/" & UrlEncode("001/1") & "/" & UrlEncode("Bla/Bla/Bla");

Best Regards,
David D.
Swati D.
2020-09-17
Hi Paul

PLease let me know if this was answered ton your satisfaction and we can now close this query

Many thanks

Swati 16.9
Paul Timms
2020-09-21
Thanks, that's very helpful.
Paul Timms
2020-09-21
Maybe this should be added to the REST API documentation?
Swati D.
2020-09-22
HI Paul

Thats a good suggestion. I will pass that on to the PMs

Thanks

Swati 22.9
Leave Comment
You can subscribe to notifications for this post by selecting the 'star' icon on the top right corner of the post.
Back to the list
Latest Posts
Hi Andis, The issue occurs because your live server uses an internal or self-signed SSL certificate, which Hansa server does not trust. This is expected behavior — certificate validation ensures s...
10:38 11 Nov 2025
Hi again, do we know what it's trying to download, if we download it, it may make the message go away? Thanks...
11:16 30 Oct 2025