json - API SearchFind Returns Empty items Array Despite Correct Filter Configuration - Stack Overflow

I'm working with the Tenderland API (endpoint: POST ) to retrieve the tender_name based on a speci

I'm working with the Tenderland API (endpoint: POST ) to retrieve the tender_name based on a specific tender_id. However, despite configuring the request with what I believe is a valid filter, the API consistently returns an empty items array. Here's the details of my setup:

{
  "fields": ["tender_name"],
  "filters": {
    "logic": "and",
    "filters": [
      {
        "id": 1001,
        "name": "tender_id",
        "type": "text",
        "include": "TL1507087980"
      }
    ]
  },
  "pagesize": 1,
  "skip": 0
}

URL: ={apikey} Method: POST Headers: Content-Type: application/json

Response:

{
  "id": 1282901212,
  "createDate": "2025-03-25T19:00:00.0000000Z",
  "totalCount": 61678233,
  "items": []
}

What I've Tried: Verified Field IDs: According to the API's field list, tender_id has Id: 1001 and is marked as searchable (IsSearchField: true). Checked tender_id Format: I'm using TL1507087980 as the identifier, assuming it's a valid tender_id (it follows the TL* pattern I've seen in examples).

Tested Syntax Variations: I tried both "filters": {"and": [...]} and "filters": {"logic": "and", "filters": [...]} syntaxes, but the result is the same.

Added Pagination: Included pagesize: 1 and skip: 0 to limit the response, but still no items. Observations:

The totalCount is very large (over 61 million), suggesting the filter isn't being applied, and the API is returning an empty subset of the full database. No error messages are returned, just an empty items array.

Is there something wrong with my filter configuration?

BY the way, i found the example of correct request:

POST 
{
 "fields": [
 "tender_regNumber",
 "tender_name",
 "tender_beginPrice"
 ],
 "filters": {
 "and": [
 {
 "id": 101,
 "name": "file_content",
 "type": "text",
 "exclude": "",
 "include": "поставк++оборуд"
 },
 {
 "id": 110,
 "name": "tender_publishDate",
 "type": "range",
 "from": "2022-01-01 ",
 "to": "2022-03-01"
 }
 ]
 }
}

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744174714a4561697.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信