The q parameter is one of the most useful parts of Oracle Fusion REST APIs. It lets you filter records directly from the API instead of retrieving a large result set and filtering it later in your integration layer.
It is also one of the most common reasons Fusion API calls fail.
A request that looks correct can still return an error like:
The query parameter is invalid.
or:
Invalid query expression.
or sometimes the request succeeds but the response is not filtered the way you expected.
This usually happens because Oracle Fusion REST filtering is not the same as SQL filtering. The q parameter only works with fields and operators that are supported by the specific REST resource you are calling.
This guide explains the most common reasons the q parameter fails and how to troubleshoot it correctly.
What is the q parameter in Oracle Fusion REST APIs?
The q parameter is used to filter records in Oracle Fusion REST API requests.
A simple example:
GET /hcmRestApi/resources/11.13.18.05/workers?q=PersonNumber='10001'
Another example from Financials:
GET /fscmRestApi/resources/11.13.18.05/invoices?q=InvoiceNumber='INV-1001'
The general pattern is:
q=FieldName operator value
Common operators include:
=
!=
>
<
>=
<=
Some endpoints also support operators such as LIKE, BETWEEN, or null checks, but support is not universal. You must confirm what the specific endpoint accepts.
Why the q parameter fails
Most q issues come from one of these causes:
- The field is not queryable.
- The field belongs to a child resource.
- The field name is wrong.
- The value format is wrong.
- The operator is not supported for that field.
- The filter is being applied at the wrong API level.
- The endpoint expects a finder instead of a normal
qfilter.
Let's go through each one.
1. The field is not queryable
Not every field returned by a REST API response can be used inside q.
This is one of the biggest surprises for Fusion developers.
You may see a field in the response, for example:
{
"PersonNumber": "10001",
"DisplayName": "Test Employee",
"HireDate": "2024-01-01"
}
But that does not automatically mean all three fields are valid in q.
This may work:
GET /hcmRestApi/resources/11.13.18.05/workers?q=PersonNumber='10001'
But this may fail depending on the endpoint metadata:
GET /hcmRestApi/resources/11.13.18.05/workers?q=HireDate='2024-01-01'
The response field and the queryable field list are not always the same.
How to fix it
Before writing the filter, check whether the field is queryable for that REST resource.
You can do that by reviewing the OpenAPI metadata or the Oracle REST documentation for that resource. If the field is not listed as queryable, use another field, a finder, or a lower-level child endpoint.
2. The field belongs to a child resource
This is very common with the Workers API.
For example, you may want active employee assignments only:
AssignmentType = 'E'
AssignmentStatusType = 'ACTIVE'
PrimaryFlag = true
But these fields usually belong to the worker assignment child resource, not the top-level worker resource.
This kind of request may not work as expected:
GET /hcmRestApi/resources/11.13.18.05/workers?q=AssignmentStatusType='ACTIVE'
Why?
Because /workers filters workers at the worker level. It does not always filter nested child records such as work relationships or assignments.
Even if you use expand, the q filter is still applied to the parent resource unless Oracle explicitly supports filtering the child resource in that call.
Example:
GET /hcmRestApi/resources/11.13.18.05/workers?q=PersonNumber='10001'&expand=workRelationships.assignments
This can return the worker and expand assignments, but it does not mean you can filter the assignment rows from the parent q parameter.
How to fix it
Call the child resource directly when you need child-level filtering.
The pattern is usually:
GET /hcmRestApi/resources/11.13.18.05/workers/{workersUniqID}/child/workRelationships/{workRelationshipsUniqID}/child/assignments?q=AssignmentStatusType='ACTIVE'
This is more work because you may need parent IDs first, but the filter is applied at the correct resource level.
3. The field name is wrong
Oracle Fusion REST field names are case-sensitive in many contexts.
This can fail:
q=personnumber='10001'
This is the correct style:
q=PersonNumber='10001'
The same applies to fields such as:
InvoiceNumber
BusinessUnit
PersonId
AssignmentId
DocumentType
Small spelling or casing differences can break the filter.
How to fix it
Copy the exact field name from the REST metadata or from a working response. Do not guess field names from the Fusion UI label.
For example, the UI may say:
Person Number
But the API field may be:
PersonNumber
4. The value format is wrong
String values normally need quotes.
Correct:
q=PersonNumber='10001'
Risky or invalid:
q=PersonNumber=10001
For dates, use the format expected by the API. In many cases, ISO date format is safest:
q=CreationDate>='2026-01-01'
For booleans, check the endpoint behavior. Some APIs use true/false, while others expose Y/N, flags, or lookup codes.
Examples:
q=PrimaryFlag=true
or:
q=StatusCode='Y'
The correct value depends on the field definition.
5. The operator is not supported
Developers often try SQL-style expressions in Oracle Fusion REST APIs.
For example:
q=DisplayName LIKE '%John%'
This may not work on every endpoint.
Even when LIKE works in one REST resource, it may not work in another. Oracle Fusion REST APIs are large, and behavior can vary by module and resource.
How to fix it
Start with simple equality:
q=DisplayName='John Smith'
Then test other operators only after confirming the field supports them.
If partial search is required, check whether the endpoint provides a finder that supports keyword-style search.
6. Null checks can be sensitive
Another common issue is filtering null values.
Developers may try:
q=InactiveDate is null
or:
q=InactiveDate=null
Whether this works depends on the resource and supported query syntax. Some resources support null-style filtering. Others do not.
How to fix it
Check the supported query operators for that endpoint. If null filtering is not supported, you may need to retrieve a smaller set of records using another condition, then filter null values in your integration layer.
Not perfect, but better than pulling the full dataset without any filter.
7. You may need a finder instead of q
Oracle Fusion REST APIs often expose named finders.
A finder is a predefined search pattern with specific parameters.
Example:
GET /hcmRestApi/resources/11.13.18.05/workers?finder=findByPersonId;PersonId=300000123456789
Finders can be more reliable than q when Oracle has already defined the intended search path.
If a q filter keeps failing, check whether the endpoint has a finder for the same business scenario.
Practical troubleshooting checklist
When a q filter does not work, follow this order:
- Confirm the endpoint is correct.
- Confirm the field belongs to that exact resource, not a child resource.
- Confirm the field is queryable.
- Confirm the exact field name and casing.
- Confirm the value format.
- Start with one filter condition only.
- Add additional conditions one by one.
- Check whether a finder exists.
- Test the child endpoint directly if filtering child data.
- Only filter in the integration layer after reducing the response as much as possible.
Example: Workers API q filter
A simple worker lookup:
GET /hcmRestApi/resources/11.13.18.05/workers?q=PersonNumber='10001'
If you need assignment-level conditions, do not assume this will work from the parent worker resource:
GET /hcmRestApi/resources/11.13.18.05/workers?q=AssignmentStatusType='ACTIVE'
Instead, inspect the worker child resources and test the assignments child endpoint.
Example: Invoices API q filter
A common invoice lookup:
GET /fscmRestApi/resources/11.13.18.05/invoices?q=InvoiceNumber='INV-1001'
If you need invoice attachments, use expand:
GET /fscmRestApi/resources/11.13.18.05/invoices?q=InvoiceNumber='INV-1001'&expand=attachments
But remember: expanding attachments does not mean the parent q filter can filter attachment fields.
How OPAL helps
OPAL is built for this exact workflow.
Instead of guessing the q syntax from documentation pages, OPAL lets you search Oracle Fusion REST endpoints, inspect available query fields, check finders, browse child resources, and test the request directly against your Fusion environment.
This is especially useful when working with large APIs like Workers, Invoices, Purchase Orders, Document Records, Learning, or Procurement resources.
You can download OPAL here:
Final recommendation
Do not treat the q parameter like SQL.
Treat it as a resource-specific filter syntax.
The safest approach is:
- Check the exact REST resource.
- Check the queryable fields.
- Avoid filtering child data from the parent endpoint.
- Use finders when available.
- Test small filters first.
This will save a lot of time and reduce unnecessary trial and error in Postman or integration tools.
This post is part of our complete Oracle HCM API guide — base URLs, authentication, q filters, finders, key endpoints, and common errors in one place.
Originally published at opalapi.dev.
Top comments (0)