Skip to content

Filtering

This page documents how to filter the public inquiry list and positions (order needs) endpoints.

Both endpoints are under auth:api and require Authorization: Bearer <token>. Filtering is done using query parameters, allowing you to combine multiple conditions in a single request.


Query Parameters

Available Filter Parameters (for positions)

Parameter Type Description
title string Filter by job title (partial match)
stage string Filter by stage (e.g., open, cancelled, done)
experience_level string Filter by experience level (e.g., Junior, Intermediate, Senior)
location string Filter by location
is_remote_work string Filter by remote option (yes or no)
language_reqs string Filter by required language

⚠️ Not all filters may be supported in all endpoints. Refer to OpenAPI spec or test the endpoint.


How filtering is applied

  • positions (GET /api/public/inquiry/{orderId}/positions)

    • Filters are applied directly in the database via Eloquent queries and the endpoint returns an Eloquent paginator.
  • inquiries (GET /api/public/inquiries)

    • Combines order-level filters (free-text, industry) and need-level filters.
    • Need-level filters run against the order_needs table to find matching order_ids;

Example Requests

For Positions

Filter by stage

curl -s -X GET "http://127.0.0.1:8000/api/public/inquiry/1/positions?stage=cancelled" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Accept: application/json" | jq

Filter by experience_level

curl -s -X GET "http://127.0.0.1:8000/api/public/inquiry/1/positions?experience_level=Intermediate" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Accept: application/json" | jq

Filter by is_remote_work

curl -s -X GET "http://127.0.0.1:8000/api/public/inquiry/1/positions?is_remote_work=no" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Accept: application/json" | jq

For Inquiries

Fliter by stage

curl -s -X GET "http://127.0.0.1:8000/api/public/inquiries?stage=pending" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Accept: application/json" | jq

Filter by industry

curl -s -X GET "http://127.0.0.1:8000/api/public/inquiries?industry=Software" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Accept: application/json" | jq

Example Responses (sample shapes)

Positions


{
    "current_page": 1,
    "data": [ /* array of position objects */ ],
    "per_page": 5,
    "total": 12,
    "last_page": 3
}

Inquiries

{
    "total": 7,
    "per_page": 10,
    "current_page": 1,
    "last_page": 1,
    "from": 1,
    "to": 7,
    "orders": [ /* array of inquiry summary objects */ ]
}

Notes and Tips

  • Dates may be provided as YYYY-MM-DD or full datetime; the implementation uses whereDate.
  • To avoid jq parse errors, pipe only the JSON body (use curl -s, not -i).
  • Because inquiries applies some filtering in-memory, it is functionally correct but may be less efficient than fully DB-driven filtering for very large datasets.