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.

  1. Hi Frank -- That is known behavior but not intended. In fact, requests to customers/get without a customer code or id param will soon be deprecated. A customers/get empty request (or one with a a 0 or empty value for code or id) will return an error. Anything else will be redirected to the new customers/search.

  2. So customers/search is replacing customers/get?

  3. Yes, but only when the request does not include a code or id param. In effect, we're keeping customers/get only for single customer requests. Any multiple customer requests will be directed to customers/search.

  4. Gotcha, makes sense. Thanks for clearing that up.

  5. Dean closed this discussion on 14 Mar, 2013 03:13 PM.

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

Recent Discussions