Unfortunately, this is not possible using the Shopify REST API as tracking_number is not a filterable field.
However, you can do this if you install the ‘API Blazor’ app in your Shopify store. This provides an almost identical API to the Shopify REST API and also offers more flexibility and faster access to your data.
In your case, we provide the additional ‘has_tracking_number’ field that you can use to filter the orders, so your call would look something like:
curl -X GET "https://myshop.apiblazor.com/admin/api/2022-10/api/orders.json?fulfillment_status=shipped&has_tracking_number=false" -H "X-Shopify-Access-Token: my_api_blazor_token"