Filtering Userdefinedfields using REFIT API Library

  Kiến thức lập trình

I am new to Refit Library and having an issue filtering data using UserDefinedFields.

below is an example data;

{
  "items": [
    {
      "id": 0,
      "companyName": "AmeriGas Cons",
      "isDefault": true,
      "lastActivityDate": "2023-08-07T02:52:57.12Z",
      "ResourceID": 29682886,
      "userDefinedFields": [
        {
          "name": "Cons Elec",
          "value": null
        },
        {
          "name": "Partner GID",
          "value": null
        }
      ]
    },
    {
      "id": 174,
      "companyName": "Janssen CoaocoStar,Inc.",
      "isDefault": true,
      "lastActivityDate": "2024-07-11T16:52:15.95Z",
      "ResourceID": 29682886,
      "userDefinedFields": [
        {
          "name": "Janssen Electronic",
          "value": "12560.0000"
        },
        {
          "name": "Referral GID",
          "value": null
        }
      ]
    }
  ]
}

i have tried to create an interface with

[Post("/{routes}/query")]
[Headers("UserName: Name", "Key: **************", "ApiIntegrationcode: *******************")]
Task<string> GetDataByUDFAsync(string routes, [Query] string udfFields = null, [Query] string query = null );

where;
routes: is the table
udfFields are fields used on filtering
query is the condition (i.e item eq ‘ABC’)

this results to an error 500

New contributor

albert Cjr is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT