Skip to content

Commit 6c29be0

Browse files
author
Kevin Harper
committed
added note about REST params
1 parent bb11a7a commit 6c29be0

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

guides/v2.0/rest/notes.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
layout: default
3+
group: rest
4+
subgroup: A_rest
5+
title: Notes
6+
menu_title: Notes
7+
menu_order: 6
8+
version: 2.0
9+
github_link: rest/notes.md
10+
11+
---
12+
13+
## Parameters in URLs
14+
15+
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.
16+
17+
For example:
18+
19+
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://magento.loc/customer/1`), and a body of `{ “id”: 2, “attr”: “value” }`, the customer with ID of `1` will be modified.
20+
21+
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.
22+
23+
## Related topics
24+
[Search using REST APIs]({{ site.gdeurl }}howdoi/webapi/search-criteria.html)

0 commit comments

Comments
 (0)