Magento 2.1.18 is the final 2.1.x release. After June 2019, Magento 2.1.x will no longer receive security patches, quality fixes, or documentation updates.
To maintain your site's performance, security, and PCI compliance, upgrade to the latest version of Magento.

Parameters in URLs

In a REST call, a user could potentially specify one ID in the URL and another in the request body. Whenever this type of conflict occurs, Magento uses the value specified in the URL.

For example:

The REST URL to update a customer is <route url="/V1/customers/:id" method="PUT">. If you specify a ID value of 1 in the URL (http://<host>/rest/<store_code>/V1/customers/1), and a body of { "customer": { "id": 2, "attr": "value" }}, the customer with ID of 1 will be modified.

This applies to all REST APIs where a parameter is passed in the URL. Anything specified in the request body with the same parameter name as the URL will be ignored.

Search using REST APIs

Updated