# JobMaterials filter by quantity not working as expected

**URL:** <https://community.servicem8.com/t/jobmaterials-filter-by-quantity-not-working-as-expected/1225>\
**Category:** API & SDK\
**Created:** [October 7, 2026, 2:29am UTC](https://community.servicem8.com/t/jobmaterials-filter-by-quantity-not-working-as-expected/1225 "2026-10-07T02:29:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ed\_barwani](https://sea2.discourse-cdn.com/flex002/user_avatar/community.servicem8.com/ed_barwani/32/116_2.png) [@ed\_barwani](https://community.servicem8.com/u/ed_barwani)\
**Post date:** [October 7, 2026, 2:29am UTC](https://community.servicem8.com/t/jobmaterials-filter-by-quantity-not-working-as-expected/1225/1 "2026-10-07T02:29:16Z")

</div>

My understanding is `gt` filter is not greater than or equal. Since the API explicitly calls out `ge` not being implemented. The following curl is surprising to me. Unless I am missing something.

```auto
curl --header "x-api-key: $API_KEY" 'https://api.servicem8.com/api_1.0/jobmaterial.json?%24filter=active+eq+1+and+job_uuid+eq+%2701a11425-e078-7bf6-9cb9-5f330e02348b%27+and+quantity+gt+0' | jq .
  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
100 446 0 446 0 0 210 0 --:--:-- 0:00:02 --:--:-- 210
[
  {
    "uuid": "01a11425-fcbe-7bf6-9cb8-3ef925df48cb",
    "tax_rate_uuid": "600a36db-b00c-492c-a6a4-1e4abf0442cb",
    "quantity": "0.0000",
    "name": "Example item 001",
    "price": "20.0000",
    "active": 1,
    "displayed_amount_is_tax_inclusive": "0",
    "displayed_amount": "20.0000",
    "edit_date": "2026-10-07 13:16:36",
    "job_uuid": "01a11425-e078-7bf6-9cb9-5f330e02348b",
    "material_uuid": "01a0ccb3-fae6-7bf6-9cb8-31cfdeb78fbb",
    "sort_order": "0",
    "cost": "0.0000",
    "displayed_cost": "0.0000"
  }
]

```

In the above I use a filter where `quantity gt 0` but this returns a job material that has a quantity of 0.

---

<div class="post-metadata">

**Author:** ![Cody](https://sea2.discourse-cdn.com/flex002/user_avatar/community.servicem8.com/cody/32/52_2.png) [@Cody](https://community.servicem8.com/u/Cody)\
**Post date:** [October 8, 2026, 8:27am UTC](https://community.servicem8.com/t/jobmaterials-filter-by-quantity-not-working-as-expected/1225/2 "2026-10-08T08:27:16Z")

</div>

Hi Ed,  
To exclude zero-quantity rows, replace `quantity gt 0` with `quantity ne 0` in your existing filter. `ne` means “not equal to”, so this also includes negative quantities.  
We’ll confirm the inclusive behaviour of `gt` and `lt`, the four-decimal quantity precision, and the `quantity gt 0.0001` workaround with the team.  
Thanks,  
Cody
