Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Job Listing API fetches Trashed jobs #87

Open
maruhgar opened this issue Mar 30, 2023 · 0 comments
Open

Job Listing API fetches Trashed jobs #87

maruhgar opened this issue Mar 30, 2023 · 0 comments

Comments

@maruhgar
Copy link

We are trying to list active jobs from our Freshteam account in our website. We have followed the instructions and are able to fetch jobs, but they are jobs which are in Trash..

If you see the API documentation, and specifically query parameters for the job listing, you see status - can be one of draft, published, internal, private, on_hold, closed. There is nodeleted query parameter - to filter by deleted != true

We raised a Support ticket with Freshteam #124126 12 days back. They said today

It is developed by the marketplace team. In this SDK there is no delete query param itself. So we request you to raise a support ticket in the developer community so that it will be handled by them. Or you can raise an issue in the GitHub repo:

Can we please add this? Here is the failing code snippet - pretty much from the documentation.

const { Freshteam } = require("@freshworks/api-sdk");

const ft = new Freshteam(`${process.env.FRESHTEAM_DOMAIN}.freshteam.com`, process.env.FRESHTEAM_API_KEY);

const getJobs = async () => {
    let obj = {
        status: ["published"]
    };
    try {
        const resp = await ft.jobPostings.list(obj);
        const jobs = await resp.json();
        console.log(jobs);
    } catch (err) {
        console.log(err);
    }
}
const allJobs = getJobs();

output.txt

trash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant