Is this intended behavior?
When I make the following API request...
/customers/get/code/0
I expected to get a 404 or similar error, but instead I get back a list of all my customers.
I stumbled onto this during testing, when I inadvertently made a
request for a single customer with an invalid customer code. If
this is expected behavior, then I need to make doubly sure I don't
pass in a customer code of 0
.
Discussions are closed to public comments.
If you need help with Cheddar please
start a new discussion.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Marc Guyer on 13 Mar, 2013 01:23 PM
Hi Frank -- That is known behavior but not intended. In fact, requests to
customers/get
without a customercode
orid
param will soon be deprecated. Acustomers/get
empty request (or one with a a0
or empty value forcode
orid
) will return an error. Anything else will be redirected to the newcustomers/search
.2 Posted by Frank Koehl on 13 Mar, 2013 02:54 PM
So
customers/search
is replacingcustomers/get
?Support Staff 3 Posted by Marc Guyer on 13 Mar, 2013 08:37 PM
Yes, but only when the request does not include a
code
orid
param. In effect, we're keepingcustomers/get
only for single customer requests. Any multiple customer requests will be directed tocustomers/search
.4 Posted by Frank Koehl on 14 Mar, 2013 03:06 PM
Gotcha, makes sense. Thanks for clearing that up.
Dean closed this discussion on 14 Mar, 2013 03:13 PM.