Is this intended behavior?

Frank  Koehl's Avatar

Frank Koehl

13 Mar, 2013 01:12 PM

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. Support Staff 1 Posted by Marc Guyer on 13 Mar, 2013 01:23 PM

    Marc Guyer's Avatar

    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. 2 Posted by Frank Koehl on 13 Mar, 2013 02:54 PM

    Frank  Koehl's Avatar

    So customers/search is replacing customers/get?

  3. Support Staff 3 Posted by Marc Guyer on 13 Mar, 2013 08:37 PM

    Marc Guyer's Avatar

    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. 4 Posted by Frank Koehl on 14 Mar, 2013 03:06 PM

    Frank  Koehl's Avatar

    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

28 Mar, 2024 10:45 PM
24 Jan, 2024 08:33 AM
11 Jan, 2024 07:13 AM
30 Nov, 2023 02:07 AM
22 Nov, 2023 08:41 AM