Bird
0
0

You want to get all orders placed after January 1, 2023, and with status 'shipped'. Which query parameters would you use?

hard📝 Application Q8 of 15
Rest API - URL and Resource Design

You want to get all orders placed after January 1, 2023, and with status 'shipped'. Which query parameters would you use?

Adate_gt=2023-01-01&status=shipped
Bdate_lt=2023-01-01&status=shipped
Cstatus=shipped&date=2023-01-01
Ddate=after2023-01-01&status=shipped
Step-by-Step Solution
Solution:
  1. Step 1: Interpret 'placed after January 1, 2023'

    The suffix '_gt' means 'greater than', so date_gt=2023-01-01 filters dates after that day.
  2. Step 2: Combine with status filter

    Status=shipped filters orders with shipped status; both combined give correct filtering.
  3. Final Answer:

    date_gt=2023-01-01&status=shipped -> Option A
  4. Quick Check:

    _gt means greater than filter [OK]
Quick Trick: _gt means greater than for date filters [OK]
Common Mistakes:
MISTAKES
  • Using _lt instead of _gt for after date
  • Incorrect date format
  • Misplacing parameters order

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes