Skip to content

Latest commit

 

History

History
516 lines (433 loc) · 149 KB

File metadata and controls

516 lines (433 loc) · 149 KB

Jobs

(ats.jobs)

Overview

Available Operations

list

List Jobs

Example Usage

from apideck_unify import Apideck
import os


with Apideck(
    consumer_id="test-consumer",
    app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
    api_key=os.getenv("APIDECK_API_KEY", ""),
) as apideck:

    res = apideck.ats.jobs.list(raw=False, service_id="salesforce", limit=20, pass_through={
        "search": "San Francisco",
    }, fields="id,updated_at")

    while res is not None:
        # Handle items

        res = res.next()

Parameters

Parameter Type Required Description Example
raw Optional[bool] Include raw response. Mostly used for debugging purposes
consumer_id Optional[str] ID of the consumer which you want to get or push data from test-consumer
app_id Optional[str] The ID of your Unify application dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX
service_id Optional[str] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. salesforce
cursor OptionalNullable[str] Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response.
limit Optional[int] Number of results to return. Minimum 1, Maximum 200, Default 20
pass_through Dict[str, Any] Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads {
"search": "San Francisco"
}
fields OptionalNullable[str] The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: fields=name,email,addresses.city

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.
id,updated_at
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.AtsJobsAllResponse

Errors

Error Type Status Code Content Type
models.BadRequestResponse 400 application/json
models.UnauthorizedResponse 401 application/json
models.PaymentRequiredResponse 402 application/json
models.NotFoundResponse 404 application/json
models.UnprocessableResponse 422 application/json
models.APIError 4XX, 5XX */*

create

Create Job

Example Usage

import apideck_unify
from apideck_unify import Apideck
from datetime import date
import os


with Apideck(
    consumer_id="test-consumer",
    app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
    api_key=os.getenv("APIDECK_API_KEY", ""),
) as apideck:

    res = apideck.ats.jobs.create(raw=False, service_id="salesforce", slug="ceo", title="CEO", sequence=3, visibility=apideck_unify.Visibility.INTERNAL, status=apideck_unify.JobStatus.COMPLETED, code="123-OC", language="EN", employment_terms=apideck_unify.EmploymentTerms.FULL_TIME, experience="Director/ Vice President", location="San Francisco", remote=True, requisition_id="abc123", department={
        "name": "R&D",
        "code": "2",
        "description": "R&D",
        "pass_through": [
            {
                "service_id": "<id>",
                "extend_paths": [
                    {
                        "path": "$.nested.property",
                        "value": {
                            "TaxClassificationRef": {
                                "value": "EUC-99990201-V1-00020000",
                            },
                        },
                    },
                ],
            },
        ],
    }, branch={
        "name": "HQ NY",
    }, recruiters=[
        "a0d636c6-43b3-4bde-8c70-85b707d992f4",
    ], hiring_managers=[
        "123456",
    ], followers=[
        "a0d636c6-43b3-4bde-8c70-85b707d992f4",
        "a98lfd96-43b3-4bde-8c70-85b707d992e6",
    ], description="A description", blocks=[
        {
            "title": "string",
            "content": "string",
        },
    ], closing="The closing section of the job description", closing_date=date.fromisoformat("2020-10-30"), salary={
        "min": 8000,
        "max": 10000,
        "currency": apideck_unify.Currency.USD,
        "interval": "year",
    }, links=[
        {
            "type": apideck_unify.JobType.JOB_PORTAL,
            "url": "https://app.intercom.io/contacts/12345",
        },
    ], confidential=False, available_to_employees=False, tags=[
        "New",
    ], addresses=[
        {
            "id": "123",
            "type": apideck_unify.Type.PRIMARY,
            "string": "25 Spring Street, Blackburn, VIC 3130",
            "name": "HQ US",
            "line1": "Main street",
            "line2": "apt #",
            "line3": "Suite #",
            "line4": "delivery instructions",
            "line5": "Attention: Finance Dept",
            "street_number": "25",
            "city": "San Francisco",
            "state": "CA",
            "postal_code": "94104",
            "country": "US",
            "latitude": "40.759211",
            "longitude": "-73.984638",
            "county": "Santa Clara",
            "contact_name": "Elon Musk",
            "salutation": "Mr",
            "phone_number": "111-111-1111",
            "fax": "122-111-1111",
            "email": "elon@musk.com",
            "website": "https://elonmusk.com",
            "notes": "Address notes or delivery instructions.",
            "row_version": "1-12345",
        },
    ], custom_fields=[
        {
            "id": "2389328923893298",
            "name": "employee_level",
            "description": "Employee Level",
            "value": "Uses Salesforce and Marketo",
        },
    ], deleted=True, owner_id="54321")

    assert res.create_job_response is not None

    # Handle response
    print(res.create_job_response)

Parameters

Parameter Type Required Description Example
raw Optional[bool] Include raw response. Mostly used for debugging purposes
consumer_id Optional[str] ID of the consumer which you want to get or push data from test-consumer
app_id Optional[str] The ID of your Unify application dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX
service_id Optional[str] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. salesforce
slug OptionalNullable[str] N/A ceo
title OptionalNullable[str] The job title of the person. CEO
sequence Optional[int] Sequence in relation to other jobs. 3
visibility Optional[models.Visibility] The visibility of the job internal
status Optional[models.JobStatus] The status of the job. completed
code Optional[str] The code of the job. 123-OC
language OptionalNullable[str] language code according to ISO 639-1. For the United States - EN EN
employment_terms OptionalNullable[models.EmploymentTerms] N/A full-time
experience Optional[str] Level of experience required for the job role. Director/ Vice President
location OptionalNullable[str] Specifies the location for the job posting. San Francisco
remote OptionalNullable[bool] Specifies whether the posting is for a remote job. true
requisition_id Optional[str] A job's Requisition ID (Req ID) allows your organization to identify and track a job based on alphanumeric naming conventions unique to your company's internal processes. abc123
department Optional[models.DepartmentInput] N/A
branch Optional[models.JobBranch] Details of the branch for which the job is created. {
"id": "123",
"name": "HQ NY"
}
recruiters List[str] The recruiter is generally someone who is tasked to help the hiring manager find and screen qualified applicant [
"a0d636c6-43b3-4bde-8c70-85b707d992f4"
]
hiring_managers List[str] N/A [
"123456"
]
followers List[str] N/A [
"a0d636c6-43b3-4bde-8c70-85b707d992f4",
"a98lfd96-43b3-4bde-8c70-85b707d992e6"
]
description OptionalNullable[str] A description of the object. A description
description_html OptionalNullable[str] The job description in HTML format
blocks List[models.Blocks] N/A [
{
"title": "string",
"content": "string"
}
]
closing OptionalNullable[str] N/A The closing section of the job description
closing_html OptionalNullable[str] The closing section of the job description in HTML format
closing_date datetime N/A 2020-10-30
salary Optional[models.Salary] N/A
url OptionalNullable[str] : warning: ** DEPRECATED **: This field is deprecated and may be removed in a future version..

URL of the job description
job_portal_url OptionalNullable[str] : warning: ** DEPRECATED **: This field is deprecated and may be removed in a future version..

URL of the job portal
record_url OptionalNullable[str] : warning: ** DEPRECATED **: This field is deprecated and may be removed in a future version.. https://app.intercom.io/contacts/12345
links List[models.JobLinks] N/A
confidential Optional[bool] N/A false
available_to_employees Optional[bool] Specifies whether an employee of the organization can apply for the job. false
tags List[str] N/A [
"New"
]
addresses List[models.Address] N/A
custom_fields List[models.CustomField] N/A
deleted OptionalNullable[bool] Flag to indicate if the object is deleted. true
owner_id OptionalNullable[str] N/A 54321
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.AtsJobsAddResponse

Errors

Error Type Status Code Content Type
models.BadRequestResponse 400 application/json
models.UnauthorizedResponse 401 application/json
models.PaymentRequiredResponse 402 application/json
models.NotFoundResponse 404 application/json
models.UnprocessableResponse 422 application/json
models.APIError 4XX, 5XX */*

get

Get Job

Example Usage

from apideck_unify import Apideck
import os


with Apideck(
    consumer_id="test-consumer",
    app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
    api_key=os.getenv("APIDECK_API_KEY", ""),
) as apideck:

    res = apideck.ats.jobs.get(id="<id>", service_id="salesforce", raw=False, fields="id,updated_at")

    assert res.get_job_response is not None

    # Handle response
    print(res.get_job_response)

Parameters

Parameter Type Required Description Example
id str ✔️ ID of the record you are acting upon.
consumer_id Optional[str] ID of the consumer which you want to get or push data from test-consumer
app_id Optional[str] The ID of your Unify application dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX
service_id Optional[str] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. salesforce
raw Optional[bool] Include raw response. Mostly used for debugging purposes
fields OptionalNullable[str] The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: fields=name,email,addresses.city

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.
id,updated_at
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.AtsJobsOneResponse

Errors

Error Type Status Code Content Type
models.BadRequestResponse 400 application/json
models.UnauthorizedResponse 401 application/json
models.PaymentRequiredResponse 402 application/json
models.NotFoundResponse 404 application/json
models.UnprocessableResponse 422 application/json
models.APIError 4XX, 5XX */*

update

Update Job

Example Usage

import apideck_unify
from apideck_unify import Apideck
from datetime import date
import os


with Apideck(
    consumer_id="test-consumer",
    app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
    api_key=os.getenv("APIDECK_API_KEY", ""),
) as apideck:

    res = apideck.ats.jobs.update(id="<id>", service_id="salesforce", raw=False, slug="ceo", title="CEO", sequence=3, visibility=apideck_unify.Visibility.INTERNAL, status=apideck_unify.JobStatus.COMPLETED, code="123-OC", language="EN", employment_terms=apideck_unify.EmploymentTerms.FULL_TIME, experience="Director/ Vice President", location="San Francisco", remote=True, requisition_id="abc123", department={
        "name": "R&D",
        "code": "2",
        "description": "R&D",
        "pass_through": [
            {
                "service_id": "<id>",
                "extend_paths": [
                    {
                        "path": "$.nested.property",
                        "value": {
                            "TaxClassificationRef": {
                                "value": "EUC-99990201-V1-00020000",
                            },
                        },
                    },
                ],
            },
        ],
    }, branch={
        "name": "HQ NY",
    }, recruiters=[
        "a0d636c6-43b3-4bde-8c70-85b707d992f4",
    ], hiring_managers=[
        "123456",
    ], followers=[
        "a0d636c6-43b3-4bde-8c70-85b707d992f4",
        "a98lfd96-43b3-4bde-8c70-85b707d992e6",
    ], description="A description", blocks=[
        {
            "title": "string",
            "content": "string",
        },
    ], closing="The closing section of the job description", closing_date=date.fromisoformat("2020-10-30"), salary={
        "min": 8000,
        "max": 10000,
        "currency": apideck_unify.Currency.USD,
        "interval": "year",
    }, links=[
        {
            "type": apideck_unify.JobType.JOB_PORTAL,
            "url": "https://app.intercom.io/contacts/12345",
        },
    ], confidential=False, available_to_employees=False, tags=[
        "New",
    ], addresses=[
        {
            "id": "123",
            "type": apideck_unify.Type.PRIMARY,
            "string": "25 Spring Street, Blackburn, VIC 3130",
            "name": "HQ US",
            "line1": "Main street",
            "line2": "apt #",
            "line3": "Suite #",
            "line4": "delivery instructions",
            "line5": "Attention: Finance Dept",
            "street_number": "25",
            "city": "San Francisco",
            "state": "CA",
            "postal_code": "94104",
            "country": "US",
            "latitude": "40.759211",
            "longitude": "-73.984638",
            "county": "Santa Clara",
            "contact_name": "Elon Musk",
            "salutation": "Mr",
            "phone_number": "111-111-1111",
            "fax": "122-111-1111",
            "email": "elon@musk.com",
            "website": "https://elonmusk.com",
            "notes": "Address notes or delivery instructions.",
            "row_version": "1-12345",
        },
    ], custom_fields=[
        {
            "id": "2389328923893298",
            "name": "employee_level",
            "description": "Employee Level",
            "value": "Uses Salesforce and Marketo",
        },
    ], deleted=True, owner_id="54321")

    assert res.update_job_response is not None

    # Handle response
    print(res.update_job_response)

Parameters

Parameter Type Required Description Example
id str ✔️ ID of the record you are acting upon.
consumer_id Optional[str] ID of the consumer which you want to get or push data from test-consumer
app_id Optional[str] The ID of your Unify application dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX
service_id Optional[str] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. salesforce
raw Optional[bool] Include raw response. Mostly used for debugging purposes
slug OptionalNullable[str] N/A ceo
title OptionalNullable[str] The job title of the person. CEO
sequence Optional[int] Sequence in relation to other jobs. 3
visibility Optional[models.Visibility] The visibility of the job internal
status Optional[models.JobStatus] The status of the job. completed
code Optional[str] The code of the job. 123-OC
language OptionalNullable[str] language code according to ISO 639-1. For the United States - EN EN
employment_terms OptionalNullable[models.EmploymentTerms] N/A full-time
experience Optional[str] Level of experience required for the job role. Director/ Vice President
location OptionalNullable[str] Specifies the location for the job posting. San Francisco
remote OptionalNullable[bool] Specifies whether the posting is for a remote job. true
requisition_id Optional[str] A job's Requisition ID (Req ID) allows your organization to identify and track a job based on alphanumeric naming conventions unique to your company's internal processes. abc123
department Optional[models.DepartmentInput] N/A
branch Optional[models.JobBranch] Details of the branch for which the job is created. {
"id": "123",
"name": "HQ NY"
}
recruiters List[str] The recruiter is generally someone who is tasked to help the hiring manager find and screen qualified applicant [
"a0d636c6-43b3-4bde-8c70-85b707d992f4"
]
hiring_managers List[str] N/A [
"123456"
]
followers List[str] N/A [
"a0d636c6-43b3-4bde-8c70-85b707d992f4",
"a98lfd96-43b3-4bde-8c70-85b707d992e6"
]
description OptionalNullable[str] A description of the object. A description
description_html OptionalNullable[str] The job description in HTML format
blocks List[models.Blocks] N/A [
{
"title": "string",
"content": "string"
}
]
closing OptionalNullable[str] N/A The closing section of the job description
closing_html OptionalNullable[str] The closing section of the job description in HTML format
closing_date datetime N/A 2020-10-30
salary Optional[models.Salary] N/A
url OptionalNullable[str] : warning: ** DEPRECATED **: This field is deprecated and may be removed in a future version..

URL of the job description
job_portal_url OptionalNullable[str] : warning: ** DEPRECATED **: This field is deprecated and may be removed in a future version..

URL of the job portal
record_url OptionalNullable[str] : warning: ** DEPRECATED **: This field is deprecated and may be removed in a future version.. https://app.intercom.io/contacts/12345
links List[models.JobLinks] N/A
confidential Optional[bool] N/A false
available_to_employees Optional[bool] Specifies whether an employee of the organization can apply for the job. false
tags List[str] N/A [
"New"
]
addresses List[models.Address] N/A
custom_fields List[models.CustomField] N/A
deleted OptionalNullable[bool] Flag to indicate if the object is deleted. true
owner_id OptionalNullable[str] N/A 54321
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.AtsJobsUpdateResponse

Errors

Error Type Status Code Content Type
models.BadRequestResponse 400 application/json
models.UnauthorizedResponse 401 application/json
models.PaymentRequiredResponse 402 application/json
models.NotFoundResponse 404 application/json
models.UnprocessableResponse 422 application/json
models.APIError 4XX, 5XX */*

delete

Delete Job

Example Usage

from apideck_unify import Apideck
import os


with Apideck(
    consumer_id="test-consumer",
    app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
    api_key=os.getenv("APIDECK_API_KEY", ""),
) as apideck:

    res = apideck.ats.jobs.delete(id="<id>", service_id="salesforce", raw=False)

    assert res.delete_job_response is not None

    # Handle response
    print(res.delete_job_response)

Parameters

Parameter Type Required Description Example
id str ✔️ ID of the record you are acting upon.
consumer_id Optional[str] ID of the consumer which you want to get or push data from test-consumer
app_id Optional[str] The ID of your Unify application dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX
service_id Optional[str] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. salesforce
raw Optional[bool] Include raw response. Mostly used for debugging purposes
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.AtsJobsDeleteResponse

Errors

Error Type Status Code Content Type
models.BadRequestResponse 400 application/json
models.UnauthorizedResponse 401 application/json
models.PaymentRequiredResponse 402 application/json
models.NotFoundResponse 404 application/json
models.UnprocessableResponse 422 application/json
models.APIError 4XX, 5XX */*