BullHorn REST API返回封闭的空缺

时间:2018-07-06 05:32:32

标签: c# rest

我正在编写一个例程,以从我的客户BullHorn帐户返回一个可用空缺列表,以显示在客户网站上。

我正在使用REST API的查询方法,请参见:http://bullhorn.github.io/rest-api-docs/#query

正在使用的相关代码如下:

async Task<BullHornJobOrderResponse> GetBullHornJobsAsync(int start, int count, BullHornLoginResponse bullHornLoginResponse)
{
    var bullHornJobsUri = string.Format("{0}query/JobOrder?where=isOpen=true&fields=id,status,title,categories,skills,customText12,address,travelRequirements,employmentType,publicDescription&orderBy=-dateLastPublished&count={1}&start={2}&BhRestToken={3}", bullHornLoginResponse.restUrl, count, start, bullHornLoginResponse.BhRestToken);

    var httpJobsResponse = await httpClient.PostAsync(bullHornJobsUri, null).ConfigureAwait(false);

    if (httpJobsResponse.IsSuccessStatusCode)
    {
        var serialisedJobsContent = await httpJobsResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
        return JsonConvert.DeserializeObject<BullHornJobOrderResponse>(serialisedJobsContent);
    }

    return new BullHornJobOrderResponse()
    {
        Count = 0
    };
}

问题在于,即使我设置为'isOpen = true',我仍会返回已关闭的作业(请参见下面的屏幕截图,例如我希望不会返回的作业)

enter image description here

0 个答案:

没有答案