Traffit

Sign up for API updates email newsletter - Sign up

Overview

In Traffit we are sharing two types of API.

1. Public API

2. Integration API

Public API which are unauthorized endpoints that are safe to expose (like published job posts).

Integration API where you need to provide access-token

Public API

Get job posts published

GET https://www.<your_traffit_name>.traffit.com/public/job_posts/published
RequestsGet paginated results

Example CURL:

curl -X GET 'https://<your_traffit_name>.traffit.com/public/job_posts/published' \
            -H 'X-Request-Page-Size: 2' \
            -H 'X-Request-Current-Page: 1' \
            -H 'X-Request-Filter: {"job_post_id": {"value": "3", "comparison": "="}}' \
            -H 'X-Request-Sort: {"sort_by":"id", "direction": "ASC"}'
Headers
Content-Type: application/json
X-Request-Page-Size: 2
X-Request-Current-Page: 1
X-Request-Sort: {"sort_by":id", "direction": "ASC"}
X-Request-Filter: {"job_post_id": { "value": "3", "comparison": "="} }
Responses200400
Headers
Content-Type: application/json
Body
[
  {
    "id": 2,
    "advert": {
      "id": 11,
      "values": [
        {
          "field_id": "description",
          "value": "<p>Some description</p>"
        },
        {
          "field_id": "geolocation",
          "value": "{\"latitude\":\"40.703870\",\"longitude\":\"-74.013854\",\"locality\":\"New York\",\"iso\":\"us\",\"region1\":\"New York\",\"postcode\":\"10004\",\"country\":\"United States\"}"
        }
      ],
      "name": "Dr. Drake Ramoray vol.2",
      "recruitment": {
        "id": 13,
        "nr_ref": "/33/07/2020/NfT"
      },
      "language": "en"
    },
    "url": "http://<your_traffit_name>.traffit.com/public/an/NVRnPQ==",
    "valid_start": "2021-05-18 09:30:00",
    "valid_end": "2021-06-17 09:30:00",
    "awarded": false,
    "options": {
      "job_type": "Temporary",
      "job_location": "{\"latitude\":\"40.703870\",\"longitude\":\"-74.013854\",\"locality\":\"New York\",\"iso\":\"us\",\"region1\":\"New York\",\"postcode\":\"10004\",\"country\":\"United States\"}",
      "branches": "Arts",
      "emp_number": "1",
      "recruitment_deadline": "2021/05/31",
      "note": "some note from recruiter",
      "job_type.translation": "Job type",
      "job_location.translation": "Job location",
      "branches.translation": "Industry",
      "emp_number.translation": "Number of vacancies",
      "recruitment_deadline.translation": "Deadline",
      "note.translation": "Notes"
    },
    "huntoo_link": null
  },
  {
    "id": 1,
    "advert": {
      "id": 9,
      "values": [
        {
          "field_id": "description",
          "value": "<p>Some description about second work</p>"
        },
        {
          "field_id": "geolocation",
          "value": "{\"latitude\":\"40.703870\",\"longitude\":\"-74.013854\",\"iso\":\"us\",\"locality\":\"New York\",\"region1\":\"New York\",\"postcode\":\"10004\",\"country\":\"United States\"}"
        },
        {
          "field_id": "requirements",
          "name": "Requirements",
          "value": "<ul><li>complete some form of study in media, performing or visual arts would be very welcome</li><li>acting experience&nbsp;preferably in soap operas</li><li>great appearance and athletic figure</li></ul>"
        },
        {
          "field_id": "responsibilities",
          "name": "Responsibilities",
          "value": "<ul><li>memorising lines and rehearsing</li><li>research or undertake activities to help prepare for a part</li><li>discuss interpretation and delivery with other members of the company and the director</li><li>looking good</li></ul><p><br></p>"
        },
        {
          "field_id": "what_we_offer",
          "name": "What we offer?",
          "value": "<ul><li>great payment</li><li>contract for at least 10 episodes</li><li>appearance on tv on a daily basis</li><li>we basically make you a soap opera star </li></ul>"
        }
      ],
      "name": "Dr. Drake Ramoray vol.2",
      "recruitment": {
        "id": 13,
        "nr_ref": "/33/07/2020/NfT"
      },
      "language": "en"
    },
    "url": "http://<your_traffit_name>.traffit.com/public/an/N1E9PQ==",
    "valid_start": "2021-05-18 09:50:00",
    "valid_end": "2021-06-17 09:50:00",
    "awarded": true,
    "options": {
      "job_type": "Internship",
      "remote": "1",
      "job_location": "{\"latitude\":\"40.703870\",\"longitude\":\"-74.013854\",\"locality\":\"New York\",\"iso\":\"us\",\"region1\":\"New York\",\"postcode\":\"10004\",\"country\":\"United States\"}",
      "branches": "Arts",
      "emp_number": "1",
      "recruitment_deadline": "2021/05/19",
      "note": "some note from hiring manager",
      "job_type.translation": "Job type",
      "remote.translation": "Remote job",
      "job_location.translation": "Job location",
      "branches.translation": "Industry",
      "emp_number.translation": "Number of vacancies",
      "recruitment_deadline.translation": "Deadline",
      "note.translation": "Notes"
    },
    "huntoo_link": null
  }
]
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 400,
    "message": "Bad Request"
  }
}

Get job posts published
GET/public/job_posts/published

Get job posts published.

Supported headers:

X-Request-Page-Size,

X-Request-Current-Page,

X-Request-Filter,

Filter example:

X-Request-Filter: {"id":{"value":"5521","comparison":"="}}

Sort example:

X-Request-Sort: {"sort_by":"awarded","direction":"DESC"}

Sort by id DESC is applied by default. When sorting by other field is provided, sort by id DESC is added as a second sorting condition.

Supported comparators for sorting and filtering by system fields:

System field name Available comparators
id (job_post_published_id) =, !=, <=, >=
job_post_id (advert_id) =, !=, <=, >=
job_id =, !=, <=, >=
language =, !=
awarded =, !=

Integration API Introduction

For integration with Traffit API you need to do two things:

  1. Add the API client

  2. Generate an access token.

Adding new API client

In Traffit we use OAuth 2 for integration. The first thing you need to do is to add an integration client.

  1. Go to the Settings–> Integration with the Traffit API and click “+Add client”.

  2. Write a name of your client (you can use only Latin alphabet and numbers) and press Enter. The final name of your client will be in <your_instance_name>_<your_client_name> format.

  3. After that, you can choose scopes which will be allowed to be used for generating access tokens. Each scope allows to use some API endpoints connected to it. For example, the employee scope allows you to create, update and retrieve your candidates data.

What is ‘Do you use API V1?’ switch ?

In Traffit we have two versions of API. We strongly recommend you to use API V2 as we no longer support API V1 . One client can be used only for one API version. This tutorial is for API V2.

  1. The ‘Generate Client Secret’ button will show up after you choose at least scope. Click on it.

  2. A newly created client will show up in the summary with your unique Client Secret generated by Traffit.

Generating access token

POST https://www.<your_traffit_name>.traffit.com/oauth2/token
RequestsGenerate token

Example CURL:

curl -X POST 
        https://<your_traffit_name>.traffit.com/oauth2/token 
        -F client_id=<your_client_name> 
        -F client_secret=<your_client_secret> 
        -F grant_type=client_credentials
        -F scope=employee
Headers
Content-Type: application/json
Body
{
    "client_id": "<your_client_name>",
    "client_secret": "<your_client_secret",
    "grant_type": "client_credentials",
    "scope": <scopes>
}
Responses200400
Headers
Content-Type: application/json
Body
{
  "access_token": "<your_access_token>",
  "expires_in": 2592000,
  "token_type": "Bearer",
  "scope": "employee"
}
Headers
Content-Type: application/json
Body
{
  "error": "<oauth2_error_type>",
  "error_description": "<oauth2_error_message>"
}

Generating access token
POST/oauth2/token

Generate OAuth token. Generated token is valid for 30 days.

Required parameters:

client_id:

It’s your client name which you have created before.

client_secret:

It’s a client secret generated by Traffit for a client which you have created before.

grant_type:

Grant type always will be client_credentials.

scope:

One or many of the scopes which you chose for a client separated by space.


Webhooks

Traffit supports various of webhook types. In order to add webhooks to your instance you can register them manually via integration API.

Currently available webhooks

Type description
job_post_published Job post has been published
job_post_edited Job post has been edited
candidate_created Candidate has been created
candidate_deleted Candidate was deleted
candidate_soft_deleted Candidate was anonymized
candidate_merged Candidates were merged
candidate_talent_created Candidate has been added to talent pool
candidate_activity_deleted Candidate activity has been deleted (only manually added activities can be deleted)
candidate_consents_created Candidate received new consent
candidate_consent_withdrawal Candidate consent has been deactivated or deleted
candidate_applied Candidate applied to job via application form
candidate_added_to_job Candidate has been added to job (manually by recruiter)
candidate_moved_in_job Candidate has been moved in job workflow
candidate_removed_from_job Candidate application has been deleted from job (manually by recruiter, will not be triggered when job has been deleted)
candidate_hired Candidate has been moved to the hired stage
job_created Job has been created
job_updated Job has been updated
job_deleted Job has been deleted
crm_person_created CRM person has been created
crm_person_updated CRM person has been updated
crm_activity_deleted CRM activity has been deleted
user_deactivated User has been deactivated

After webhook is registered, you will receive POST request on specified URL. Request will contain webhook type in headers and JSON in body with webhook related data.

For example: webhooks related to candidate will contain candidate as employee_id:

[
    'employee_id' => <Candidate ID>,
    'recruitment_id' => <Job ID>
]

Headers:

X-Traffit-Event: candidate_created

Register webhook

POST https://www.<your_traffit_name>.traffit.com/api/integration/v2/webhooks/
RequestsRegister webhook

Example CURL:

curl -X POST "https://<your_traffit_name>.traffit.com/api/integration/v2/webhooks/" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer abcdef1234"
        -d "{ \"type\": \"candidate_created\", \"url\": \"https://example.com/webhook\"}"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Body
{
  "type": "candidate_created",
  "url": "https://example.com/webhook"
}
Responses201401
Headers
Content-Type: application/json
Body
{
  "id": 9,
  "url": "https://example.com/webhook"
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Register webhook
POST/api/integration/v2/webhooks/

Required scope of authorization token: webhook

Supported headers:

Authorization,

X-Response-Metadata


Remove webhook

DELETE https://www.<your_traffit_name>.traffit.com/api/integration/v2/webhooks/8
RequestsDelete response format
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Response-Metadata: true
Responses204401404
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Webhook not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Remove webhook
DELETE/api/integration/v2/webhooks/{webhook_id}

Required scope of authorization token: webhook

Supported headers:

Authorization,

X-Response-Metadata

URI Parameters
HideShow
webhook_id
int (required) Example: 8

Webhook ID


Get webhook types

GET https://www.<your_traffit_name>.traffit.com/api/integration/v2/webhooks/types
RequestsGet response format
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Response-Metadata: true
Responses200
Headers
Content-Type: application/json
Body
[
  "advert_published",
  "advert_publish_edited",
  "candidate_created",
  "candidate_deleted",
  "candidate_soft_deleted",
  "candidate_merged",
  "candidate_talent_created",
  "candidate_activity_deleted",
  "candidate_consents_created",
  "candidate_consent_withdrawal",
  "candidate_applied",
  "candidate_added_to_job",
  "candidate_moved_in_job",
  "candidate_removed_from_job",
  "candidate_hired",
  "job_created",
  "job_updated",
  "job_deleted",
  "crm_person_created",
  "crm_person_updated",
  "crm_activity_deleted",
  "user_deactivated"
]

Get webhook types
GET/api/integration/v2/webhooks/types

Required scope of authorization token: webhook

Supported headers:

Authorization,

X-Response-Metadata


Additional fields in API

What is custom field in Traffit?

In Traffit you have possibility to add your own fields to configurate entities data (candidate, job, contact person etc.). These fields can be available in the API. As for now, we don’t support File, Files and Location custom fields in API.

How can I make my custom field visible in API?

  1. Go to Settings–>Fields Configuration and choose which entity fields you want to configure.

  2. Select field you want to edit. In order to show it up in API you need to do two things:

  • add SID value to the field
  • turn on ‘Field available via integration’ switch

Fields with SIDs show up in API with ‘_’ prefix. For example if in the candidate data there is a custom field with SID available_from it will be available via API as _available_from. From now on, this field:

  • is returned in the candidate data via API (and can be used for filtering/sorting),

  • is available for POST/PATCH/PUT requests.

Example, any single candidate’s response in API with GET request with additional Available from field will look like this:

{
    "id": 2288876,
    "name": "Test",
    "lastname": "Candidate",
    "status": "active",
    "files": [],
    "email": "testemail@test.com",
    "created_at": "2013-12-13 11:19:45",
    "updated_at": "2020-02-25 08:33:08",
    "updated_by": {
      "id": 1794
    },
    "_available_from": "2020-02-29",
  }

Default system fields in API

These fields are always available via API and cannot be removed from fields configuration.

Namespace Field SID
Candidate First name firstName
Candidate Last name lastName
Candidate E-mail email
Job Job title name
Contact Name name
Contact Last name lastname
Contact E-mail email
Client Company name name
User Username username
User E-mail email
User Permission group permission_group
User Password password

System fields not visible by default in API

These fields are not visible via API by default. If you want to retrieve these fields via API you need to have them in fields configuration and turned on ‘Field available via integration’ switch. If the switch is not available - this field will be available via integration automatically.

System fields do not have ’_’ prefix.

Namespace Field SID
Candidate Mobile phone mobile
Candidate Location location
Candidate Status status
Candidate Candidate source source
Candidate Sex sex
Candidate LinkedIn linkedin
Candidate GoldenLine goldenline
Candidate Facebook facebook
Candidate Financial expectations finance
Candidate Candidate about himself/herself candidate_about
Candidate Availability availability
Candidate Languages (besides native) candidate_languages
Candidate Responsible person owner
Job Job status status
Job Branch branches
Job Number of vacancies emp_number
Job Notes note
Job Job type job_type
Job Remote job remote
Job Deadline recruitment_deadline
Job Localization job_location
Job Client client
Job Contact person person
Job Region regions
Job Reference number nrRef
Job Image image
Client City city
Client Country country
Client Email email
Client Note note
Client Mobile phone phone
Client Postal code postal_code
Client Status status
Client Street street
Client TAX Number vat_number
Client Company website address www
Client Responsible people owners
Contact Phone phone
Contact Position position
Contact Disabled activityState
User First name firstName
User Last name lastName
User Photo photo
User Mobile phone phone

Headers

Available request headers

Authorization

Needed for an authorization - it should be sent in “Bearer <your_token>” format

X-Request-Page-Size

Defines how many records will be returned. Sending request without header will return maximum 10 records.

X-Request-Current-Page

Defines which page of a records will be returned. For example - if X-Request-Page-Size=10 and X-Request-Current-Page=1 the request will return first 10 records. When X-Request-Current-Page=2 - the request will return the next 10 records (on places 11-20)

X-Request-Filter

How can I filter records via API?

X-Request-Sort

How can I sort records via API?

X-Response-Metadata

If sent, the response returns information which data and in which format will be returned via API endpoint

X-Request-Metadata

If sent, the response returns information which data and in which format can be sent via API endpoint.

Available response headers

X-Result-Count

Returns how many results were returned with request

X-Result-Current-Page

Returns current page of results (same as sent via X-Request-Current-Page)

X-Result-Page-Size

Returns how much records were returned (same as sent via X-Request-Page-Size)

X-Result-Total-Count

Returns total number of records which can be retrieved via API

X-Result-Total-Pages

Returns the maximum number pages which will return not-empty response.

Filtering results

In order to filter records via API you need to use X-Request-Filter header.

As a value it accepts a JSON in format:

{
  "<filter_field_1>": {
                        "value": "<filtered_value>",
                        "comparison": "<comparator>"
                      },
  "<filter_field_2>": {
                        "value": "<filtered_value>",
                        "comparison": "<comparator>"
                      }
}

<filter_field_1> and <filter_field_2> are field names by which you want to filter. Each entity type (candidate, client, job etc.) has its own filter fields. Additionally you can add custom fields to the API .

For each filter field you need to define value and comparator. Between filter fields there is AND conjunction.

If you filter by phrases with special characters - you need to send their unicode: For example, instead of sending ‘café’ you need to send ‘caf\u00e9’

Available comparators:

‘=’ comparator:

Equals comparator. When used, it searches for the records with given value. Example:

{
   "value": "Test",
   "comparison": "="
}

‘!=’ comparator:

Not-equals comparator. When used, it searches for the records without given value. (including empty values) Example:

{
   "value": "Test",
   "comparison": "!="
}

‘<=’ comparator: Less/equal than comparator. When used, it searches for the records with value less/equal than/to the given one

It’s available for Date/Date and time/Number custom fields and system fields which have date or date and time. Example:

{
   "value": "2020-02-29",
   "comparison": "<="
}

‘>=’ comparator:

Greater/equal than comparator. When used, it searches for the records with value greater/equal than/to the given one.

It’s available for Date/Date and time/Number custom fields and system fields which have date or date and time.

Example:

{
   "value": "2020-02-29",
   "comparison": ">="
}

‘in’ comparator:

In comparator. When used, it searches for the records with given value. It’s available for Select multiple custom fields. It works similar to ‘=’ comparator, but for fields which can have multiple values. Example:

{
   "value": "a",
   "comparison": "in"
}

‘like’ comparator:

Like comparator. When used, it searches for the records with occurrence of a value. It’s available for text fields.

Example:

{
   "value": "developer",
   "comparison": "like"
}

It would return records with value ‘Software developer’ as also ‘Developer with 2-year experience’.

Sorting results

In order to sort records via API you need to use X-Request-Sort header.

As a value it accepts a JSON in format:

{
  "<sort_field_1>": "DESC",
  "<sort_field_2>": "ASC"
}

<sort_field_1> and <sort_field_2> are the field names by which you want to sort. Each entity type (candidate, client, job, etc.) has its own filter fields.

Additionally, you can add custom fields to API , by which you can sort (except Choice/Multi-choice with dictionary values and location values).

Each sort field accepts one of two values:

DESC

Sort in descending order

ASC

Sort in ascending order

The order of the sorts is based on an order of the sort fields sent in the header.

X-Request-Sort example:

This example will first sort records by name in descending order and then by the last name in ascending order.

{
  "name": "DESC",
  "lastname": "ASC"
}

Candidate

Create new candidate

POST https://www.<your_traffit_name>.traffit.com/api/integration/v2/employees/
RequestsCreate new candidate

Example CURL:

curl -X POST "https://<your_traffit_name>.traffit.com/api/integration/v2/employees/" \
     -H "accept: application/json" \
     -H "Authorization: Bearer abcdef1234" \
     -H "Content-Type: application/json" \
     -d "{ \"name\": \"New\", \"lastname\": \"Candidate\", \"email\": \"new@candidate.com\", \"guid\": null, \"source\": \"Advert\", \"synchro_time\": \"2020-08-27 09:01:15\"}"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Body
{
  "name": "New",
  "lastname": "Candidate",
  "email": "new@candidate.com",
  "guid": null,
  "owner": 1,
  "source": "Advert",
  "synchro_time": "2020-08-27 09:01:15",
  "_additional_custom_field": "Custom value"
}
Responses201400401
Headers
Content-Type: application/json
Body
{
  "id": 124
}
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Validation Failed",
  "errors": "<list_of_errors>"
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Create new candidate
POST/api/integration/v2/employees/

Create candidate

Required scope of authorization token: employee

Supported headers:

Authorization,

X-Request-Metadata


Update candidate

PUT https://www.<your_traffit_name>.traffit.com/api/integration/v2/employees/123
RequestsUpdate employee

Example CURL:

curl -X PUT "https://<your_traffit_name>.traffit.com/api/integration/v2/employees/123" \
     -H "accept: application/json" \
     -H "Authorization: Bearer abcdef1234" \
     -H "Content-Type: application/json" \
     -d "{ \"name\": \"New\", \"lastname\": \"Candidate\", \"email\": \"new@candidate.com\", \"guid\": null, \"source\": \"Advert\", \"synchro_time\": \"2020-08-27 09:01:15\"}"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Body
{
  "name": "New",
  "lastname": "Candidate",
  "email": "new@candidate.com",
  "guid": null,
  "owner": 1,
  "source": "Advert",
  "synchro_time": "2020-08-27 09:01:15",
  "_additional_custom_field": "Custom value"
}
Responses204400401404
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Validation Failed",
  "errors": "<list_of_errors>"
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Candidate not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Update candidate
PUT/api/integration/v2/employees/{employee_id}

Update all candidate data

Required scope of authorization token: employee

Supported headers:

Authorization,

X-Request-Metadata

URI Parameters
HideShow
employee_id
int (required) Example: 123

Employee ID


Update single fields on the candidate

PATCH https://www.<your_traffit_name>.traffit.com/api/integration/v2/employees/123
RequestsUpdate candidate
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Body
{
  "email": "new@candidate.com",
  "synchro_time": "2020-08-27 09:01:15",
  "_additional_custom_field": "Custom value"
}
Responses204400401404
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Validation Failed",
  "errors": "<list_of_errors>"
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Candidate not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Update single fields on the candidate
PATCH/api/integration/v2/employees/{employee_id}

Update selected fields on the candidate.

Required scope of authorization token: employee

Supported headers:

Authorization,

X-Request-Metadata

URI Parameters
HideShow
employee_id
int (required) Example: 123

Employee ID


Get single candidate

GET https://www.<your_traffit_name>.traffit.com/api/integration/v2/employees/123
RequestsSearch by IDSearch by guidGet response format

Example CURL:

curl -X GET "https://<your_traffit_name>.traffit.com/api/integration/v2/employees/123" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer abcdef1234"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Responses200401404
Headers
Content-Type: application/json
Body
{
  "id": 123,
  "name": "Rachel",
  "lastname": "Green",
  "status": "active",
  "files": [
    {
      "filename": "rachel_cv.pdf",
      "file_uploaded": "2020-08-23 13:24:29"
    }
  ],
  "email": "rachel@ralphlaurenfriends.com",
  "source": {
    "id": 260,
    "value": "Advert"
  },
  "owner": {
    "id": 24
  },
  "created_at": "2003-10-28 07:42:59",
  "updated_at": "2020-08-23 16:12:39",
  "created_by": {
    "id": 28
  },
  "updated_by": {
    "id": 24
  }
}
Schema
{
  "id": {
    "type": "integer",
    "description": "Candidate id"
  },
  "name": {
    "type": "text",
    "description": "Candidate first name"
  },
  "lastname": {
    "type": "text",
    "description": "Candidate last name"
  },
  "files": {
    "type": "array",
    "description": "Informations about candidate files"
  },
  "source": {
    "type": "object",
    "description": "Source of candidate. Returns two values: name and source id"
  },
  "email": {
    "type": "email",
    "description": "Candidate email"
  },
  "status": {
    "type": "text",
    "description": "Candidate status. It's always 'active'"
  },
  "linkedin_id": {
    "type": "text",
    "description": "Candidate linkedin url"
  },
  "created_at": {
    "type": "datetime",
    "format": "yyyy-MM-dd HH:mm:ss",
    "description": "Last update of candidate data"
  },
  "updated_at": {
    "type": "datetime",
    "format": "yyyy-MM-dd HH:mm:ss",
    "description": "Date of the candidate last data update"
  },
  "created_by": {
    "type": "integer",
    "description": "ID of the user who created the candidate"
  },
  "updated_by": {
    "type": "integer",
    "description": "ID of the user who recently updated the candidate"
  },
  "guid": {
    "type": "text",
    "description": "Guid of the candidate. Not returned in response if is null."
  },
  "synchro_time": {
    "type": "datetime",
    "required": false,
    "format": "yyyy-MM-dd HH:mm:ss",
    "description": "Date, which can be set by client via API. Can be used for own tracking "
  }
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Candidate not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Example CURL:

curl -X GET "https://<your_traffit_name>.traffit.com/api/integration/v2/employees/123" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer abcdef1234" \
        -H "X-Get-Find-By-Guid: true"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Get-Find-By-Guid: true
Responses200401404
Headers
Content-Type: application/json
Body
{
  "id": 123,
  "name": "Rachel",
  "lastname": "Green",
  "status": "active",
  "files": [
    {
      "filename": "rachel_cv.pdf",
      "file_uploaded": "2020-08-23 13:24:29"
    }
  ],
  "email": "rachel@ralphlaurenfriends.com",
  "source": {
    "id": 260,
    "value": "Advert"
  },
  "owner": {
    "id": 24
  },
  "created_at": "2003-10-28 07:42:59",
  "updated_at": "2020-08-23 16:12:39",
  "created_by": {
    "id": 28
  },
  "updated_by": {
    "id": 24
  }
}
Schema
{
  "id": {
    "type": "integer",
    "description": "Candidate id"
  },
  "name": {
    "type": "text",
    "description": "Candidate first name"
  },
  "lastname": {
    "type": "text",
    "description": "Candidate last name"
  },
  "files": {
    "type": "array",
    "description": "Informations about candidate files"
  },
  "source": {
    "type": "object",
    "description": "Source of candidate. Returns two values: name and source id"
  },
  "email": {
    "type": "email",
    "description": "Candidate email"
  },
  "status": {
    "type": "text",
    "description": "Candidate status. It's always 'active'"
  },
  "linkedin_id": {
    "type": "text",
    "description": "Candidate linkedin url"
  },
  "created_at": {
    "type": "datetime",
    "format": "yyyy-MM-dd HH:mm:ss",
    "description": "Last update of candidate data"
  },
  "updated_at": {
    "type": "datetime",
    "format": "yyyy-MM-dd HH:mm:ss",
    "description": "Date of the candidate last data update"
  },
  "created_by": {
    "type": "integer",
    "description": "ID of the user who created the candidate"
  },
  "updated_by": {
    "type": "integer",
    "description": "ID of the user who recently updated the candidate"
  },
  "guid": {
    "type": "text",
    "description": "Guid of the candidate. Not returned in response if is null."
  },
  "synchro_time": {
    "type": "datetime",
    "required": false,
    "format": "yyyy-MM-dd HH:mm:ss",
    "description": "Date, which can be set by client via API. Can be used for own tracking "
  }
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Candidate not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Response-Metadata: true
Responses200401404
Headers
Content-Type: application/json
Body
{
  "id": 123,
  "name": "Rachel",
  "lastname": "Green",
  "status": "active",
  "files": [
    {
      "filename": "rachel_cv.pdf",
      "file_uploaded": "2020-08-23 13:24:29"
    }
  ],
  "email": "rachel@ralphlaurenfriends.com",
  "source": {
    "id": 260,
    "value": "Advert"
  },
  "owner": {
    "id": 24
  },
  "created_at": "2003-10-28 07:42:59",
  "updated_at": "2020-08-23 16:12:39",
  "created_by": {
    "id": 28
  },
  "updated_by": {
    "id": 24
  }
}
Schema
{
  "id": {
    "type": "integer",
    "description": "Candidate id"
  },
  "name": {
    "type": "text",
    "description": "Candidate first name"
  },
  "lastname": {
    "type": "text",
    "description": "Candidate last name"
  },
  "files": {
    "type": "array",
    "description": "Informations about candidate files"
  },
  "source": {
    "type": "object",
    "description": "Source of candidate. Returns two values: name and source id"
  },
  "email": {
    "type": "email",
    "description": "Candidate email"
  },
  "status": {
    "type": "text",
    "description": "Candidate status. It's always 'active'"
  },
  "linkedin_id": {
    "type": "text",
    "description": "Candidate linkedin url"
  },
  "created_at": {
    "type": "datetime",
    "format": "yyyy-MM-dd HH:mm:ss",
    "description": "Last update of candidate data"
  },
  "updated_at": {
    "type": "datetime",
    "format": "yyyy-MM-dd HH:mm:ss",
    "description": "Date of the candidate last data update"
  },
  "created_by": {
    "type": "integer",
    "description": "ID of the user who created the candidate"
  },
  "updated_by": {
    "type": "integer",
    "description": "ID of the user who recently updated the candidate"
  },
  "guid": {
    "type": "text",
    "description": "Guid of the candidate. Not returned in response if is null."
  },
  "synchro_time": {
    "type": "datetime",
    "required": false,
    "format": "yyyy-MM-dd HH:mm:ss",
    "description": "Date, which can be set by client via API. Can be used for own tracking "
  }
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Candidate not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Get single candidate
GET/api/integration/v2/employees/{employee_id}

Get a single candidate by ID or guid.

Required scope of authorization token: employee

Supported headers:

Authorization,

X-Get-Find-By-Guid,

X-Response-Metadata

URI Parameters
HideShow
employee_id
int (required) Example: 123

Employee ID


Get candidate tags

GET https://www.<your_traffit_name>.traffit.com/api/integration/v2/employees/123/tags
RequestsSearch by ID

Example CURL:

curl -X GET "https://<your_traffit_name>.traffit.com/api/integration/v2/employees/123/tags" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer abcdef1234" \
        -H 'X-Request-Page-Size: 2' \
        -H 'X-Request-Current-Page: 1'
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Request-Page-Size: 2
X-Request-Current-Page: 1
Responses200401404
Headers
Content-Type: application/json
Body
[
  {
    "id": 28,
    "name": "first_tag"
  },
  {
    "id": 29,
    "name": "second_tag"
  }
]
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Candidate not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Get candidate tags
GET/api/integration/v2/employees/{employee_id}/tags

Get candidate tags by ID.

Required scope of authorization token: employee

Supported headers:

Authorization,

X-Request-Page-Size,

X-Request-Current-Page,

URI Parameters
HideShow
employee_id
int (required) Example: 123

Employee ID


Add tags to the candidate

PATCH https://www.<your_traffit_name>.traffit.com/api/integration/v2/employees/123/tags
RequestsAdd tag to the candidate
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Body
{
  "tags": [
    "tag_name1",
    "tag_name2"
  ]
}
Responses204401400404404
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Bad request",
  "errors": "<list_of_errors>"
}

Candidate not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Tag not found

Headers
Content-Type: application/json
Body
[
  "Tag not found"
]

Add tags to the candidate
PATCH/api/integration/v2/employees/{employee_id}/tags

Add tags to the candidate.

Required scope of authorization token: employee

Supported headers:

Authorization

URI Parameters
HideShow
employee_id
int (required) Example: 123

Employee ID


Add file and assign it to the candidate

POST https://www.<your_traffit_name>.traffit.com/api/integration/v2/employees/123/files/
RequestsAdd file and assign it to the candidate

Example CURL:

curl -X POST "https://www.<your_traffit_name>.traffit.com/api/integration/v2/employees/123/files/"
    -H "accept: application/json"
    -H "Authorization: Bearer abcdef1234"
    -H "Content-Type: multipart/form-data"
    -F "file[file]=@test.pdf;type=application/pdf"
    -F "dictionary_file_type=CV"
    -F "file[isPublic]=1"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Responses201400401404
Headers
Content-Type: application/json
Body
{
  "id": 124
}
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Could not upload file"
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Add file and assign it to the candidate
POST/api/integration/v2/employees/{employee_id}/files/

Add file and assign it to the candidate

Parameter name Example values Description
file[file] @file_name.jpg;type=image/jpeg Filename with filepath
file[isPublic] 0, 1 Should file be public
dictionary_file_type CV File dictionary type
URI Parameters
HideShow
employee_id
int (required) Example: 123

Employee ID


Reject candidate in job

POST https://www.<your_traffit_name>.traffit.com/api/integration/v2/employees/123/recruitments/351/states/_move_to_reject_state
RequestsReject candidate in job

Example CURL:

curl -X POST "https://<your_traffit_name>.traffit.com/api/integration/v2/employees/123/recruitments/22/states/_move_to_reject_state" \
     -H "accept: application/json" \
     -H "Authorization: Bearer abcdef1234" \
     -H "Content-Type: application/json" \
     -d "{ \"rejection_id\": \"2\" }"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Body
{
  "rejection_id": "2"
}
Responses204400401403404
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Validation Failed",
  "errors": "<list_of_errors>"
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 403,
    "message": "Forbidden"
  }
}

Candidate or job not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Reject candidate in job
POST/api/integration/v2/employees/{employee_id}/recruitments/{recruitment_id}/states/_move_to_reject_state

URI Parameters
HideShow
employee_id
int (required) Example: 123

Employee ID

recruitment_id
int (required) Example: 351

Job ID


Move candidate in job to next state

POST https://www.<your_traffit_name>.traffit.com/api/integration/v2/employees/123/recruitments/351/states/_move_to_next_state
RequestsMove candidate in job to next state

Example CURL:

curl -X POST "https://<your_traffit_name>.traffit.com/api/integration/v2/employees/123/recruitments/22/states/_move_to_next_state" \
     -H "accept: application/json" \
     -H "Authorization: Bearer abcdef1234" \
     -H "Content-Type: application/json"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Responses204400401403404
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Body
**No transition for action**
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 403,
    "message": "Forbidden"
  }
}

Candidate or job not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Move candidate in job to next state
POST/api/integration/v2/employees/{employee_id}/recruitments/{recruitment_id}/states/_move_to_next_state

URI Parameters
HideShow
employee_id
int (required) Example: 123

Employee ID

recruitment_id
int (required) Example: 351

Job ID


Move candidate in job to state

POST https://www.<your_traffit_name>.traffit.com/api/integration/v2/employees/123/recruitments/351/states/8/_move
RequestsMove candidate in job to state

Example CURL:

curl -X POST "https://<your_traffit_name>.traffit.com/api/integration/v2/employees/123/recruitments/22/states/8/_move" \
     -H "accept: application/json" \
     -H "Authorization: Bearer abcdef1234" \
     -H "Content-Type: application/json"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Responses204400401403404
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Body
**No transition for action**
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 403,
    "message": "Forbidden"
  }
}

Candidate or job not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Move candidate in job to state
POST/api/integration/v2/employees/{employee_id}/recruitments/{recruitment_id}/states/{state_id}/_move

URI Parameters
HideShow
employee_id
int (required) Example: 123

Employee ID

recruitment_id
int (required) Example: 351

Job ID

state_id
int (required) Example: 8

State ID


Add provision to the candidate

POST https://www.<your_traffit_name>.traffit.com/api/integration/v2/employees/123/provisions/22
RequestsAdd provision to the candidate

Example CURL:

curl -X POST "https://<your_traffit_name>.traffit.com/api/integration/v2/employees/123/provisions/321" \
     -H "accept: application/json" \
     -H "Authorization: Bearer abcdef1234" \
     -H "Content-Type: application/json" \
     -d "{ \"recruitment\": \"111\", \"agreement_date\": \"2021-01-04\" }"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Responses204204400401404422422
Headers
Content-Type: application/json
Body
{
  "recruitment": "111",
  "agreement_date": "2021-01-04"
}
Headers
Content-Type: application/json
Body
{
  "recruitment": null,
  "agreement_date": "2021-01-04"
}
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Validation Failed",
  "errors": "<list_of_errors>"
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Candidate or file not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}
Headers
Content-Type: application/json
Body
{
  "error": "Employee is not in the recruitment"
}
Headers
Content-Type: application/json
Body
{
  "error": "Cannot assign not within recruitment type provision with recruitment!"
}

Add provision to the candidate
POST/api/integration/v2/employees/{employee_id}/provisions/{provision_id}

URI Parameters
HideShow
employee_id
int (required) Example: 123

Employee ID

provision_id
int (required) Example: 22

Provision ID


Add many provisions to the candidate

PATCH https://www.<your_traffit_name>.traffit.com/api/integration/v2/employees/123/provisions
RequestsAdd many provisions to the candidate

Example CURL:

curl -X POST "https://<your_traffit_name>.traffit.com/api/integration/v2/employees/123/provisions" \
        -H "accept: application/json" \
        -H "Authorization: Bearer abcdef1234" \
        -H "Content-Type: application/json" \
        -d "[ { \"recruitment\": \"138\", \"provision\": \"1\", \"agreement_date\": \"2021-01-04\" }, \\
        { \"recruitment\": \"139\", \"provision\": \"2\", \"agreement_date\": \"2020-11-14\" }, \\
        { \"recruitment\": \"122\", \"provision\": \"13\", \"agreement_date\": \"2021-01-08\" }]"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Responses204400401404422422
Headers
Content-Type: application/json
Body
[
  {
    "recruitment": null,
    "provision": 1,
    "agreement_date": "2021-01-04"
  },
  {
    "recruitment": 139,
    "provision": 2,
    "agreement_date": "2020-11-14"
  },
  {
    "recruitment": 122,
    "provision": 13,
    "agreement_date": "2021-01-08"
  }
]
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Validation Failed",
  "errors": "<list_of_errors>"
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Candidate or file not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}
Headers
Content-Type: application/json
Body
{
  "error": "Employee is not in the recruitment"
}
Headers
Content-Type: application/json
Body
{
  "error": "Cannot assign not within recruitment type provision with recruitment!"
}

Add many provisions to the candidate
PATCH/api/integration/v2/employees/{employee_id}/provisions

Add many provisions to the candidate

Required scope of authorization token: employee

Supported headers:

Authorization

URI Parameters
HideShow
employee_id
int (required) Example: 123

Employee ID


Get candidate jobs

GET https://www.<your_traffit_name>.traffit.com/api/integration/v2/employees/123/recruitments
RequestsSearch by IDSearch with additional module

Example CURL:

curl -X GET "https://<your_traffit_name>.traffit.com/api/integration/v2/employees/123/recruitments" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer abcdef1234" \
        -H 'X-Request-Page-Size: 12' \
        -H 'X-Request-Current-Page: 1'
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Request-Page-Size: 12'
X-Request-Current-Page: 1
Responses200200401404
Body
[
  {
    "recruitment": {
      "id": 151,
      "name": "first job"
    }
  },
  {
    "recruitment": {
      "id": 102,
      "name": "second job"
    }
  },
  {
    "recruitment": {
      "id": 150,
      "name": "third job"
    }
  }
]

With employee_recruitments_states module

Body
[
  {
    "recruitment": {
      "id": 151,
      "name": "first job"
    }
  },
  {
    "recruitment": {
      "id": 102,
      "name": "second job"
    }
  },
  {
    "recruitment": {
      "id": 150,
      "name": "third job"
    }
  },
  {
    "extras": {
      "employee_recruitments_states": [
        {
          "state": "Video call",
          "recruitment_id": 102
        },
        {
          "state": "Video call",
          "recruitment_id": 102
        },
        {
          "state": "Video call",
          "recruitment_id": 102
        },
        {
          "state": "Video call",
          "recruitment_id": 150
        },
        {
          "state": "Hired",
          "recruitment_id": 151
        }
      ]
    }
  }
]
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Candidate not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Example CURL:

curl -X GET "https://<your_traffit_name>.traffit.com/api/integration/v2/employees/123/recruitments" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer abcdef1234" \
        -H "X-Additional-Modules: employee_recruitments_states"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Additional-Modules: employee_recruitments_states
Responses200200401404
Body
[
  {
    "recruitment": {
      "id": 151,
      "name": "first job"
    }
  },
  {
    "recruitment": {
      "id": 102,
      "name": "second job"
    }
  },
  {
    "recruitment": {
      "id": 150,
      "name": "third job"
    }
  }
]

With employee_recruitments_states module

Body
[
  {
    "recruitment": {
      "id": 151,
      "name": "first job"
    }
  },
  {
    "recruitment": {
      "id": 102,
      "name": "second job"
    }
  },
  {
    "recruitment": {
      "id": 150,
      "name": "third job"
    }
  },
  {
    "extras": {
      "employee_recruitments_states": [
        {
          "state": "Video call",
          "recruitment_id": 102
        },
        {
          "state": "Video call",
          "recruitment_id": 102
        },
        {
          "state": "Video call",
          "recruitment_id": 102
        },
        {
          "state": "Video call",
          "recruitment_id": 150
        },
        {
          "state": "Hired",
          "recruitment_id": 151
        }
      ]
    }
  }
]
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Candidate not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Get candidate jobs
GET/api/integration/v2/employees/{employee_id}/recruitments

Get candidate jobs by ID.

Required scope of authorization token: employee

Supported headers:

Authorization,

X-Request-Page-Size,

X-Request-Current-Page,

X-Additional-Modules

URI Parameters
HideShow
employee_id
int (required) Example: 123

Employee ID


Get candidate activities

GET https://www.<your_traffit_name>.traffit.com/api/integration/v2/employees/123/activities
RequestsWithout query paramsWith 1 query paramWith 2 query params

Example CURL:

curl -X GET "https://<your_traffit_name>.traffit.com/api/integration/v2/employees/123/activities" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer abcdef1234" \
        -H 'X-Request-Page-Size: 12' \
        -H 'X-Request-Current-Page: 1'
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Request-Page-Size: 12'
X-Request-Current-Page: 1
Responses200400401404
Headers
Content-Type: application/json
Body
[
  {
    "id": 187,
    "activity_date": "2020-04-27 11:16:16",
    "type": {
      "id": 15,
      "value": "Note"
    },
    "content": "<p>some note</p>",
    "created_by": {
      "id": 18
    },
    "created_at": "2020-04-27 11:16:17",
    "updated_at": "2020-04-27 11:16:17"
  },
  {
    "id": 198,
    "activity_date": "2020-10-28 07:48:21",
    "type": {
      "id": 411,
      "value": "Stage in recruitment"
    },
    "recruitment": {
      "id": 51
    },
    "content": {
      "content": "<div><p>Comment after phone interview</p></div>",
      "state": {
        "id": 5,
        "name": "Phone interview"
      }
    },
    "created_by": {
      "id": 28
    },
    "created_at": "2020-10-28 07:48:21",
    "updated_at": "2020-10-28 07:48:21"
  }
]
Headers
Content-Type: application/json
Body
{
  "error": "Bad comparison used."
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Candidate or file not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Example CURL:

curl -X GET "https://<your_traffit_name>.traffit.com/api/integration/v2/employees/123/activities?created_at=2020-11-01&created_at_comparison=>=" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer abcdef1234" \
        -H 'X-Request-Page-Size: 12' \
        -H 'X-Request-Current-Page: 1'
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Request-Page-Size: 12'
X-Request-Current-Page: 1
Responses200400401404
Headers
Content-Type: application/json
Body
[
  {
    "id": 187,
    "activity_date": "2020-04-27 11:16:16",
    "type": {
      "id": 15,
      "value": "Note"
    },
    "content": "<p>some note</p>",
    "created_by": {
      "id": 18
    },
    "created_at": "2020-04-27 11:16:17",
    "updated_at": "2020-04-27 11:16:17"
  },
  {
    "id": 198,
    "activity_date": "2020-10-28 07:48:21",
    "type": {
      "id": 411,
      "value": "Stage in recruitment"
    },
    "recruitment": {
      "id": 51
    },
    "content": {
      "content": "<div><p>Comment after phone interview</p></div>",
      "state": {
        "id": 5,
        "name": "Phone interview"
      }
    },
    "created_by": {
      "id": 28
    },
    "created_at": "2020-10-28 07:48:21",
    "updated_at": "2020-10-28 07:48:21"
  }
]
Headers
Content-Type: application/json
Body
{
  "error": "Bad comparison used."
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Candidate or file not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Example CURL:

curl -X GET "https://<your_traffit_name>.traffit.com/api/integration/v2/employees/123/activities?updated_at=2020-11-01&updated_at_comparison=>=&sort_by=created_at&sort_by_direction=ASC" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer abcdef1234" \
        -H 'X-Request-Page-Size: 12' \
        -H 'X-Request-Current-Page: 1'
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Request-Page-Size: 12'
X-Request-Current-Page: 1
Responses200400401404
Headers
Content-Type: application/json
Body
[
  {
    "id": 187,
    "activity_date": "2020-04-27 11:16:16",
    "type": {
      "id": 15,
      "value": "Note"
    },
    "content": "<p>some note</p>",
    "created_by": {
      "id": 18
    },
    "created_at": "2020-04-27 11:16:17",
    "updated_at": "2020-04-27 11:16:17"
  },
  {
    "id": 198,
    "activity_date": "2020-10-28 07:48:21",
    "type": {
      "id": 411,
      "value": "Stage in recruitment"
    },
    "recruitment": {
      "id": 51
    },
    "content": {
      "content": "<div><p>Comment after phone interview</p></div>",
      "state": {
        "id": 5,
        "name": "Phone interview"
      }
    },
    "created_by": {
      "id": 28
    },
    "created_at": "2020-10-28 07:48:21",
    "updated_at": "2020-10-28 07:48:21"
  }
]
Headers
Content-Type: application/json
Body
{
  "error": "Bad comparison used."
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Candidate or file not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Get candidate activities
GET/api/integration/v2/employees/{employee_id}/activities

Get candidate activities.

Required scope of authorization token: employee

Supported headers:

Authorization,

X-Request-Page-Size,

X-Request-Current-Page,

Supported query field for filtering:

Query field name Example values Required comparison field Available comparators
created_at 2020-11-01, 2021-01-04 12:10:00 created_at_comparison =, !=, >=, <=
updated_at 2020-11-01, 2021-01-04 12:10:00 updated_at_comparison =, !=, >=, <=
id 3 id_comparison =, !=, >=, <=
sort_by created_at, updated_at sort_by_direction ASC, DESC
type 15 (id of type in Traffit) type_comparison =, !=
activity_date 2020-11-01, 2021-01-04 12:10:00 updated_at_comparison =, !=, >=, <=
created_by_id 1 created_by_id_comparison =, !=
URI Parameters
HideShow
employee_id
int (required) Example: 123

Employee ID


Get candidates list

GET https://www.<your_traffit_name>.traffit.com/api/integration/v2/employees/
RequestsGet paginated results

Example CURL:

curl -X GET 'https://<your_traffit_name>.traffit.com/api/integration/v2/employees/' \
            -H 'Authorization: Bearer abcdef1234' \
            -H 'X-Request-Page-Size: 2' \
            -H 'X-Request-Current-Page: 1' \
            -H 'X-Request-Filter: {"created_at": {"value": "2020-01-02", "comparison": "<="}}' \
            -H 'X-Request-Sort: {"id" : "ASC"}'
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Request-Page-Size: 2
X-Request-Current-Page: 1
X-Request-Sort: {"id" : "ASC"}
X-Request-Filter: {"created_at": {"value": "2020-01-02", "comparison": "<="} }
Responses200400401
Headers
Content-Type: application/json
Body
[
  {
    "id": 2226874,
    "name": "Test",
    "lastname": "Candidate",
    "status": "active",
    "files": [],
    "email": "test111@test.com",
    "created_at": "2014-08-29 16:58:27",
    "updated_at": "2017-03-31 19:24:49"
  },
  {
    "id": 2359010,
    "name": "Test 2",
    "lastname": "Candidate",
    "status": "active",
    "files": [],
    "email": "test112@test.com",
    "created_at": "2012-05-30 14:15:40",
    "updated_at": "2012-05-30 14:16:35"
  }
]
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 400,
    "message": "Bad Request"
  }
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Get candidates list
GET/api/integration/v2/employees/

Retrieve all your candidates

Required scope of authorization token: employee

Supported headers:

Authorization ,

X-Request-Page-Size,

X-Request-Current-Page,

X-Request-Filter,

X-Request-Sort,

X-Response-Metadata

Supported comparators for filtering by system fields:

System field name Available comparators
id =, !=, <=, >=
name =, !=, like
lastname =, !=, like
guid =, !=, like
email =, !=, like
created_at =, !=, <=, >=
updated_at =, !=, <=, >=
synchro_time =, !=, <=, >=

Get candidates activities

GET https://www.<your_traffit_name>.traffit.com/api/integration/v2/employees/activities
RequestsWithout query paramsWith 1 query paramWith 2 query params

Example CURL:

curl -X GET "https://<your_traffit_name>.traffit.com/api/integration/v2/employees/activities" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer abcdef1234" \
        -H 'X-Request-Page-Size: 12' \
        -H 'X-Request-Current-Page: 1'
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Request-Page-Size: 12'
X-Request-Current-Page: 1
Responses200400401
Headers
Content-Type: application/json
Body
[
  {
    "id": 105,
    "employee": {
      "id": 136,
      "string_represent": "John Doe"
    },
    "activity_date": "2020-01-21 10:53:36",
    "type": {
      "id": 411,
      "value": "Stage in recruitment"
    },
    "recruitment": {
      "id": 53
    },
    "content": {
      "content": "<div><p>Comment after phone interview</p></div>",
      "state": {
        "id": 5,
        "name": "Phone interview"
      }
    },
    "created_by": {
      "id": 18
    },
    "created_at": "2020-01-21 10:53:36",
    "updated_at": "2020-01-21 10:53:36"
  },
  {
    "id": 191,
    "employee": {
      "id": 136,
      "string_represent": "John Doe"
    },
    "activity_date": "2020-09-15 16:00:51",
    "type": {
      "id": 411,
      "value": "Stage in recruitment"
    },
    "recruitment": {
      "id": 55
    },
    "content": {
      "content": "<div><p>Second comment after phone interview</p></div>",
      "state": {
        "id": 5,
        "name": "Phone interview"
      }
    },
    "created_by": {
      "id": 9
    },
    "created_at": "2020-09-15 16:00:51",
    "updated_at": "2020-09-15 16:00:51"
  },
  {
    "id": 195,
    "employee": {
      "id": 232,
      "string_represent": "Joe Novak"
    },
    "activity_date": "2020-10-28 07:48:18",
    "type": {
      "id": 15,
      "value": "Note"
    },
    "created_by": {
      "id": 28
    },
    "created_at": "2020-10-28 07:48:19",
    "updated_at": "2020-10-28 07:48:19"
  }
]
Headers
Content-Type: application/json
Body
{
  "error": "Bad comparison used."
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Example CURL:

curl -X GET "https://<your_traffit_name>.traffit.com/api/integration/v2/employees/activities?created_at=2020-11-01&created_at_comparison=>=" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer abcdef1234" \
        -H 'X-Request-Page-Size: 12' \
        -H 'X-Request-Current-Page: 1'
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Request-Page-Size: 12'
X-Request-Current-Page: 1
Responses200400401
Headers
Content-Type: application/json
Body
[
  {
    "id": 105,
    "employee": {
      "id": 136,
      "string_represent": "John Doe"
    },
    "activity_date": "2020-01-21 10:53:36",
    "type": {
      "id": 411,
      "value": "Stage in recruitment"
    },
    "recruitment": {
      "id": 53
    },
    "content": {
      "content": "<div><p>Comment after phone interview</p></div>",
      "state": {
        "id": 5,
        "name": "Phone interview"
      }
    },
    "created_by": {
      "id": 18
    },
    "created_at": "2020-01-21 10:53:36",
    "updated_at": "2020-01-21 10:53:36"
  },
  {
    "id": 191,
    "employee": {
      "id": 136,
      "string_represent": "John Doe"
    },
    "activity_date": "2020-09-15 16:00:51",
    "type": {
      "id": 411,
      "value": "Stage in recruitment"
    },
    "recruitment": {
      "id": 55
    },
    "content": {
      "content": "<div><p>Second comment after phone interview</p></div>",
      "state": {
        "id": 5,
        "name": "Phone interview"
      }
    },
    "created_by": {
      "id": 9
    },
    "created_at": "2020-09-15 16:00:51",
    "updated_at": "2020-09-15 16:00:51"
  },
  {
    "id": 195,
    "employee": {
      "id": 232,
      "string_represent": "Joe Novak"
    },
    "activity_date": "2020-10-28 07:48:18",
    "type": {
      "id": 15,
      "value": "Note"
    },
    "created_by": {
      "id": 28
    },
    "created_at": "2020-10-28 07:48:19",
    "updated_at": "2020-10-28 07:48:19"
  }
]
Headers
Content-Type: application/json
Body
{
  "error": "Bad comparison used."
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Example CURL:

curl -X GET "https://<your_traffit_name>.traffit.com/api/integration/v2/employees/activities?updated_at=2020-11-01&updated_at_comparison=>=&sort_by=created_at&sort_by_direction=ASC" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer abcdef1234" \
        -H 'X-Request-Page-Size: 12' \
        -H 'X-Request-Current-Page: 1'
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Request-Page-Size: 12'
X-Request-Current-Page: 1
Responses200400401
Headers
Content-Type: application/json
Body
[
  {
    "id": 105,
    "employee": {
      "id": 136,
      "string_represent": "John Doe"
    },
    "activity_date": "2020-01-21 10:53:36",
    "type": {
      "id": 411,
      "value": "Stage in recruitment"
    },
    "recruitment": {
      "id": 53
    },
    "content": {
      "content": "<div><p>Comment after phone interview</p></div>",
      "state": {
        "id": 5,
        "name": "Phone interview"
      }
    },
    "created_by": {
      "id": 18
    },
    "created_at": "2020-01-21 10:53:36",
    "updated_at": "2020-01-21 10:53:36"
  },
  {
    "id": 191,
    "employee": {
      "id": 136,
      "string_represent": "John Doe"
    },
    "activity_date": "2020-09-15 16:00:51",
    "type": {
      "id": 411,
      "value": "Stage in recruitment"
    },
    "recruitment": {
      "id": 55
    },
    "content": {
      "content": "<div><p>Second comment after phone interview</p></div>",
      "state": {
        "id": 5,
        "name": "Phone interview"
      }
    },
    "created_by": {
      "id": 9
    },
    "created_at": "2020-09-15 16:00:51",
    "updated_at": "2020-09-15 16:00:51"
  },
  {
    "id": 195,
    "employee": {
      "id": 232,
      "string_represent": "Joe Novak"
    },
    "activity_date": "2020-10-28 07:48:18",
    "type": {
      "id": 15,
      "value": "Note"
    },
    "created_by": {
      "id": 28
    },
    "created_at": "2020-10-28 07:48:19",
    "updated_at": "2020-10-28 07:48:19"
  }
]
Headers
Content-Type: application/json
Body
{
  "error": "Bad comparison used."
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Get candidates activities
GET/api/integration/v2/employees/activities

Get candidates activities.

Required scope of authorization token: employee

Supported headers:

Authorization,

X-Request-Page-Size,

X-Request-Current-Page,

Supported query field for filtering:

Query field name Example values Required comparison field Available comparators
created_at 2020-11-01, 2021-01-04 12:10:00 created_at_comparison =, !=, >=, <=
updated_at 2020-11-01, 2021-01-04 12:10:00 updated_at_comparison =, !=, >=, <=
id 3 id_comparison =, !=, >=, <=
sort_by created_at, updated_at sort_by_direction ASC, DESC
type 15 (id of type in Traffit) type_comparison =, !=
activity_date 2020-11-01, 2021-01-04 12:10:00 updated_at_comparison =, !=, >=, <=
employee_id 231 employee_id_comparison =, !=
created_by_id 1 created_by_id_comparison =, !=

Get candidates jobs history

GET https://www.<your_traffit_name>.traffit.com/api/integration/v2/employees/recruitment_history
RequestsWithout query paramsWith 1 query paramWith 2 query params

Example CURL:

curl -X GET "https://<your_traffit_name>.traffit.com/api/integration/v2/employees/recruitment_history" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer abcdef1234" \
        -H 'X-Request-Page-Size: 12' \
        -H 'X-Request-Current-Page: 1'
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Request-Page-Size: 12'
X-Request-Current-Page: 1
Responses200400401
Headers
Content-Type: application/json
Body
[
  {
    "id": 396,
    "employee": {
      "id": 137
    },
    "recruitment": {
      "id": 131
    },
    "workflow_state": {
      "id": 1,
      "name": "New",
      "sid": "Nowy"
    },
    "created_at": "2020-01-21 10:47:33",
    "updated_at": "2020-01-21 10:47:33"
  },
  {
    "id": 397,
    "employee": {
      "id": 136
    },
    "recruitment": {
      "id": 128
    },
    "workflow_state": {
      "id": 1,
      "name": "New",
      "sid": "Nowy"
    },
    "created_at": "2020-01-21 10:53:36",
    "updated_at": "2020-01-21 10:53:36",
    "created_by": {
      "id": 18
    },
    "updated_by": {
      "id": 18
    }
  }
]
Headers
Content-Type: application/json
Body
{
  "error": "Bad comparison used."
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Example CURL:

curl -X GET "https://<your_traffit_name>.traffit.com/api/integration/v2/employees/recruitment_history?created_at=2020-11-01&created_at_comparison=>=" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer abcdef1234" \
        -H 'X-Request-Page-Size: 12' \
        -H 'X-Request-Current-Page: 1'
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Request-Page-Size: 12'
X-Request-Current-Page: 1
Responses200400401
Headers
Content-Type: application/json
Body
[
  {
    "id": 396,
    "employee": {
      "id": 137
    },
    "recruitment": {
      "id": 131
    },
    "workflow_state": {
      "id": 1,
      "name": "New",
      "sid": "Nowy"
    },
    "created_at": "2020-01-21 10:47:33",
    "updated_at": "2020-01-21 10:47:33"
  },
  {
    "id": 397,
    "employee": {
      "id": 136
    },
    "recruitment": {
      "id": 128
    },
    "workflow_state": {
      "id": 1,
      "name": "New",
      "sid": "Nowy"
    },
    "created_at": "2020-01-21 10:53:36",
    "updated_at": "2020-01-21 10:53:36",
    "created_by": {
      "id": 18
    },
    "updated_by": {
      "id": 18
    }
  }
]
Headers
Content-Type: application/json
Body
{
  "error": "Bad comparison used."
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Example CURL:

curl -X GET "https://<your_traffit_name>.traffit.com/api/integration/v2/employees/recruitment_history?updated_at=2020-11-01&updated_at_comparison=>=&sort_by=created_at&sort_by_direction=ASC" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer abcdef1234" \
        -H 'X-Request-Page-Size: 12' \
        -H 'X-Request-Current-Page: 1'
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Request-Page-Size: 12'
X-Request-Current-Page: 1
Responses200400401
Headers
Content-Type: application/json
Body
[
  {
    "id": 396,
    "employee": {
      "id": 137
    },
    "recruitment": {
      "id": 131
    },
    "workflow_state": {
      "id": 1,
      "name": "New",
      "sid": "Nowy"
    },
    "created_at": "2020-01-21 10:47:33",
    "updated_at": "2020-01-21 10:47:33"
  },
  {
    "id": 397,
    "employee": {
      "id": 136
    },
    "recruitment": {
      "id": 128
    },
    "workflow_state": {
      "id": 1,
      "name": "New",
      "sid": "Nowy"
    },
    "created_at": "2020-01-21 10:53:36",
    "updated_at": "2020-01-21 10:53:36",
    "created_by": {
      "id": 18
    },
    "updated_by": {
      "id": 18
    }
  }
]
Headers
Content-Type: application/json
Body
{
  "error": "Bad comparison used."
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Get candidates jobs history
GET/api/integration/v2/employees/recruitment_history

Get candidates jobs history.

Required scope of authorization token: employee

Supported headers:

Authorization,

X-Request-Page-Size,

X-Request-Current-Page,

Supported query field for filtering:

Query field name Example values Required comparison field Available comparators
created_at 2020-11-01, 2021-01-04 12:10:00 created_at_comparison =, !=, >=, <=
updated_at 2020-11-01, 2021-01-04 12:10:00 updated_at_comparison =, !=, >=, <=
id 3 id_comparison =, !=, >=, <=
sort_by created_at, updated_at sort_by_direction ASC, DESC
employee_id 3 - =
recruitment_id 13 - =
workflow_state_type start - =
workflow_state_id 2 - =

Add note to the candidate

POST https://www.<your_traffit_name>.traffit.com/api/integration/v2/employees/123/notes
RequestsAdd note to the candidate

Example CURL:

curl -X POST "https://<your_traffit_name>.traffit.com/api/integration/v2/employees/123/notes" \
     -H "accept: application/json" \
     -H "Authorization: Bearer abcdef1234" \
     -H "Content-Type: application/json" \
     -d "{ \"title\": \"string\", \"content\": \"string\"}"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Body
{
  "title": "string",
  "content": "string"
}
Responses204400404
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Validation Failed",
  "errors": "<list_of_errors>"
}

Candidate not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Add note to the candidate
POST/api/integration/v2/employees/{employee_id}/notes

URI Parameters
HideShow
employee_id
int (required) Example: 123

Employee ID


Get candidate talents

GET https://www.<your_traffit_name>.traffit.com/api/integration/v2/employees/123/talents
RequestsSearch by ID

Example CURL:

curl -X GET "https://<your_traffit_name>.traffit.com/api/integration/v2/employees/123/talents" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer abcdef1234" \
        -H 'X-Request-Page-Size: 2' \
        -H 'X-Request-Current-Page: 1'
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Request-Page-Size: 2
X-Request-Current-Page: 1
Responses200401404
Headers
Content-Type: application/json
Body
[
  {
    "id": 1,
    "name": "Sales managerowie",
    "public": 1
  }
]
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Candidate not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Get candidate talents
GET/api/integration/v2/employees/{employee_id}/talents

Get candidate talents by ID.

Required scope of authorization token: employee

Supported headers:

Authorization,

X-Request-Page-Size,

X-Request-Current-Page,

URI Parameters
HideShow
employee_id
int (required) Example: 123

Employee ID


Get candidate files

GET https://www.<your_traffit_name>.traffit.com/api/v2/integration/employees/123/files/123
Requestscandidate file infocandidate file contentGet response format

Example CURL:

curl -X GET "https://<your_traffit_name>.traffit.com/api/integration/v2/employees/123/files/123" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer abcdef1234"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Responses200401404
Headers
Content-Type: application/json
Body
[
  {
    "id": 44,
    "name": "rachel_cv.pdf",
    "type": "employee_file_last_cv"
  }
]
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

File not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Example CURL:

curl -X GET "https://<your_traffit_name>.traffit.com/api/integration/v2/employees/123/files/123/content" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer abcdef1234" \
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Responses200404
Headers
Content-Type: Content-Type

File not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Responses200404
Headers
Content-Type: Content-Type

File not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Get candidate files
GET/api/v2/integration/employees/{employee_id}/files/{file_id}

Get a single candidate file.

Required scope of authorization token: employee

Supported headers:

Authorization

URI Parameters
HideShow
employee_id
int (required) Example: 123

Employee ID

file_id
int (optional) Example: 123

File ID


Get candidate provisions

GET https://www.<your_traffit_name>.traffit.com/api/integration/v2/employees/123/provisions
RequestsSearch by IDWith 1 query paramWith 2 query params

Example CURL:

curl -X GET "https://<your_traffit_name>.traffit.com/api/integration/v2/employees/202/provisions" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer abcdef1234" \
        -H 'X-Request-Page-Size: 2' \
        -H 'X-Request-Current-Page: 1'
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Request-Page-Size: 2
X-Request-Current-Page: 1
Responses200401404
Headers
Content-Type: application/json
Body
[
  {
    "communication_channels": [
      "email",
      "phone",
      "sms"
    ],
    "id": 352,
    "provision": {
      "id": 11
    },
    "advert": {
      "id": 24
    },
    "recruitment": {
      "id": 56
    },
    "withdraw_date": "2023-01-26 09:42:04",
    "content": "I agree.",
    "created_at": "2021-01-26 09:42:04"
  },
  {
    "communication_channels": [
      "email",
      "phone",
      "sms"
    ],
    "id": 353,
    "provision": {
      "id": 12
    },
    "advert": {
      "id": 24
    },
    "recruitment": {
      "id": 56
    },
    "withdraw_date": "2021-02-16 12:50:24",
    "content": "I agree for this also.",
    "created_at": "2021-01-26 09:42:04"
  }
]
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Candidate not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Example CURL:

curl -X GET "https://<your_traffit_name>.traffit.com/api/integration/v2/employees/202/provisions?provision_id=11" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer abcdef1234" \
        -H 'X-Request-Page-Size: 12' \
        -H 'X-Request-Current-Page: 1'
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Request-Page-Size: 12'
X-Request-Current-Page: 1
Responses200401404
Headers
Content-Type: application/json
Body
[
  {
    "communication_channels": [
      "email",
      "phone",
      "sms"
    ],
    "id": 352,
    "provision": {
      "id": 11
    },
    "advert": {
      "id": 24
    },
    "recruitment": {
      "id": 56
    },
    "withdraw_date": "2023-01-26 09:42:04",
    "content": "I agree.",
    "created_at": "2021-01-26 09:42:04"
  },
  {
    "communication_channels": [
      "email",
      "phone",
      "sms"
    ],
    "id": 353,
    "provision": {
      "id": 12
    },
    "advert": {
      "id": 24
    },
    "recruitment": {
      "id": 56
    },
    "withdraw_date": "2021-02-16 12:50:24",
    "content": "I agree for this also.",
    "created_at": "2021-01-26 09:42:04"
  }
]
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Candidate not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Example CURL:

curl -X GET "https://<your_traffit_name>.traffit.com/api/integration/v2/employees/202/provisions?recruitment_id=5&provision_id=11" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer abcdef1234" \
        -H 'X-Request-Page-Size: 12' \
        -H 'X-Request-Current-Page: 1'
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Request-Page-Size: 12'
X-Request-Current-Page: 1
Responses200401404
Headers
Content-Type: application/json
Body
[
  {
    "communication_channels": [
      "email",
      "phone",
      "sms"
    ],
    "id": 352,
    "provision": {
      "id": 11
    },
    "advert": {
      "id": 24
    },
    "recruitment": {
      "id": 56
    },
    "withdraw_date": "2023-01-26 09:42:04",
    "content": "I agree.",
    "created_at": "2021-01-26 09:42:04"
  },
  {
    "communication_channels": [
      "email",
      "phone",
      "sms"
    ],
    "id": 353,
    "provision": {
      "id": 12
    },
    "advert": {
      "id": 24
    },
    "recruitment": {
      "id": 56
    },
    "withdraw_date": "2021-02-16 12:50:24",
    "content": "I agree for this also.",
    "created_at": "2021-01-26 09:42:04"
  }
]
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Candidate not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Get candidate provisions
GET/api/integration/v2/employees/{employee_id}/provisions

Get candidate provisions by ID.

Required scope of authorization token: employee

Supported headers:

Authorization,

X-Request-Page-Size,

X-Request-Current-Page,

Supported query field for filtering:

Query field name Example values
advert_id 3
recruitment_id 231
provision_id 33
URI Parameters
HideShow
employee_id
int (required) Example: 123

Employee ID


Get candidates provisions

GET https://www.<your_traffit_name>.traffit.com/api/integration/v2/employees/provisions
RequestsWithout sort query paramsWith sort query params

Example CURL:

curl -X GET "https://<your_traffit_name>.traffit.com/api/integration/v2/employees/provisions" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer abcdef1234" \
        -H 'X-Request-Page-Size: 2' \
        -H 'X-Request-Current-Page: 1'
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Request-Page-Size: 2
X-Request-Current-Page: 1
Responses200400401
Headers
Content-Type: application/json
Body
[
  {
    "communication_channels": [
      "email",
      "phone",
      "sms"
    ],
    "id": 26,
    "employee": {
      "id": 26
    },
    "provision": {
      "id": 1
    },
    "advert": {
      "id": 23
    },
    "withdraw_date": "2024-07-28 07:23:02",
    "content": "I agree.",
    "created_at": "2022-07-28 07:23:02",
    "updated_at": "2022-07-28 07:23:02"
  },
  {
    "communication_channels": [
      "email",
      "phone",
      "sms"
    ],
    "id": 22,
    "employee": {
      "id": 22
    },
    "provision": {
      "id": 1
    },
    "recruitment": {
      "id": 13
    },
    "withdraw_date": "2024-07-28 02:25:09",
    "content": "I agree for this also.",
    "created_at": "2022-07-28 02:25:09",
    "updated_at": "2022-07-28 02:25:09"
  }
]
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Validation Failed",
  "errors": "<list_of_errors>"
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Example CURL:

curl -X GET "https://<your_traffit_name>.traffit.com/api/integration/v2/employees/provisions?sort_by=updated_at&sort_by_direction=ASC" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer abcdef1234" \
        -H 'X-Request-Page-Size: 12' \
        -H 'X-Request-Current-Page: 1'
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Request-Page-Size: 12
X-Request-Current-Page: 1
Responses200400401
Headers
Content-Type: application/json
Body
[
  {
    "communication_channels": [
      "email",
      "phone",
      "sms"
    ],
    "id": 26,
    "employee": {
      "id": 26
    },
    "provision": {
      "id": 1
    },
    "advert": {
      "id": 23
    },
    "withdraw_date": "2024-07-28 07:23:02",
    "content": "I agree.",
    "created_at": "2022-07-28 07:23:02",
    "updated_at": "2022-07-28 07:23:02"
  },
  {
    "communication_channels": [
      "email",
      "phone",
      "sms"
    ],
    "id": 22,
    "employee": {
      "id": 22
    },
    "provision": {
      "id": 1
    },
    "recruitment": {
      "id": 13
    },
    "withdraw_date": "2024-07-28 02:25:09",
    "content": "I agree for this also.",
    "created_at": "2022-07-28 02:25:09",
    "updated_at": "2022-07-28 02:25:09"
  }
]
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Validation Failed",
  "errors": "<list_of_errors>"
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Get candidates provisions
GET/api/integration/v2/employees/provisions

Get candidates provisions.

Required scope of authorization token: employee

Supported headers:

Authorization,

X-Request-Page-Size,

X-Request-Current-Page,

Supported query field for sorting:

Query field name Supported values Required comparison field Available comparators
sort_by id, created_at, updated_at sort_by_direction ASC, DESC

Get candidate sources

GET https://www.<your_traffit_name>.traffit.com/api/integration/v2/sources/employees/123
RequestsWithout query params

Example CURL:

curl -X GET "https://<your_traffit_name>.traffit.com/api/integration/v2/sources/employees/123" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer abcdef1234" \
        -H 'X-Request-Page-Size: 12' \
        -H 'X-Request-Current-Page: 1'
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Request-Page-Size: 12
X-Request-Current-Page: 1
Responses200404
Headers
Content-Type: application/json
Body
[
  {
    "id": 1,
    "domain": "Reference",
    "url": "Reference",
    "dictionary_item": {
      "id": 168
    },
    "employee_application": {
      "recruitment": {
        "id": 1
      }
    }
  },
  {
    "id": 2,
    "domain": "Reference",
    "url": "Reference",
    "dictionary_item": {
      "id": 168
    },
    "employee_application": {
      "recruitment": {
        "id": 2
      }
    }
  },
  {
    "id": 5,
    "domain": "Reference",
    "url": "Reference",
    "dictionary_item": {
      "id": 168
    },
    "employee_application": {
      "recruitment": {
        "id": 3
      }
    }
  }
]

Candidate not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Get candidate sources
GET/api/integration/v2/sources/employees/{employee_id}

Get candidate sources.

Required scope of authorization token: source

Supported headers:

Authorization,

X-Request-Page-Size,

X-Request-Current-Page,

URI Parameters
HideShow
employee_id
int (required) Example: 123

Employee ID


Job

Create new job

POST https://www.<your_traffit_name>.traffit.com/api/integration/v2/recruitments/
RequestsCreate job

Example CURL:

curl -X PUT "https://<your_traffit_name>.traffit.com/api/integration/v2/recruitments/" \
     -H "accept: application/json" \
     -H "Authorization: Bearer abcdef1234" \
     -H "Content-Type: application/json" \
     -d "{ \"name\": \"new recruitment\", \"guid\": \"some hash\", \"synchro_time\": \"2021-01-06 07:46:39\", \"client\": \"1\", \"workflow\": \"1\"}"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Body
{
  "name": "new recruitment",
  "guid": "some hash",
  "synchro_time": "2021-01-06 07:46:39",
  "client": "1",
  "workflow": "1"
}
Responses201400401403
Headers
Content-Type: application/json
Body
{
  "id": 163
}
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Validation Failed",
  "errors": "<list_of_errors>"
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 403,
    "message": "Forbidden"
  }
}

Create new job
POST/api/integration/v2/recruitments/

Create new job

Required scope of authorization token: recruitment

Supported headers:

Authorization,

X-Request-Metadata


Update job

PATCH https://www.<your_traffit_name>.traffit.com/api/integration/v2/recruitments/
RequestsUpdate job

Example CURL:

curl -X PUT "https://<your_traffit_name>.traffit.com/api/integration/v2/recruitments/123" \
     -H "accept: application/json" \
     -H "Authorization: Bearer abcdef1234" \
     -H "Content-Type: application/json" \
     -d "{ \"name\": \"new recruitment\", \"guid\": \"some hash\", \"synchro_time\": \"2021-01-06 07:46:39\", \"client\": \"1\", \"workflow\": \"1\"}"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Body
{
  "name": "new recruitment",
  "guid": "some hash",
  "synchro_time": "2021-01-06 07:46:39",
  "client": "1",
  "workflow": "1"
}
Responses204400401403404
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Validation Failed",
  "errors": "<list_of_errors>"
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 403,
    "message": "Forbidden"
  }
}

Job not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Update job
PATCH/api/integration/v2/recruitments/

Update all job data

Required scope of authorization token: recruitment

Supported headers:

Authorization,

X-Request-Metadata

URI Parameters
HideShow
recruitment_id
int (required) Example: 123

Job ID


Update single fields on the job

PATCH https://www.<your_traffit_name>.traffit.com/api/integration/v2/recruitments/123
RequestsUpdate job
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Body
{
  "name": "new job name",
  "synchro_time": "2020-08-27 09:01:15",
  "_additional_custom_field": "Custom value"
}
Responses204400401403404
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Validation Failed",
  "errors": "<list_of_errors>"
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 403,
    "message": "Forbidden"
  }
}

Job not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Update single fields on the job
PATCH/api/integration/v2/recruitments/{recruitment_id}

Update selected fields on the job.

Required scope of authorization token: recruitment

Supported headers:

Authorization,

X-Request-Metadata

URI Parameters
HideShow
recruitment_id
int (required) Example: 123

Job ID


Get single job

GET https://www.<your_traffit_name>.traffit.com/api/integration/v2/recruitments/123
RequestsSearch by IDSearch by guidGet response format

Example CURL:

curl -X GET "https://<your_traffit_name>.traffit.com/api/integration/v2/recruitments/123" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer abcdef1234"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Responses200401403404
Headers
Content-Type: application/json
Body
{
  "workflow_id": 3,
  "id": 138,
  "status": "active",
  "name": "Name of recruitment",
  "client": {
    "id": 5,
    "name": "New client"
  },
  "responsible_person": [
    {
      "id": 1,
      "email": "test@example.com"
    },
    {
      "id": 12,
      "email": "test2@example.com"
    }
  ],
  "created_by": {
    "id": 18
  },
  "updated_by": {
    "id": 18
  },
  "created_at": "2020-02-10 08:49:39",
  "updated_at": "2020-04-27 11:15:40",
  "is_closed": false
}
Schema
{
  "fields": {
    "id": {
      "type": "integer",
      "required": true
    },
    "status": {
      "type": "text",
      "required": false
    },
    "created_at": {
      "type": "datetime",
      "required": true,
      "format": "yyyy-MM-dd HH:mm:ss"
    },
    "updated_at": {
      "type": "datetime",
      "required": true,
      "format": "yyyy-MM-dd HH:mm:ss"
    },
    "created_by": {
      "type": "user_entity",
      "required": true,
      "structure": [
        "id"
      ]
    },
    "updated_by": {
      "type": "user_entity",
      "required": true,
      "structure": [
        "id"
      ]
    },
    "guid": {
      "type": "text",
      "required": false
    },
    "synchro_time": {
      "type": "datetime",
      "required": false,
      "format": "yyyy-MM-dd HH:mm:ss"
    },
    "client": {
      "type": "client_entity",
      "required": true,
      "structure": [
        "id",
        "name"
      ]
    },
    "responsible_person": {
      "type": "user_entity",
      "required": false,
      "structure": [
        "id",
        "email"
      ]
    }
  }
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 403,
    "message": "Forbidden"
  }
}

Candidate not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Example CURL:

curl -X GET "https://<your_traffit_name>.traffit.com/api/integration/v2/recruitments/123" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer abcdef1234" \
        -H "X-Get-Find-By-Guid: true"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Get-Find-By-Guid: true
Responses200401403404
Headers
Content-Type: application/json
Body
{
  "workflow_id": 3,
  "id": 138,
  "status": "active",
  "name": "Name of recruitment",
  "client": {
    "id": 5,
    "name": "New client"
  },
  "responsible_person": [
    {
      "id": 1,
      "email": "test@example.com"
    },
    {
      "id": 12,
      "email": "test2@example.com"
    }
  ],
  "created_by": {
    "id": 18
  },
  "updated_by": {
    "id": 18
  },
  "created_at": "2020-02-10 08:49:39",
  "updated_at": "2020-04-27 11:15:40",
  "is_closed": false
}
Schema
{
  "fields": {
    "id": {
      "type": "integer",
      "required": true
    },
    "status": {
      "type": "text",
      "required": false
    },
    "created_at": {
      "type": "datetime",
      "required": true,
      "format": "yyyy-MM-dd HH:mm:ss"
    },
    "updated_at": {
      "type": "datetime",
      "required": true,
      "format": "yyyy-MM-dd HH:mm:ss"
    },
    "created_by": {
      "type": "user_entity",
      "required": true,
      "structure": [
        "id"
      ]
    },
    "updated_by": {
      "type": "user_entity",
      "required": true,
      "structure": [
        "id"
      ]
    },
    "guid": {
      "type": "text",
      "required": false
    },
    "synchro_time": {
      "type": "datetime",
      "required": false,
      "format": "yyyy-MM-dd HH:mm:ss"
    },
    "client": {
      "type": "client_entity",
      "required": true,
      "structure": [
        "id",
        "name"
      ]
    },
    "responsible_person": {
      "type": "user_entity",
      "required": false,
      "structure": [
        "id",
        "email"
      ]
    }
  }
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 403,
    "message": "Forbidden"
  }
}

Candidate not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Response-Metadata: true
Responses200401403404
Headers
Content-Type: application/json
Body
{
  "workflow_id": 3,
  "id": 138,
  "status": "active",
  "name": "Name of recruitment",
  "client": {
    "id": 5,
    "name": "New client"
  },
  "responsible_person": [
    {
      "id": 1,
      "email": "test@example.com"
    },
    {
      "id": 12,
      "email": "test2@example.com"
    }
  ],
  "created_by": {
    "id": 18
  },
  "updated_by": {
    "id": 18
  },
  "created_at": "2020-02-10 08:49:39",
  "updated_at": "2020-04-27 11:15:40",
  "is_closed": false
}
Schema
{
  "fields": {
    "id": {
      "type": "integer",
      "required": true
    },
    "status": {
      "type": "text",
      "required": false
    },
    "created_at": {
      "type": "datetime",
      "required": true,
      "format": "yyyy-MM-dd HH:mm:ss"
    },
    "updated_at": {
      "type": "datetime",
      "required": true,
      "format": "yyyy-MM-dd HH:mm:ss"
    },
    "created_by": {
      "type": "user_entity",
      "required": true,
      "structure": [
        "id"
      ]
    },
    "updated_by": {
      "type": "user_entity",
      "required": true,
      "structure": [
        "id"
      ]
    },
    "guid": {
      "type": "text",
      "required": false
    },
    "synchro_time": {
      "type": "datetime",
      "required": false,
      "format": "yyyy-MM-dd HH:mm:ss"
    },
    "client": {
      "type": "client_entity",
      "required": true,
      "structure": [
        "id",
        "name"
      ]
    },
    "responsible_person": {
      "type": "user_entity",
      "required": false,
      "structure": [
        "id",
        "email"
      ]
    }
  }
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 403,
    "message": "Forbidden"
  }
}

Candidate not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Get single job
GET/api/integration/v2/recruitments/{recruitment_id}

Get a single job by ID or guid.

Required scope of authorization token: recruitment

Supported headers:

Authorization,

X-Get-Find-By-Guid,

X-Response-Metadata

URI Parameters
HideShow
recruitment_id
int (required) Example: 123

Job ID


Get jobs list

GET https://www.<your_traffit_name>.traffit.com/api/integration/v2/recruitments/
RequestsGet paginated results

Example CURL:

curl -X GET 'https://<your_traffit_name>.traffit.com/api/integration/v2/recruitments/' \
            -H 'Authorization: Bearer abcdef1234' \
            -H 'X-Request-Page-Size: 2' \
            -H 'X-Request-Current-Page: 1' \
            -H 'X-Request-Filter: {"created_at": {"value": "2020-01-02", "comparison": "<="}}' \
            -H 'X-Request-Sort: {"id" : "ASC"}'
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Request-Page-Size: 2
X-Request-Current-Page: 1
X-Request-Sort: {"id" : "ASC"}
X-Request-Filter: {"created_at": {"value": "2020-01-02", "comparison": "<="} }
Responses200400401
Headers
Content-Type: application/json
Body
[
  {
    "id": 120,
    "status": "active",
    "name": "New job",
    "client": {
      "id": 5,
      "name": "New client"
    },
    "created_by": {
      "id": 1
    },
    "updated_by": {
      "id": 1
    },
    "created_at": "2019-01-22 14:57:33",
    "updated_at": "2019-01-22 14:58:13",
    "is_closed": false
  },
  {
    "id": 132,
    "status": "active",
    "name": "New second job",
    "client": {
      "id": 2,
      "name": "New second client"
    },
    "created_by": {
      "id": 18
    },
    "created_at": "2020-01-21 15:04:52",
    "updated_at": "2020-01-22 10:08:38",
    "is_closed": true,
    "closing_date": "2021-06-29 08:56:17"
  }
]
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 400,
    "message": "Bad Request"
  }
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Get jobs list
GET/api/integration/v2/recruitments/

Retrieve all your jobs

Required scope of authorization token: recruitment

Supported headers:

Authorization ,

X-Request-Page-Size,

X-Request-Current-Page,

X-Request-Filter,

X-Request-Sort,

X-Response-Metadata

Supported comparators for sorting by system fields:

System field name Available comparators
id =, !=, <=, >=
name =, !=, like
status =, !=, like
guid =, !=, like
created_at =, !=, <=, >=
updated_at =, !=, <=, >=

Get candidates from job

GET https://www.<your_traffit_name>.traffit.com/api/integration/v2/recruitments/222/employees
RequestsGet paginated results

Example CURL:

curl -X GET 'https://<your_traffit_name>.traffit.com/api/integration/v2/recruitments/222/employees' \
            -H 'Authorization: Bearer abcdef1234' \
            -H 'X-Request-Page-Size: 2' \
            -H 'X-Request-Current-Page: 1' \
            -H 'X-Request-Filter: {"created_at": {"value": "2020-01-02", "comparison": "<="}}' \
            -H 'X-Request-Sort: {"id": "ASC"}'
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Request-Page-Size: 2
X-Request-Current-Page: 1
X-Request-Sort: {"id" : "ASC"}
X-Request-Filter: {"created_at": {"value": "2020-01-02", "comparison": "<="}}
Responses200400401
Headers
Content-Type: application/json
Body
[
  {
    "id": 2226874,
    "name": "Test",
    "lastname": "Candidate",
    "status": "active",
    "files": [],
    "email": "test111@test.com",
    "created_at": "2014-08-29 16:58:27",
    "updated_at": "2017-03-31 19:24:49"
  },
  {
    "id": 2359010,
    "name": "Test 2",
    "lastname": "Candidate",
    "status": "active",
    "files": [],
    "email": "test112@test.com",
    "created_at": "2012-05-30 14:15:40",
    "updated_at": "2012-05-30 14:16:35"
  }
]
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 400,
    "message": "Bad Request"
  }
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Get candidates from job
GET/api/integration/v2/recruitments/{recruitment_id}/employees

Get candidates from the specific job

Required scope of authorization token: recruitment

Supported headers:

Authorization ,

X-Request-Page-Size,

X-Request-Current-Page,

X-Request-Filter,

X-Request-Sort,

X-Response-Metadata

Supported comparators for filtering by system fields:

System field name Available comparators
id =, !=, <=, >=
name =, !=, like
lastname =, !=, like
guid =, !=, like
email =, !=, like
created_at =, !=, <=, >=
updated_at =, !=, <=, >=
synchro_time =, !=, <=, >=
URI Parameters
HideShow
recruitment_id
int (required) Example: 222

Job ID


Add candidate to the recruitment

POST https://www.<your_traffit_name>.traffit.com/api/integration/v2/recruitments/222/employees/123
RequestsAdd candidate to the job

Example CURL:

curl -X POST "https://<your_traffit_name>.traffit.com/api/integration/v2/recruitments/222/employees/123" \
     -H "accept: application/json" \
     -H "Authorization: Bearer abcdef1234" \
     -H "Content-Type: application/json" \
     -F 'source_dictionary_item_id="381"'
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Body
{
    "source_dictionary_item_id": "381" //optional, system value is set by default
}
Responses204400401403404409
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Validation Failed",
  "errors": {
    "children": {
      "source_dictionary_item_id": {
        "errors": "<list_of_errors>"
      }
    }
  }
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 403,
    "message": "Forbidden"
  }
}

Job or candidate not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}
Headers
Content-Type: application/json
Body
[
  "Employee in recruitment!"
]

Add candidate to the recruitment
POST/api/integration/v2/recruitments/{recruitment_id}/employees/{employee_id}

URI Parameters
HideShow
recruitment_id
int (required) Example: 222

Job ID

employee_id
int (required) Example: 123

Employee ID


Get job states

GET https://www.<your_traffit_name>.traffit.com/api/integration/v2/recruitments/123/states
RequestsGet job states

Example CURL:

curl -X GET "https://<your_traffit_name>.traffit.com/api/integration/v2/recruitments/123/states" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer abcdef1234" \
        -H 'X-Request-Page-Size: 2' \
        -H 'X-Request-Current-Page: 1'
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Request-Page-Size: 2
X-Request-Current-Page: 1
Responses200401403404
Headers
Content-Type: application/json
Body
[
  {
    "id": 1,
    "name": "New",
    "sid": "Nowy",
    "type": "start",
    "workflow": {
      "id": 1
    },
    "time_limit": 1,
    "order": 0
  },
  {
    "id": 3,
    "name": "Video call",
    "workflow": {
      "id": 1
    },
    "time_limit": 4,
    "order": 1
  },
  {
    "id": 4,
    "name": "Meeting at the office",
    "workflow": {
      "id": 1
    },
    "order": 2
  },
  {
    "id": 5,
    "name": "Offer",
    "workflow": {
      "id": 1
    },
    "order": 3
  }
]
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 403,
    "message": "Forbidden"
  }
}

Job not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Get job states
GET/api/integration/v2/recruitments/{recruitment_id}/states

Get job states.

Required scope of authorization token: recruitment

Supported headers:

Authorization,

X-Request-Page-Size,

X-Request-Current-Page,

URI Parameters
HideShow
recruitment_id
int (required) Example: 123

Job ID


Get candidates from job state

GET https://www.<your_traffit_name>.traffit.com/api/integration/v2/recruitments/123/states/3/employees
RequestsGet job states

Example CURL:

curl -X GET "https://<your_traffit_name>.traffit.com/api/integration/v2/recruitments/123/states/3/employees" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer abcdef1234" \
        -H 'X-Request-Page-Size: 2' \
        -H 'X-Request-Current-Page: 1'
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Request-Page-Size: 2
X-Request-Current-Page: 1
Responses200401403404
Headers
Content-Type: application/json
Body
[
  {
    "id": 22,
    "name": "Mona",
    "lastname": "TheGirlfriend",
    "status": "active",
    "email": "mona@rossesgrlf.com"
  },
  {
    "id": 7,
    "name": "Gunther",
    "lastname": "Centralperk",
    "status": "active",
    "email": "gunther@centralperktraffit.com",
    "source": {
      "id": 200,
      "value": "linkedin.com"
    }
  }
]
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 403,
    "message": "Forbidden"
  }
}

Job or stage in job not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Get candidates from job state
GET/api/integration/v2/recruitments/{recruitment_id}/states/{state_id}/employees

Get candidates from the job on the specific state.

Required scope of authorization token: recruitment

Supported headers:

Authorization,

X-Request-Page-Size,

X-Request-Current-Page,

URI Parameters
HideShow
recruitment_id
int (required) Example: 123

Job ID

state_id
int (required) Example: 3

State ID


Get job states counter

GET https://www.<your_traffit_name>.traffit.com/api/integration/v2/recruitments/123/states/counter
RequestsGet job states counter

Example CURL:

curl -X GET "https://<your_traffit_name>.traffit.com/api/integration/v2/recruitments/123/states/counter" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer abcdef1234" \
        -H 'X-Request-Page-Size: 2' \
        -H 'X-Request-Current-Page: 1'
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Request-Page-Size: 2
X-Request-Current-Page: 1
Responses200401403404
Headers
Content-Type: application/json
Body
[
  {
    "stateCount": "1",
    "state": "1"
  },
  {
    "stateCount": "1",
    "state": "3"
  },
  {
    "stateCount": "2",
    "state": "5"
  },
  {
    "stateCount": "1",
    "state": "6"
  }
]
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 403,
    "message": "Forbidden"
  }
}

Job not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Get job states counter
GET/api/integration/v2/recruitments/{recruitment_id}/states/counter

Get job states counter.

Required scope of authorization token: recruitment

Supported headers:

Authorization,

X-Request-Page-Size,

X-Request-Current-Page,

URI Parameters
HideShow
recruitment_id
int (required) Example: 123

Job ID


Get all job rejections

GET https://www.<your_traffit_name>.traffit.com/api/integration/v2/recruitments/123/rejections
RequestsGet all job rejections

Example CURL:

curl -X GET "https://<your_traffit_name>.traffit.com/api/integration/v2/recruitments/123/rejections" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer abcdef1234" \
        -H 'X-Request-Page-Size: 2' \
        -H 'X-Request-Current-Page: 1'
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Request-Page-Size: 2
X-Request-Current-Page: 1
Responses200401403404
Headers
Content-Type: application/json
Body
[
  {
    "state_type": "end-bad",
    "id": 1,
    "name": "Candidate refused to offer"
  },
  {
    "state_type": "end-bad",
    "id": 2,
    "name": "No contact"
  }
]
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 403,
    "message": "Forbidden"
  }
}

Job not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Get all job rejections
GET/api/integration/v2/recruitments/{recruitment_id}/rejections

Get all job rejection states.

Required scope of authorization token: recruitment

Supported headers:

Authorization,

X-Request-Page-Size,

X-Request-Current-Page,

URI Parameters
HideShow
recruitment_id
int (required) Example: 123

Job ID


Get job pending rejections

GET https://www.<your_traffit_name>.traffit.com/api/integration/v2/recruitments/123/rejections/wait
RequestsGet job pending rejections

Example CURL:

curl -X GET "https://<your_traffit_name>.traffit.com/api/integration/v2/recruitments/123/rejections/wait" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer abcdef1234" \
        -H 'X-Request-Page-Size: 2' \
        -H 'X-Request-Current-Page: 1'
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Request-Page-Size: 2
X-Request-Current-Page: 1
Responses200401403404
Headers
Content-Type: application/json
Body
[
  {
    "state_type": "wait",
    "id": 14,
    "name": "looks indecisive"
  },
  {
    "state_type": "wait",
    "id": 15,
    "name": "high financial expectations"
  }
]
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 403,
    "message": "Forbidden"
  }
}

Job not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Get job pending rejections
GET/api/integration/v2/recruitments/{recruitment_id}/rejections/wait

Get job pending rejection states.

Required scope of authorization token: recruitment

Supported headers:

Authorization,

X-Request-Page-Size,

X-Request-Current-Page,

URI Parameters
HideShow
recruitment_id
int (required) Example: 123

Job ID


Get job rejections

GET https://www.<your_traffit_name>.traffit.com/api/integration/v2/recruitments/123/rejections/end-bad
RequestsGet job pending rejections

Example CURL:

curl -X GET "https://<your_traffit_name>.traffit.com/api/integration/v2/recruitments/123/rejections/end-bad" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer abcdef1234" \
        -H 'X-Request-Page-Size: 2' \
        -H 'X-Request-Current-Page: 1'
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Request-Page-Size: 2
X-Request-Current-Page: 1
Responses200401403404
Headers
Content-Type: application/json
Body
[
  {
    "state_type": "end-bad",
    "id": 4,
    "name": "Refused"
  },
  {
    "state_type": "end-bad",
    "id": 5,
    "name": "Has better offer"
  }
]
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 403,
    "message": "Forbidden"
  }
}

Job not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Get job rejections
GET/api/integration/v2/recruitments/{recruitment_id}/rejections/end-bad

Get job rejection states.

Required scope of authorization token: recruitment

Supported headers:

Authorization,

X-Request-Page-Size,

X-Request-Current-Page,

URI Parameters
HideShow
recruitment_id
int (required) Example: 123

Job ID


Advert apply

POST https://www.<your_traffit_name>.traffit.com/api/integration/v2/adverts/123/_apply
Requestsget structureapply

Example CURL:

curl -X POST "https://<your_traffit_name>.traffit.com/api/integration/v2/adverts/11/_apply"  \
      -H "accept: application/json"  \
      -H "X-Request-Metadata: true" \
      -H "Authorization: Bearer 1234" \
      -H "Content-Type: application/json"
Headers
Content-Type: multipart/form-data
Authorization: Bearer abcdef1234
X-Request-Metadata: true
Responses200204400403404
Headers
Content-Type: application/json
Body
{
  "fields": {
    "72": {
      "type": "text",
      "required": true,
      "structure": [],
      "name": "First name"
    },
    "77": {
      "type": "traffit_choices_type",
      "required": false,
      "structure": [],
      "multiple": true,
      "choices": {
        "Italian": 26,
        "Polish": 42
      },
      "name": "What languages do you know? (besides native):"
    },
    "78": {
      "type": "file",
      "required": true,
      "structure": [],
      "name": "CV"
    },
    "provisions": {
      "type": "",
      "required": true,
      "structure": []
    }
  }
}
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Validation Failed",
  "errors": {
    "errors": [
      "This form should not contain extra fields."
    ]
  }
}
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 403,
    "message": "Forbidden"
  }
}
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Example CURL:

curl -X POST "https://<your_traffit_name>.traffit.com/api/integration/v2/adverts/11/_apply" \
     -H "accept: application/json" \
     -H "Authorization: Bearer 1234" \
     -H "Content-Type: multipart/form-data" \
     -F '78=@"/path/to/file"' \
     -F 'provisions[1]="1"' \
     -F '72="Peter"
Headers
Content-Type: multipart/form-data
Authorization: Bearer abcdef1234
Responses200204400403404
Headers
Content-Type: application/json
Body
{
  "fields": {
    "72": {
      "type": "text",
      "required": true,
      "structure": [],
      "name": "First name"
    },
    "77": {
      "type": "traffit_choices_type",
      "required": false,
      "structure": [],
      "multiple": true,
      "choices": {
        "Italian": 26,
        "Polish": 42
      },
      "name": "What languages do you know? (besides native):"
    },
    "78": {
      "type": "file",
      "required": true,
      "structure": [],
      "name": "CV"
    },
    "provisions": {
      "type": "",
      "required": true,
      "structure": []
    }
  }
}
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Validation Failed",
  "errors": {
    "errors": [
      "This form should not contain extra fields."
    ]
  }
}
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 403,
    "message": "Forbidden"
  }
}
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Advert apply
POST/api/integration/v2/adverts/{advert_id}/_apply

Apply

Required scope of authorization token: advert

Supported headers:

Authorization,

X-Request-Metadata (get advert structure)

URI Parameters
HideShow
advert_id
int (required) Example: 123

Advert ID


Get all job posts

GET https://www.<your_traffit_name>.traffit.com/api/integration/v2/recruitments/123/job_posts
RequestsGet all job posts

Example CURL:

curl -X GET "https://<your_traffit_name>.traffit.com/api/integration/v2/recruitments/123/job_posts" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer abcdef1234" \
        -H 'X-Request-Page-Size: 2' \
        -H 'X-Request-Current-Page: 1'
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Request-Page-Size: 2
X-Request-Current-Page: 1
Responses200401403404
Headers
Content-Type: application/json
Body
[
  {
    "id": 9,
    "name": "Test recruitment",
    "language": "pl",
    "multiposting": [],
    "publications": [
      {
        "id": 1,
        "nr_ref": "/33/07/2020/NfT",
        "url": "http://traffit.local/public/an/edc9PQ==",
        "valid_start": "2022-04-03 23:05:00",
        "valid_end": "2022-04-03 21:38:15"
      },
      {
        "id": 2,
        "nr_ref": "/33/07/2020/NfT",
        "url": "http://traffit.local/public/an/ec9PQ==",
        "valid_start": "2022-04-03 23:35:00",
        "valid_end": "2022-05-03 23:35:00"
      }
    ]
  },
  {
    "id": 10,
    "name": "Test job 2",
    "language": "pl",
    "multiposting": [],
    "publications": [
      {
        "id": 1,
        "nr_ref": "/33/07/2020/NfT",
        "url": "http://traffit.local/public/an/emAc9PQ==",
        "valid_start": "2022-04-03 23:05:00",
        "valid_end": "2022-04-03 21:38:15"
      },
      {
        "id": 2,
        "nr_ref": "/33/07/2020/NfT",
        "url": "http://traffit.local5/public/an/emc9dPQ==",
        "valid_start": "2022-04-03 23:35:00",
        "valid_end": "2022-05-03 23:35:00"
      }
    ]
  }
]
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 403,
    "message": "Forbidden"
  }
}

Job not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Get all job posts
GET/api/integration/v2/recruitments/{recruitment_id}/job_posts

Get all job posts

Required scope of authorization token: recruitment

Supported headers:

Authorization,

X-Request-Page-Size,

X-Request-Current-Page,

URI Parameters
HideShow
recruitment_id
int (required) Example: 123

Job ID


Get single job posts

GET https://www.<your_traffit_name>.traffit.com/api/integration/v2/recruitments/123/job_posts/123
RequestsGet single job post

Example CURL:

curl -X GET "https://<your_traffit_name>.traffit.com/api/integration/v2/recruitments/123/job_posts/9" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer abcdef1234" \
        -H 'X-Request-Page-Size: 2' \
        -H 'X-Request-Current-Page: 1'
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Request-Page-Size: 2
X-Request-Current-Page: 1
Responses200401403404404
Headers
Content-Type: application/json
Body
{
  "id": 9,
  "name": "Test job post",
  "language": "pl",
  "url": "http://traffit.local:1025/app_dev.php/public/an/emc9PQ==",
  "multiposting": [],
  "publications": [
    {
      "id": 1,
      "nr_ref": "/33/07/2020/NfT",
      "url": "http://traffit.local:1025/public/an/emc9PQ==",
      "valid_start": "2022-04-03 23:05:00",
      "valid_end": "2022-04-03 21:38:15"
    },
    {
      "id": 2,
      "nr_ref": "/33/07/2020/NfT",
      "url": "http://traffit.local:1025/public/an/emc9PQ==",
      "valid_start": "2022-04-03 23:35:00",
      "valid_end": "2022-05-03 23:35:00"
    }
  ]
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 403,
    "message": "Forbidden"
  }
}

Job not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Job post not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Get single job posts
GET/api/integration/v2/recruitments/{recruitment_id}/job_posts/{job_post_id}

Get single job posts

Required scope of authorization token: recruitment

Supported headers:

Authorization

URI Parameters
HideShow
recruitment_id
int (required) Example: 123

Job ID

job_post_id
int (required) Example: 123

Job post ID


Add owner/responsible person to the recruitment

POST https://www.<your_traffit_name>.traffit.com/api/integration/v2/recruitments/222/owners/123
RequestsAdd owner/responsible person to the recruitment

Example CURL:

curl -X POST "https://<your_traffit_name>.traffit.com/api/integration/v2/recruitments/222/owners/123" \
     -H "accept: application/json" \
     -H "Authorization: Bearer abcdef1234" \
     -H "Content-Type: application/json"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Responses204401403404409
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 403,
    "message": "Forbidden"
  }
}

Job or user not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}
Headers
Content-Type: application/json
Body
{
  "error": "User is already owner of this recruitment"
}

Add owner/responsible person to the recruitment
POST/api/integration/v2/recruitments/{recruitment_id}/owners/{user_id}

URI Parameters
HideShow
recruitment_id
int (required) Example: 222

Job ID

user_id
int (required) Example: 123

User ID


Remove owner/responsible person from the recruitment

DELETE https://www.<your_traffit_name>.traffit.com/api/integration/v2/recruitments/222/owners/123
RequestsRemove owner/responsible person from the recruitment

Example CURL:

curl -X POST "https://<your_traffit_name>.traffit.com/api/integration/v2/recruitments/222/owners/123" \
     -H "accept: application/json" \
     -H "Authorization: Bearer abcdef1234" \
     -H "Content-Type: application/json"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Responses202401403404409
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 403,
    "message": "Forbidden"
  }
}

Job or user not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}
Headers
Content-Type: application/json
Body
{
  "error": "User is not owner of this recruitment"
}

Remove owner/responsible person from the recruitment
DELETE/api/integration/v2/recruitments/{recruitment_id}/owners/{user_id}

URI Parameters
HideShow
recruitment_id
int (required) Example: 222

Job ID

user_id
int (required) Example: 123

User ID


Client

Create new client

POST https://www.<your_traffit_name>.traffit.com/api/integration/v2/clients/
RequestsCreate new client

Example CURL:

curl -X POST "https://<your_traffit_name>.traffit.com/api/integration/v2/clients/" \
     -H "accept: application/json" \
     -H "Authorization: Bearer abcdef1234" \
     -H "Content-Type: application/json" \
     -d "{ \"guid\": \"Some unique hash\", \"synchro_time\": \"2020-08-27 09:01:15\"}"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Body
{
  "guid": "Some unique hash",
  "synchro_time": "2020-08-27 09:01:15"
}
Responses201400401
Headers
Content-Type: application/json
Body
{
  "id": 122
}
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Validation Failed",
  "errors": "<list_of_errors>"
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Create new client
POST/api/integration/v2/clients/

Create client

Required scope of authorization token: client

Supported headers:

Authorization,

X-Request-Metadata


Update client

PUT https://www.<your_traffit_name>.traffit.com/api/integration/v2/clients/123
RequestsUpdate client

Example CURL:

curl -X PUT "https://<your_traffit_name>.traffit.com/api/integration/v2/clients/123" \
     -H "accept: application/json" \
     -H "Authorization: Bearer abcdef1234" \
     -H "Content-Type: application/json" \
     -d "{ \"guid\": \"Some other unique hash\", \"synchro_time\": \"2020-08-27 09:01:15\"}"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Body
{
  "guid": "Some other unique hash",
  "synchro_time": "2020-08-27 09:01:15"
}
Responses204400401404
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Validation Failed",
  "errors": "<list_of_errors>"
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Client not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Update client
PUT/api/integration/v2/clients/{client_id}

Update all client data

Required scope of authorization token: client

Supported headers:

Authorization,

X-Request-Metadata

URI Parameters
HideShow
client_id
int (required) Example: 123

Client ID


Update single fields on the client

PATCH https://www.<your_traffit_name>.traffit.com/api/integration/v2/clients/123
RequestsUpdate client
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Body
{
  "synchro_time": "2020-08-27 09:01:15",
  "_additional_custom_field": "Custom value"
}
Responses204400401404
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Validation Failed",
  "errors": "<list_of_errors>"
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Client not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Update single fields on the client
PATCH/api/integration/v2/clients/{client_id}

Update selected fields on the client.

Required scope of authorization token: client

Supported headers:

Authorization,

X-Request-Metadata

URI Parameters
HideShow
client_id
int (required) Example: 123

Client ID


Get single client

GET https://www.<your_traffit_name>.traffit.com/api/integration/v2/clients/123
RequestsSearch by IDSearch by guidGet response format

Example CURL:

curl -X GET "https://<your_traffit_name>.traffit.com/api/integration/v2/clients/123" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer abcdef1234"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Responses200401404
Headers
Content-Type: application/json
Body
{
  "id": 5,
  "created_by": {
    "id": 13
  },
  "updated_by": {
    "id": 13
  },
  "created_at": "2018-12-04 14:09:19",
  "updated_at": "2018-12-04 14:09:19"
}
Schema
{
  "fields": {
    "id": {
      "type": "integer",
      "required": true
    },
    "name": {
      "type": "text",
      "required": false
    },
    "created_at": {
      "type": "datetime",
      "required": true,
      "format": "yyyy-MM-dd HH:mm:ss"
    },
    "updated_at": {
      "type": "datetime",
      "required": true,
      "format": "yyyy-MM-dd HH:mm:ss"
    },
    "created_by": {
      "type": "user_entity",
      "required": true,
      "structure": [
        "id"
      ]
    },
    "updated_by": {
      "type": "user_entity",
      "required": true,
      "structure": [
        "id"
      ]
    },
    "guid": {
      "type": "text",
      "required": false
    },
    "synchro_time": {
      "type": "datetime",
      "required": false,
      "format": "yyyy-MM-dd HH:mm:ss"
    }
  }
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Client not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Example CURL:

curl -X GET "https://<your_traffit_name>.traffit.com/api/integration/v2/clients/123" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer abcdef1234" \
        -H "X-Get-Find-By-Guid: true"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Get-Find-By-Guid: true
Responses200401404
Headers
Content-Type: application/json
Body
{
  "id": 5,
  "created_by": {
    "id": 13
  },
  "updated_by": {
    "id": 13
  },
  "created_at": "2018-12-04 14:09:19",
  "updated_at": "2018-12-04 14:09:19"
}
Schema
{
  "fields": {
    "id": {
      "type": "integer",
      "required": true
    },
    "name": {
      "type": "text",
      "required": false
    },
    "created_at": {
      "type": "datetime",
      "required": true,
      "format": "yyyy-MM-dd HH:mm:ss"
    },
    "updated_at": {
      "type": "datetime",
      "required": true,
      "format": "yyyy-MM-dd HH:mm:ss"
    },
    "created_by": {
      "type": "user_entity",
      "required": true,
      "structure": [
        "id"
      ]
    },
    "updated_by": {
      "type": "user_entity",
      "required": true,
      "structure": [
        "id"
      ]
    },
    "guid": {
      "type": "text",
      "required": false
    },
    "synchro_time": {
      "type": "datetime",
      "required": false,
      "format": "yyyy-MM-dd HH:mm:ss"
    }
  }
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Client not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Response-Metadata: true
Responses200401404
Headers
Content-Type: application/json
Body
{
  "id": 5,
  "created_by": {
    "id": 13
  },
  "updated_by": {
    "id": 13
  },
  "created_at": "2018-12-04 14:09:19",
  "updated_at": "2018-12-04 14:09:19"
}
Schema
{
  "fields": {
    "id": {
      "type": "integer",
      "required": true
    },
    "name": {
      "type": "text",
      "required": false
    },
    "created_at": {
      "type": "datetime",
      "required": true,
      "format": "yyyy-MM-dd HH:mm:ss"
    },
    "updated_at": {
      "type": "datetime",
      "required": true,
      "format": "yyyy-MM-dd HH:mm:ss"
    },
    "created_by": {
      "type": "user_entity",
      "required": true,
      "structure": [
        "id"
      ]
    },
    "updated_by": {
      "type": "user_entity",
      "required": true,
      "structure": [
        "id"
      ]
    },
    "guid": {
      "type": "text",
      "required": false
    },
    "synchro_time": {
      "type": "datetime",
      "required": false,
      "format": "yyyy-MM-dd HH:mm:ss"
    }
  }
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Client not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Get single client
GET/api/integration/v2/clients/{client_id}

Get a single client by ID or guid.

Required scope of authorization token: client

Supported headers:

Authorization,

X-Get-Find-By-Guid,

X-Response-Metadata

URI Parameters
HideShow
client_id
int (required) Example: 123

Client ID


Get clients list

GET https://www.<your_traffit_name>.traffit.com/api/integration/v2/clients/
RequestsGet paginated results

Example CURL:

curl -X GET 'https://<your_traffit_name>.traffit.com/api/integration/v2/clients/' \
            -H 'Authorization: Bearer abcdef1234' \
            -H 'X-Request-Page-Size: 2' \
            -H 'X-Request-Current-Page: 1' \
            -H 'X-Request-Filter: {"created_at": {"value": "2020-01-02", "comparison": "<="}}' \
            -H 'X-Request-Sort: {"id" : "ASC"}'
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Request-Page-Size: 2
X-Request-Current-Page: 1
X-Request-Sort: {"id" : "ASC"}
X-Request-Filter: {"created_at": {"value": "2020-01-02", "comparison": "<="} }
Responses200400401
Headers
Content-Type: application/json
Body
[
  {
    "id": 5,
    "created_by": {
      "id": 13
    },
    "updated_by": {
      "id": 13
    },
    "created_at": "2018-12-04 14:09:19",
    "updated_at": "2018-12-04 14:09:19"
  },
  {
    "id": 2,
    "created_by": {
      "id": 1
    },
    "updated_by": {
      "id": 1
    },
    "created_at": "2018-04-18 21:57:13",
    "updated_at": "2018-04-18 21:57:13"
  },
  {
    "id": 6,
    "created_by": {
      "id": 27
    },
    "updated_by": {
      "id": 27
    },
    "created_at": "2020-01-19 15:17:42",
    "updated_at": "2020-01-19 15:17:42"
  },
  {
    "id": 1,
    "created_by": {
      "id": 1
    },
    "updated_by": {
      "id": 1
    },
    "created_at": "2018-04-03 13:29:02",
    "updated_at": "2018-04-03 13:29:02"
  }
]
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 400,
    "message": "Bad Request"
  }
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Get clients list
GET/api/integration/v2/clients/

Retrieve all your clients

Required scope of authorization token: client

Supported headers:

Authorization ,

X-Request-Page-Size,

X-Request-Current-Page,

X-Request-Filter,

X-Request-Sort,

X-Response-Metadata

Supported comparators for sorting by system fields:

System field name Available comparators
id =, !=, <=, >=
created_at =, !=, <=, >=
updated_at =, !=, <=, >=
synchro_time =, !=, <=, >=

Crm_person

Create new crm_person

POST https://www.<your_traffit_name>.traffit.com/api/integration/v2/crm_persons/
RequestsCreate new crm_person

Example CURL:

curl -X POST "https://<your_traffit_name>.traffit.com/api/integration/v2/crm_persons/" \
     -H "accept: application/json" \
     -H "Authorization: Bearer abcdef1234" \
     -H "Content-Type: application/json" \
     -d "{ \"name\": \"John\", \"lastname\": \"Doe\", \"email\": \"john.doe@email.com\", \"guid\": \"some_guid\", \"synchro_time\": \"2021-01-05 12:16:19\", \"client\": 123}"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Body
{
  "name": "John",
  "lastname": "Doe",
  "email": "john.doe@email.com",
  "guid": "some_guid",
  "synchro_time": "2021-01-05 12:16:19",
  "client": 123
}
Responses201400401
Headers
Content-Type: application/json
Body
{
  "id": 7
}
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Validation Failed",
  "errors": "<list_of_errors>"
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Create new crm_person
POST/api/integration/v2/crm_persons/

Create crm_person

Required scope of authorization token: crm_person

Supported headers:

Authorization,

X-Request-Metadata


Update crm_person

PUT https://www.<your_traffit_name>.traffit.com/api/integration/v2/crm_persons/123
RequestsUpdate crm_person

Example CURL:

curl -X PUT "https://<your_traffit_name>.traffit.com/api/integration/v2/crm_persons/123" \
     -H "accept: application/json" \
     -H "Authorization: Bearer abcdef1234" \
     -H "Content-Type: application/json" \
     -d "{ \"name\": \"John\", \"lastname\": \"Doe\", \"email\": \"john.doe@email.com\", \"guid\": \"some_guid\", \"synchro_time\": \"2021-01-05 12:16:19\", \"client\": 123}"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Body
{
  "name": "John",
  "lastname": "Doe",
  "email": "john.doe@email.com",
  "guid": "some_guid",
  "synchro_time": "2021-01-05 12:16:19",
  "client": 123
}
Responses204400401404
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Validation Failed",
  "errors": "<list_of_errors>"
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Crm_person not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Update crm_person
PUT/api/integration/v2/crm_persons/{crm_person_id}

Update all crm_person data

Required scope of authorization token: crm_person

Supported headers:

Authorization,

X-Request-Metadata

URI Parameters
HideShow
crm_person_id
int (required) Example: 123

Crm_person ID


Update single fields on the crm_person

PATCH https://www.<your_traffit_name>.traffit.com/api/integration/v2/crm_person/123
RequestsUpdate crm_person
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Body
{
  "lastname": "Doe",
  "email": "john.doe@email.com"
}
Responses204400401404
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Validation Failed",
  "errors": "<list_of_errors>"
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Crm_person not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Update single fields on the crm_person
PATCH/api/integration/v2/crm_person/{crm_person_id}

Update selected fields on the crm_person.

Required scope of authorization token: crm_person

Supported headers:

Authorization,

X-Request-Metadata

URI Parameters
HideShow
crm_person_id
int (required) Example: 123

Crm_person ID


Get single crm_person

GET https://www.<your_traffit_name>.traffit.com/api/integration/v2/crm_persons/123
RequestsSearch by IDSearch by guidGet response format

Example CURL:

curl -X GET "https://<your_traffit_name>.traffit.com/api/integration/v2/crm_persons/123" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer abcdef1234"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Responses200401404
Headers
Content-Type: application/json
Body
{
  "id": 5,
  "name": "John",
  "lastname": "Doe",
  "email": "john@doe.com",
  "created_by": {
    "id": 2
  },
  "updated_by": {
    "id": 2
  },
  "created_at": "2018-09-04 14:03:28",
  "updated_at": "2018-09-04 14:03:28",
  "client": {
    "id": 1
  }
}
Schema
{
  "fields": {
    "id": {
      "type": "integer",
      "required": true
    },
    "name": {
      "type": "text",
      "required": false
    },
    "lastname": {
      "type": "text",
      "required": true
    },
    "email": {
      "type": "email",
      "required": false
    },
    "status": {
      "type": "text",
      "required": false
    },
    "created_at": {
      "type": "datetime",
      "required": true,
      "format": "yyyy-MM-dd HH:mm:ss"
    },
    "updated_at": {
      "type": "datetime",
      "required": true,
      "format": "yyyy-MM-dd HH:mm:ss"
    },
    "created_by": {
      "type": "user_entity",
      "required": true,
      "structure": [
        "id"
      ]
    },
    "updated_by": {
      "type": "user_entity",
      "required": true,
      "structure": [
        "id"
      ]
    },
    "guid": {
      "type": "text",
      "required": false
    },
    "synchro_time": {
      "type": "datetime",
      "required": false,
      "format": "yyyy-MM-dd HH:mm:ss"
    },
    "client": {
      "type": "entity",
      "required": true,
      "structure": []
    }
  }
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Crm_person not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Example CURL:

curl -X GET "https://<your_traffit_name>.traffit.com/api/integration/v2/crm_persons/123" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer abcdef1234" \
        -H "X-Get-Find-By-Guid: true"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Get-Find-By-Guid: true
Responses200401404
Headers
Content-Type: application/json
Body
{
  "id": 5,
  "name": "John",
  "lastname": "Doe",
  "email": "john@doe.com",
  "created_by": {
    "id": 2
  },
  "updated_by": {
    "id": 2
  },
  "created_at": "2018-09-04 14:03:28",
  "updated_at": "2018-09-04 14:03:28",
  "client": {
    "id": 1
  }
}
Schema
{
  "fields": {
    "id": {
      "type": "integer",
      "required": true
    },
    "name": {
      "type": "text",
      "required": false
    },
    "lastname": {
      "type": "text",
      "required": true
    },
    "email": {
      "type": "email",
      "required": false
    },
    "status": {
      "type": "text",
      "required": false
    },
    "created_at": {
      "type": "datetime",
      "required": true,
      "format": "yyyy-MM-dd HH:mm:ss"
    },
    "updated_at": {
      "type": "datetime",
      "required": true,
      "format": "yyyy-MM-dd HH:mm:ss"
    },
    "created_by": {
      "type": "user_entity",
      "required": true,
      "structure": [
        "id"
      ]
    },
    "updated_by": {
      "type": "user_entity",
      "required": true,
      "structure": [
        "id"
      ]
    },
    "guid": {
      "type": "text",
      "required": false
    },
    "synchro_time": {
      "type": "datetime",
      "required": false,
      "format": "yyyy-MM-dd HH:mm:ss"
    },
    "client": {
      "type": "entity",
      "required": true,
      "structure": []
    }
  }
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Crm_person not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Response-Metadata: true
Responses200401404
Headers
Content-Type: application/json
Body
{
  "id": 5,
  "name": "John",
  "lastname": "Doe",
  "email": "john@doe.com",
  "created_by": {
    "id": 2
  },
  "updated_by": {
    "id": 2
  },
  "created_at": "2018-09-04 14:03:28",
  "updated_at": "2018-09-04 14:03:28",
  "client": {
    "id": 1
  }
}
Schema
{
  "fields": {
    "id": {
      "type": "integer",
      "required": true
    },
    "name": {
      "type": "text",
      "required": false
    },
    "lastname": {
      "type": "text",
      "required": true
    },
    "email": {
      "type": "email",
      "required": false
    },
    "status": {
      "type": "text",
      "required": false
    },
    "created_at": {
      "type": "datetime",
      "required": true,
      "format": "yyyy-MM-dd HH:mm:ss"
    },
    "updated_at": {
      "type": "datetime",
      "required": true,
      "format": "yyyy-MM-dd HH:mm:ss"
    },
    "created_by": {
      "type": "user_entity",
      "required": true,
      "structure": [
        "id"
      ]
    },
    "updated_by": {
      "type": "user_entity",
      "required": true,
      "structure": [
        "id"
      ]
    },
    "guid": {
      "type": "text",
      "required": false
    },
    "synchro_time": {
      "type": "datetime",
      "required": false,
      "format": "yyyy-MM-dd HH:mm:ss"
    },
    "client": {
      "type": "entity",
      "required": true,
      "structure": []
    }
  }
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Crm_person not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Get single crm_person
GET/api/integration/v2/crm_persons/{crm_person_id}

Get a single crm_person by ID or guid.

Required scope of authorization token: crm_person

Supported headers:

Authorization,

X-Get-Find-By-Guid,

X-Response-Metadata

URI Parameters
HideShow
crm_person_id
int (required) Example: 123

Crm_person ID


Get crm_persons list

GET https://www.<your_traffit_name>.traffit.com/api/integration/v2/crm_persons/
RequestsGet paginated results

Example CURL:

curl -X GET 'https://<your_traffit_name>.traffit.com/api/integration/v2/crm_persons/' \
            -H 'Authorization: Bearer abcdef1234' \
            -H 'X-Request-Page-Size: 2' \
            -H 'X-Request-Current-Page: 1' \
            -H 'X-Request-Filter: {"created_at": {"value": "2020-01-02", "comparison": "<="}}' \
            -H 'X-Request-Sort: {"id" : "ASC"}'
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Request-Page-Size: 2
X-Request-Current-Page: 1
X-Request-Sort: {"id" : "ASC"}
X-Request-Filter: {"created_at": {"value": "2020-01-02", "comparison": "<="} }
Responses200400401
Headers
Content-Type: application/json
Body
[
  {
    "id": 5,
    "name": "John",
    "lastname": "Doe",
    "email": "john@doe.com",
    "created_by": {
      "id": 2
    },
    "updated_by": {
      "id": 2
    },
    "created_at": "2018-09-04 14:03:28",
    "updated_at": "2018-09-04 14:03:28",
    "client": {
      "id": 1
    }
  },
  {
    "id": 2,
    "name": "Jack",
    "lastname": "Martins",
    "email": "jack@martins.com",
    "created_by": {
      "id": 1
    },
    "updated_by": {
      "id": 1
    },
    "created_at": "2018-04-03 13:30:34",
    "updated_at": "2018-04-03 13:30:34",
    "client": {
      "id": 1
    }
  }
]
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 400,
    "message": "Bad Request"
  }
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Get crm_persons list
GET/api/integration/v2/crm_persons/

Retrieve all your crm_persons

Required scope of authorization token: crm_persons

Supported headers:

Authorization ,

X-Request-Page-Size,

X-Request-Current-Page,

X-Request-Filter,

X-Request-Sort,

X-Response-Metadata

Supported comparators for sorting by system fields:

System field name Available comparators
id =, !=, <=, >=
created_at =, !=, <=, >=
updated_at =, !=, <=, >=
synchro_time =, !=, <=, >=
name =, !=, like
lastname =, !=, like
guid =, !=, like
email =, !=, like

File

Upload file

POST https://www.<your_traffit_name>.traffit.com/api/integration/v2/files/
RequestsUpload file

Example CURL:

curl -X POST "https://<your_traffit_name>.traffit.com/api/integration/v2/employees/" \
     -H "accept: application/json" \
     -H "Authorization: Bearer abcdef1234" \
     -H "Content-Type: multipart/form-data"
     -F "file=@file_name.jpg;type=image/jpeg" -F "name=myfile" -F "isPublic=0"
Headers
Content-Type: multipart/form-data
Authorization: Bearer abcdef1234
Responses201400401413
Headers
Content-Type: application/json
Body
{
  "id": 124
}
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Validation Failed",
  "errors": "<list_of_errors>"
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}
Headers
Content-Type: application/json
Body
{
  "error": "Request Entity Too Large."
}

Upload file
POST/api/integration/v2/files/

Upload file

Required scope of authorization token: file

Supported headers:

Authorization

Parameter name Example values Description
file @file_name.jpg;type=image/jpeg Filename with filepath
name my_name New filename
isPublic 0, 1 Should file be public

Job post

Get single job post

GET https://www.<your_traffit_name>.traffit.com/api/integration/v2/adverts_publish/123
RequestsSearch by IDGet response format

Example CURL:

curl -X GET "https://<your_traffit_name>.traffit.com/api/integration/v2/adverts_publish/123" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer abcdef1234"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Responses200401404
Headers
Content-Type: application/json
Body
{
  "advert_id": 96,
  "id": 17,
  "nr_ref": "/2/10/2020/WT",
  "url": "https://your_traffit_name.traffit.com/public/an/hash",
  "valid_start": "2020-11-16 07:50:00",
  "valid_end": "2020-12-16 07:50:00",
  "awarded": false
}
Schema
{
  "fields": {
    "id": {
      "type": "integer",
      "required": true
    },
    "advert_id": {
      "type": "integer",
      "required": true
    },
    "nr_ref": {
      "type": "text",
      "required": false
    },
    "name": {
      "type": "text",
      "required": true
    },
    "url": {
      "type": "text",
      "required": true
    },
    "description": {
      "type": "text",
      "required": false
    },
    "valid_start": {
      "type": "datetime",
      "required": false,
      "format": "yyyy-MM-dd HH:mm:ss"
    },
    "valid_end": {
      "type": "datetime",
      "required": false,
      "format": "yyyy-MM-dd HH:mm:ss"
    },
    "awarded": {
      "type": "bool",
      "required": true,
      "choices": [
        true,
        false
      ]
    }
  }
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Job post not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Response-Metadata: true
Responses200401404
Headers
Content-Type: application/json
Body
{
  "advert_id": 96,
  "id": 17,
  "nr_ref": "/2/10/2020/WT",
  "url": "https://your_traffit_name.traffit.com/public/an/hash",
  "valid_start": "2020-11-16 07:50:00",
  "valid_end": "2020-12-16 07:50:00",
  "awarded": false
}
Schema
{
  "fields": {
    "id": {
      "type": "integer",
      "required": true
    },
    "advert_id": {
      "type": "integer",
      "required": true
    },
    "nr_ref": {
      "type": "text",
      "required": false
    },
    "name": {
      "type": "text",
      "required": true
    },
    "url": {
      "type": "text",
      "required": true
    },
    "description": {
      "type": "text",
      "required": false
    },
    "valid_start": {
      "type": "datetime",
      "required": false,
      "format": "yyyy-MM-dd HH:mm:ss"
    },
    "valid_end": {
      "type": "datetime",
      "required": false,
      "format": "yyyy-MM-dd HH:mm:ss"
    },
    "awarded": {
      "type": "bool",
      "required": true,
      "choices": [
        true,
        false
      ]
    }
  }
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Job post not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Get single job post
GET/api/integration/v2/adverts_publish/{advert_publish_id}

Get a single job post by ID.

Required scope of authorization token: advert_publish

Supported headers:

Authorization,

X-Response-Metadata

URI Parameters
HideShow
advert_publish_id
int (required) Example: 123

Job post ID


Form

Get application form

GET https://www.<your_traffit_name>.traffit.com/api/integration/v2/form/fields/123
RequestsSearch by Advert ID

Example CURL:

curl -X GET "https://<your_traffit_name>.traffit.com/api/integration/v2/form/fields/123" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer abcdef1234"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Responses200400401404
Headers
Content-Type: application/json
Body
[
  {
    "required_fields": {
      "44": {
        "properties": {
          "45": {
            "115": {
              "id": 115,
              "name": "Name",
              "sid": "firstName",
              "required": true,
              "type": "structure_virtual",
              "order": 0,
              "required_Fields": "n/a"
            },
            "116": {
              "id": 116,
              "name": "Surname",
              "sid": "lastName",
              "required": true,
              "type": "structure_virtual",
              "order": 1,
              "required_Fields": "n/a"
            }
          },
          "46": []
        },
        "provisions": [
          {
            "id": 1,
            "required": true,
            "name": "First consent",
            "content": "Some consent content"
          },
          {
            "id": 2,
            "required": true,
            "name": "Second consent",
            "content": "Some consent content"
          }
        ]
      }
    }
  },
  {
    "example": {
      "dynamic_form[properties][45][115]": "Name",
      "dynamic_form[properties][45][116]": "Surname",
      "dynamic_form[provisions][1]": "true/false",
      "dynamic_form[provisions][2]": "true/false",
    }
  }
]
Headers
Content-Type: application/json
Body
{
  "error": "Application form is not created"
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Advert not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Get application form
GET/api/integration/v2/form/fields/{advert_id}

Get application form.

Required scope of authorization token: form

Supported headers:

Authorization

URI Parameters
HideShow
advert_id
int (required) Example: 123

Advert ID


User

Create new user

POST https://www.<your_traffit_name>.traffit.com/api/integration/v2/users/
RequestsCreate new user

Example CURL:

curl -X POST "https://<your_traffit_name>.traffit.com/api/integration/v2/users/" \
     -H "accept: application/json" \
     -H "Authorization: Bearer abcdef1234" \
     -H "Content-Type: application/json" \
     -d "{ \"username\": \"john@doe.com\", \"permission_group\": \"1\", \"email\": \"john@doe.com\", \"password\": { \"first\": \"passwordThatIsHardToHack\", \"second\": \"passwordThatIsHardToHack\" }, \"group_id\": 1}"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Body
{
  "username": "john@doe.com",
  "permission_group": 1,
  "email": "john@doe.com",
  "password": {
    "first": "passwordThatIsHardToHack",
    "second": "passwordThatIsHardToHack"
  },
  "group_id": 3
}
Responses201400401
Headers
Content-Type: application/json
Body
{
  "id": 124
}
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Validation Failed",
  "errors": "<list_of_errors>"
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Create new user
POST/api/integration/v2/users/

Create user

Required scope of authorization token: user

Supported headers:

Authorization,

X-Request-Metadata


Update user

PATCH https://www.<your_traffit_name>.traffit.com/api/integration/v2/users/123
RequestsUpdate selected fields on the

Example CURL:

curl -X PATCH "https://<your_traffit_name>.traffit.com/api/integration/v2/users/{user_id}" \
     -H "accept: application/json" \
     -H "Authorization: Bearer abcdef1234" \
     -H "Content-Type: application/json" \
     -d "{ \"username\": \"john@doe.com\"}"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Body
{
  "username": "john@doe.com"
}
Responses204400401403
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Validation Failed",
  "errors": "<list_of_errors>"
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}
Headers
Content-Type: application/json
Body
{
  "error": "You cannot modify sample user"
}

Update user
PATCH/api/integration/v2/users/{user_id}

Update selected fields on the user

Required scope of authorization token: user

Supported headers:

Authorization,

X-Request-Metadata

URI Parameters
HideShow
user_id
int (required) Example: 123

User ID


Get single user

GET https://www.<your_traffit_name>.traffit.com/api/integration/v2/users/35
RequestsSearch by IDGet response format

Example CURL:

curl -X GET "https://<your_traffit_name>.traffit.com/api/integration/v2/users/35" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer abcdef1234"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Responses200401404
Headers
Content-Type: application/json
Body
{
  "username": "john@doe.com",
  "email": "john@doe.com",
  "created_by": {
    "id": 19
  },
  "updated_by": {
    "id": 19
  },
  "id": 35,
  "user_group": {
    "id": 1,
    "name": "foo"
  },
  "permission_group": {
    "id": 1,
    "name": "Administrator"
  },
  "updated_at": "2022-08-03 13:25:14",
  "is_active": true
}
Schema
{
  "fields": {
    "id": {
      "type": "integer",
      "required": true
    },
    "username": {
      "type": "text",
      "required": true
    },
    "permission_group": {
      "type": "text",
      "required": false
    },
    "email": {
      "type": "email",
      "required": true
    },
    "created_by": {
      "type": "user_entity",
      "required": true,
      "structure": [
        "id"
      ]
    },
    "updated_by": {
      "type": "user_entity",
      "required": true,
      "structure": [
        "id"
      ]
    },
    "updated_at": {
      "type": "datetime",
      "required": true,
      "format": "yyyy-MM-dd HH:mm:ss"
    },
    "is_active": {
      "type": "bool",
      "required": true,
      "choices": [
        true,
        false
      ]
    }
  }
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

User not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Response-Metadata: true
Responses200401404
Headers
Content-Type: application/json
Body
{
  "username": "john@doe.com",
  "email": "john@doe.com",
  "created_by": {
    "id": 19
  },
  "updated_by": {
    "id": 19
  },
  "id": 35,
  "user_group": {
    "id": 1,
    "name": "foo"
  },
  "permission_group": {
    "id": 1,
    "name": "Administrator"
  },
  "updated_at": "2022-08-03 13:25:14",
  "is_active": true
}
Schema
{
  "fields": {
    "id": {
      "type": "integer",
      "required": true
    },
    "username": {
      "type": "text",
      "required": true
    },
    "permission_group": {
      "type": "text",
      "required": false
    },
    "email": {
      "type": "email",
      "required": true
    },
    "created_by": {
      "type": "user_entity",
      "required": true,
      "structure": [
        "id"
      ]
    },
    "updated_by": {
      "type": "user_entity",
      "required": true,
      "structure": [
        "id"
      ]
    },
    "updated_at": {
      "type": "datetime",
      "required": true,
      "format": "yyyy-MM-dd HH:mm:ss"
    },
    "is_active": {
      "type": "bool",
      "required": true,
      "choices": [
        true,
        false
      ]
    }
  }
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

User not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Get single user
GET/api/integration/v2/users/{user_id}

Get a single user by ID.

Required scope of authorization token: user

Supported headers:

Authorization,

X-Response-Metadata

URI Parameters
HideShow
user_id
int (required) Example: 35

User ID


Get users list

GET https://www.<your_traffit_name>.traffit.com/api/integration/v2/users/
RequestsGet paginated results

Example CURL:

curl -X GET 'https://<your_traffit_name>.traffit.com/api/integration/v2/users/' \
            -H 'Authorization: Bearer abcdef1234' \
            -H 'X-Request-Page-Size: 2' \
            -H 'X-Request-Current-Page: 1' \
            -H 'X-Request-Filter: {"created_at": {"value": "2020-01-02", "comparison": "<="}}' \
            -H 'X-Request-Sort: {"id" : "ASC"}'
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Request-Page-Size: 2
X-Request-Current-Page: 1
X-Request-Sort: {"id" : "ASC"}
X-Request-Filter: {"created_at": {"value": "2020-01-02", "comparison": "<="} }
Responses200400401
Headers
Content-Type: application/json
Body
[
  {
    "username": "john.doe@traffit.com",
    "email": "john.doe@traffit.com",
    "updated_by": {
      "id": 19
    },
    "id": 19,
    "user_group": {
      "id": 1,
      "name": "foo"
    },
    "permission_group": {
      "id": 9,
      "name": "Administrator"
    },
    "updated_at": "2022-08-03 13:25:14",
    "is_active": false
  },
  {
    "username": "nicole.doe@traffit.com",
    "email": "nicole.doe@traffit.com",
    "id": 22,
    "user_group": {
      "id": 1,
      "name": "foo"
    },
    "permission_group": {
      "id": 1,
      "name": "Administrator"
    },
    "updated_at": "2022-05-03 13:25:14",
    "is_active": true
  }
]
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 400,
    "message": "Bad Request"
  }
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Get users list
GET/api/integration/v2/users/

Retrieve all your users

Required scope of authorization token: user

Supported headers:

Authorization ,

X-Request-Page-Size,

X-Request-Current-Page,

X-Request-Filter,

X-Request-Sort,

X-Response-Metadata

Supported comparators for sorting by system fields:

System field name Available comparators
id =, !=, <=, >=
username =, !=, like
email =, !=, like

Enable user

POST https://www.<your_traffit_name>.traffit.com/api/integration/v2/users/123/_enable
RequestsEnable user

Example CURL:

curl -X POST "https://<your_traffit_name>.traffit.com/api/integration/v2/users/{user_id}/_enable" \
     -H "accept: application/json" \
     -H "Authorization: Bearer abcdef1234" \
     -H "Content-Type: application/json"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Responses204409401422
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Body
{
  "error": "User is already enabled."
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}
Headers
Content-Type: application/json
Body
{
  "error": "Limit has been reached!"
}

Enable user
POST/api/integration/v2/users/{user_id}/_enable

Enable user

Required scope of authorization token: user

Supported headers:

Authorization

URI Parameters
HideShow
user_id
int (required) Example: 123

User ID


Disable user

POST https://www.<your_traffit_name>.traffit.com/api/integration/v2/users/123/_disable
Requestsdisable user

Example CURL:

curl -X POST "https://<your_traffit_name>.traffit.com/api/integration/v2/users/{user_id}/_disable" \
     -H "accept: application/json" \
     -H "Authorization: Bearer abcdef1234" \
     -H "Content-Type: application/json"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Responses204409401
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Body
{
  "error": "User is already disabled."
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Disable user
POST/api/integration/v2/users/{user_id}/_disable

Disable user

Required scope of authorization token: user

Supported headers:

Authorization

URI Parameters
HideShow
user_id
int (required) Example: 123

User ID


Get user groups list

GET https://www.<your_traffit_name>.traffit.com/api/integration/v2/users/groups/
RequestsGet paginated results

Example CURL:

curl -X GET 'https://<your_traffit_name>.traffit.com/api/integration/v2/users/groups/' \
            -H 'Authorization: Bearer abcdef1234' \
            -H 'X-Request-Page-Size: 2' \
            -H 'X-Request-Current-Page: 1' \
            -H 'X-Request-Sort: {"name" : "ASC"}'
            -H 'X-Request-Filter: {"name": {"value": "fo", "comparison": "like"}, "external_id": {"value": "111", "comparison": "like"}}' \
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Request-Page-Size: 2
X-Request-Current-Page: 1
X-Request-Sort: {"name" : "ASC"}
X-Request-Filter: {"name": {"value": "fo", "comparison": "like"}, "external_id": {"value": "111", "comparison": "like"}}
Responses200400401
Headers
Content-Type: application/json
Body
[
  {
    "id": 1,
    "name": "foo",
    "status": "active",
    "external_id": "111111"
  },
  {
    "id": 2,
    "name": "bar",
    "status": "active",
    "external_id": "111112"
  }
]
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 400,
    "message": "Bad Request"
  }
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Get user groups list
GET/api/integration/v2/users/groups/

Retrieve all your user groups

Required scope of authorization token: user

Supported headers:

Authorization ,

X-Request-Page-Size,

X-Request-Current-Page,

X-Request-Sort,

Supported comparators for sorting by system fields:

System field name Available comparators
name =, !=, like
external_id =, !=, like

Add user to a group

POST https://www.<your_traffit_name>.traffit.com/api/integration/v2/users/123/groups/1
RequestsCreate new user

Example CURL:

curl -X POST "https://<your_traffit_name>.traffit.com/api/integration/v2/users/{user_id}/groups/{group_id}" \
     -H "accept: application/json" \
     -H "Authorization: Bearer abcdef1234"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Responses204409401
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Body
{
  "error": "User is already in this group."
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Add user to a group
POST/api/integration/v2/users/{user_id}/groups/{group_id}

Add user to a group

Required scope of authorization token: user

Supported headers:

Authorization

URI Parameters
HideShow
user_id
int (required) Example: 123

User ID

group_id
int (required) Example: 1

User group ID


Get user permission groups list

GET https://www.<your_traffit_name>.traffit.com/api/integration/v2/users/permission_groups/
RequestsGet paginated results

Example CURL:

curl -X GET 'https://<your_traffit_name>.traffit.com/api/integration/v2/users/permission_groups/' \
            -H 'Authorization: Bearer abcdef1234' \
            -H 'X-Request-Page-Size: 2' \
            -H 'X-Request-Current-Page: 1' \
            -H 'X-Request-Sort: {"name" : "ASC"}'
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Request-Page-Size: 2
X-Request-Current-Page: 1
X-Request-Sort: {"name" : "ASC"}
Responses200400401
Headers
Content-Type: application/json
Body
[
    {
        "id": 1,
        "name": "Administrators",
        "description": "This is group of administrators. All permissions."
    },
    {
        "id": 2,
        "name": "Recruiters",
        "description": "This is group of recruiters. Permissions to jobs only."
    },
]
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 400,
    "message": "Bad Request"
  }
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Get user permission groups list
GET/api/integration/v2/users/permission_groups/

Retrieve all your user permission groups

Required scope of authorization token: user

Supported headers:

Authorization ,

X-Request-Page-Size,

X-Request-Current-Page,

X-Request-Sort,

Supported fields for sorting:

  • id

  • name

  • description


Crm_activity

Get single crm_activity

GET https://www.<your_traffit_name>.traffit.com/api/integration/v2/crm_activities/123
RequestsSearch by IDGet response format

Example CURL:

curl -X GET "https://<your_traffit_name>.traffit.com/api/integration/v2/crm_activities/123" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer abcdef1234"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Responses200401404
Headers
Content-Type: application/json
Body
{
  "id": 123,
  "client": {
    "id": 1
  },
  "created_at": "2018-09-04 14:04:34",
  "updated_at": "2018-09-04 14:04:34",
  "created_by": {
    "id": 2
  },
  "updated_by": {
    "id": 2
  }
}
Schema
{
  "fields": {
    "id": {
      "type": "integer",
      "required": true
    },
    "client": {
      "type": "client_entity",
      "required": true,
      "structure": [
        "id"
      ]
    },
    "created_by": {
      "type": "user_entity",
      "required": true,
      "structure": [
        "id"
      ]
    },
    "updated_by": {
      "type": "user_entity",
      "required": true,
      "structure": [
        "id"
      ]
    },
    "created_at": {
      "type": "datetime",
      "required": true,
      "format": "yyyy-MM-dd HH:mm:ss"
    },
    "updated_at": {
      "type": "datetime",
      "required": true,
      "format": "yyyy-MM-dd HH:mm:ss"
    }
  }
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Crm_activity not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Response-Metadata: true
Responses200401404
Headers
Content-Type: application/json
Body
{
  "id": 123,
  "client": {
    "id": 1
  },
  "created_at": "2018-09-04 14:04:34",
  "updated_at": "2018-09-04 14:04:34",
  "created_by": {
    "id": 2
  },
  "updated_by": {
    "id": 2
  }
}
Schema
{
  "fields": {
    "id": {
      "type": "integer",
      "required": true
    },
    "client": {
      "type": "client_entity",
      "required": true,
      "structure": [
        "id"
      ]
    },
    "created_by": {
      "type": "user_entity",
      "required": true,
      "structure": [
        "id"
      ]
    },
    "updated_by": {
      "type": "user_entity",
      "required": true,
      "structure": [
        "id"
      ]
    },
    "created_at": {
      "type": "datetime",
      "required": true,
      "format": "yyyy-MM-dd HH:mm:ss"
    },
    "updated_at": {
      "type": "datetime",
      "required": true,
      "format": "yyyy-MM-dd HH:mm:ss"
    }
  }
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Crm_activity not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Get single crm_activity
GET/api/integration/v2/crm_activities/{crm_activity_id}

Get a single crm_activity by ID.

Required scope of authorization token: crm_activity

Supported headers:

Authorization,

X-Response-Metadata

URI Parameters
HideShow
crm_activity_id
int (required) Example: 123

Crm_activity ID


Get crm_activities list

GET https://www.<your_traffit_name>.traffit.com/api/integration/v2/crm_activities/
RequestsGet paginated results

Example CURL:

curl -X GET 'https://<your_traffit_name>.traffit.com/api/integration/v2/crm_activities/' \
            -H 'Authorization: Bearer abcdef1234' \
            -H 'X-Request-Page-Size: 2' \
            -H 'X-Request-Current-Page: 1' \
            -H 'X-Request-Filter: {"created_at": {"value": "2020-01-02", "comparison": "<="}}' \
            -H 'X-Request-Sort: {"id" : "ASC"}'
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Request-Page-Size: 2
X-Request-Current-Page: 1
X-Request-Sort: {"id" : "ASC"}
X-Request-Filter: {"created_at": {"value": "2020-01-02", "comparison": "<="} }
Responses200400401
Headers
Content-Type: application/json
Body
[
  {
    "id": 5,
    "client": {
      "id": 1
    },
    "created_at": "2018-09-04 14:04:34",
    "updated_at": "2018-09-04 14:04:34",
    "created_by": {
      "id": 2
    },
    "updated_by": {
      "id": 2
    }
  },
  {
    "id": 8,
    "client": {
      "id": 5
    },
    "created_at": "2019-01-21 14:35:05",
    "updated_at": "2019-01-21 14:35:05",
    "created_by": {
      "id": 1
    },
    "updated_by": {
      "id": 1
    }
  },
  {
    "id": 9,
    "client": {
      "id": 5
    },
    "created_at": "2019-12-10 08:30:31",
    "updated_at": "2019-12-10 08:30:31",
    "created_by": {
      "id": 18
    },
    "updated_by": {
      "id": 18
    }
  }
]
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 400,
    "message": "Bad Request"
  }
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Get crm_activities list
GET/api/integration/v2/crm_activities/

Retrieve all your crm_activities

Required scope of authorization token: crm_activity

Supported headers:

Authorization ,

X-Request-Page-Size,

X-Request-Current-Page,

X-Request-Filter,

X-Request-Sort,

X-Response-Metadata

Supported comparators for sorting by system fields:

System field name Available comparators
id =, !=, <=, >=
created_at =, !=, <=, >=
updated_at =, !=, <=, >=

Provision

Get provisions list

GET https://www.<your_traffit_name>.traffit.com/api/integration/v2/provisions
RequestsGet paginated resultsGet only active provisions

Example CURL:

curl -X GET 'https://<your_traffit_name>.traffit.com/api/integration/v2/provisions' \
            -H 'Authorization: Bearer abcdef1234' \
            -H 'X-Request-Page-Size: 2' \
            -H 'X-Request-Current-Page: 1'
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Request-Page-Size: 2
X-Request-Current-Page: 1
Responses200400401
Headers
Content-Type: application/json
Body
[
  {
    "id": 1,
    "name": "Consent name",
    "start_date": "2018-04-02 00:00:00",
    "closing_date": "2020-03-29 00:00:00",
    "content": "Consent text.",
    "is_active": true,
    "language": "pl",
    "type": {
      "id": 14,
      "sys_name": "provision_e",
      "value": "Dictionary value name"
    },
    "updated_at": "2022-07-01 13:09:21"
  },
  {
    "id": 2,
    "name": "Second Consent name",
    "start_date": "2018-04-02 00:00:00",
    "closing_date": "2030-12-31 00:00:00",
    "content": "Second consent text.",
    "is_active": false,
    "language": "pl",
    "type": {
      "id": 10,
      "sys_name": "provision_a",
      "value": "Dictionary value name"
    },
    "updated_at": "2022-05-01 13:09:21"
  }
]
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 400,
    "message": "Bad Request"
  }
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Example CURL:

curl -X GET 'https://<your_traffit_name>.traffit.com/api/integration/v2/provisions?is_active=1' \
            -H 'Authorization: Bearer abcdef1234'
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Responses200400401
Headers
Content-Type: application/json
Body
[
  {
    "id": 1,
    "name": "Consent name",
    "start_date": "2018-04-02 00:00:00",
    "closing_date": "2020-03-29 00:00:00",
    "content": "Consent text.",
    "is_active": true,
    "language": "pl",
    "type": {
      "id": 14,
      "sys_name": "provision_e",
      "value": "Dictionary value name"
    },
    "updated_at": "2022-07-01 13:09:21"
  },
  {
    "id": 2,
    "name": "Second Consent name",
    "start_date": "2018-04-02 00:00:00",
    "closing_date": "2030-12-31 00:00:00",
    "content": "Second consent text.",
    "is_active": false,
    "language": "pl",
    "type": {
      "id": 10,
      "sys_name": "provision_a",
      "value": "Dictionary value name"
    },
    "updated_at": "2022-05-01 13:09:21"
  }
]
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 400,
    "message": "Bad Request"
  }
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Get provisions list
GET/api/integration/v2/provisions

Retrieve all your provisions

Required scope of authorization token: provision

Supported headers:

Authorization ,

X-Request-Page-Size,

X-Request-Current-Page,

Supported query field for filtering:

Query field name Example values Description
language en, pl Provision language
is_active 1, 0 Is provision still active
type 14, 10 Type identifier from Traffit

Get provision types

GET https://www.<your_traffit_name>.traffit.com/api/integration/v2/provisions/types
RequestsGet paginated results

Example CURL:

curl -X GET 'https://<your_traffit_name>.traffit.com/api/integration/v2/provisions/types' \
            -H 'Authorization: Bearer abcdef1234' \
            -H 'X-Request-Page-Size: 2' \
            -H 'X-Request-Current-Page: 1'
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Request-Page-Size: 2
X-Request-Current-Page: 1
Responses200400401
Headers
Content-Type: application/json
Body
[
  {
    "id": 10,
    "sys_name": "provision_a",
    "value": "Consent as part of the current recruitment"
  },
  {
    "id": 13,
    "sys_name": "provision_d",
    "value": "Marketing agreement"
  }
]
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 400,
    "message": "Bad Request"
  }
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Get provision types
GET/api/integration/v2/provisions/types

Retrieve all your provision types

Required scope of authorization token: provision

Supported headers:

Authorization ,

X-Request-Page-Size,

X-Request-Current-Page,


Talent

Add candidate to talent

POST https://www.<your_traffit_name>.traffit.com/api/integration/v2/talents/123/employees:batchAdd
RequestsAdd candidate to talent

Example CURL:

curl -X POST "https://<your_traffit_name>.traffit.com/api/integration/v2/talents/{talent_id}/employees:batchAdd" \
     -H "accept: application/json" \
     -H "Authorization: Bearer abcdef1234" \
     -H "Content-Type: application/json" \
     -d "{ \"employees\": [ 140,141 ]}"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Body
{
  "employees": [
    140,
    141
  ]
}
Responses204400404
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Validation Failed",
  "errors": "<list_of_errors>"
}

Talent not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Add candidate to talent
POST/api/integration/v2/talents/{talent_id}/employees:batchAdd

URI Parameters
HideShow
talent_id
int (required) Example: 123

Talent ID


Remove candidate from talent

POST https://www.<your_traffit_name>.traffit.com/api/integration/v2/talents/123/employees:batchDelete
RequestsRemove candidate from talent

Example CURL:

curl -X POST "https://<your_traffit_name>.traffit.com/api/integration/v2/talents/{talent_id}/employees:batchDelete" \
     -H "accept: application/json" \
     -H "Authorization: Bearer abcdef1234" \
     -H "Content-Type: application/json" \
     -d "{ \"employees\": [ 140,141 ]}"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Body
{
  "employees": [
    140,
    141
  ]
}
Responses204400404
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Validation Failed",
  "errors": "<list_of_errors>"
}

Talent not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Remove candidate from talent
POST/api/integration/v2/talents/{talent_id}/employees:batchDelete

URI Parameters
HideShow
talent_id
int (required) Example: 123

Talent ID


Get talents list

GET https://www.<your_traffit_name>.traffit.com/api/integration/v2/talents
RequestsGet paginated resultsGet only talent with id 5Search with additional module

Example CURL:

curl -X GET 'https://<your_traffit_name>.traffit.com/api/integration/v2/talents' \
            -H 'Authorization: Bearer abcdef1234' \
            -H 'X-Request-Page-Size: 2' \
            -H 'X-Request-Current-Page: 1'
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Request-Page-Size: 2
X-Request-Current-Page: 1
Responses200400401
Headers
Content-Type: application/json
Body
[
  {
    "id": 1,
    "name": "Sales managerowie"
  },
  {
    "id": 2,
    "name": "Jr Frontend developerzy"
  },
  {
    "id": 4,
    "name": "talent01"
  },
  {
    "id": 5,
    "name": "dsds"
  },
  {
    "extras": {
      "talent_employees_counter": [
        {
          "employees": "2",
          "id": 1
        },
        {
          "employees": "0",
          "id": 2
        },
        {
          "employees": "0",
          "id": 4
        },
        {
          "employees": "1",
          "id": 5
        }
      ]
    }
  }
]
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 400,
    "message": "Bad Request"
  }
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Example CURL:

curl -X GET 'https://<your_traffit_name>.traffit.com/api/integration/v2/talents?id=5' \
            -H 'Authorization: Bearer abcdef1234'
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Responses200400401
Headers
Content-Type: application/json
Body
[
  {
    "id": 1,
    "name": "Sales managerowie"
  },
  {
    "id": 2,
    "name": "Jr Frontend developerzy"
  },
  {
    "id": 4,
    "name": "talent01"
  },
  {
    "id": 5,
    "name": "dsds"
  },
  {
    "extras": {
      "talent_employees_counter": [
        {
          "employees": "2",
          "id": 1
        },
        {
          "employees": "0",
          "id": 2
        },
        {
          "employees": "0",
          "id": 4
        },
        {
          "employees": "1",
          "id": 5
        }
      ]
    }
  }
]
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 400,
    "message": "Bad Request"
  }
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Example CURL:

curl -X GET "https://<your_traffit_name>.traffit.com/api/integration/v2/talents" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer abcdef1234" \
        -H "X-Additional-Modules: talent_employees_counter"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Additional-Modules: talent_employees_counter
Responses200400401
Headers
Content-Type: application/json
Body
[
  {
    "id": 1,
    "name": "Sales managerowie"
  },
  {
    "id": 2,
    "name": "Jr Frontend developerzy"
  },
  {
    "id": 4,
    "name": "talent01"
  },
  {
    "id": 5,
    "name": "dsds"
  },
  {
    "extras": {
      "talent_employees_counter": [
        {
          "employees": "2",
          "id": 1
        },
        {
          "employees": "0",
          "id": 2
        },
        {
          "employees": "0",
          "id": 4
        },
        {
          "employees": "1",
          "id": 5
        }
      ]
    }
  }
]
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 400,
    "message": "Bad Request"
  }
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Get talents list
GET/api/integration/v2/talents

Retrieve all your talents

Required scope of authorization token: talent

Supported headers:

Authorization ,

X-Request-Page-Size,

X-Request-Current-Page,

X-Request-Sort,

X-Additional-Modules

Supported query field for filtering:

Query field name Example values
id 3
name talent_nr_1, talent_name_2

Create talent

POST https://www.<your_traffit_name>.traffit.com/api/integration/v2/talents/
RequestsAdd candidate to talent

Example CURL:

curl -X POST "https://<your_traffit_name>.traffit.com/api/integration/v2/talents/" \
    -H "accept: application/json" \
    -H "Authorization: token" \
    -H "Content-Type: application/json" \
    -d "{ \"name\": \"talent_name\", \"public\": 1, \"description\": \"some description\", \"colour\": \"blue-grey\"}"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Body
{
  "name": "talent_name",
  "public": 1,
  "description": "some description",
  "colour": "blue-grey"
}
Responses201400
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Validation Failed",
  "errors": "<list_of_errors>"
}

Create talent
POST/api/integration/v2/talents/

Create talent

Required scope of authorization token: talent

Supported headers:

Authorization


Source

Get single source

GET https://www.<your_traffit_name>.traffit.com/api/integration/v2/sources/123
RequestsSearch by ID

Example CURL:

curl -X GET "https://<your_traffit_name>.traffit.com/api/integration/v2/sources/123" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer abcdef1234"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Responses200401404
Headers
Content-Type: application/json
Body
{
      "id": 1,
      "domain": "traffit",
      "url": "http://traffit.com",
      "dictionaryItem": {
        "id" => 1
      },
      "externalId": "abc12333",
      "employee": {
        "id" => 1
      }
  }
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Source not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Get single source
GET/api/integration/v2/sources/{source_id}

Get a single source by ID.

Required scope of authorization token: source

Supported headers:

Authorization

URI Parameters
HideShow
source_id
int (required) Example: 123

Source ID


Get sources list

GET https://www.<your_traffit_name>.traffit.com/api/integration/v2/sources
RequestsGet paginated results

Example CURL:

curl -X GET 'https://<your_traffit_name>.traffit.com/api/integration/v2/sources' \
            -H 'Authorization: Bearer abcdef1234' \
            -H 'X-Request-Page-Size: 2' \
            -H 'X-Request-Current-Page: 1'
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
X-Request-Page-Size: 2
X-Request-Current-Page: 1
Responses200400401
Headers
Content-Type: application/json
Body
[
  {
      "id": 1,
      "domain": "traffit",
      "url": "http://traffit.com",
      "dictionaryItem": {
        "id" => 1
      },
      "externalId": "abc12333",
      "employee": {
        "id" => 1
      }
  },
  {
      "id": 2,
      "domain": "traffit",
      "url": "http://traffit.com",
      "dictionaryItem": {
        "id" => 1
      },
      "externalId": "abc12333",
      "employee": {
        "id" => 1
      }
  }
]
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 400,
    "message": "Bad Request"
  }
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Get sources list
GET/api/integration/v2/sources

Retrieve all your sources

Required scope of authorization token: source

Supported headers:

Authorization,

X-Request-Page-Size,

X-Request-Current-Page,

X-Request-Filter

Supported comparators for sorting by system fields:

System field name Available comparators
id =, !=, <=, >=
domain =, !=, like
url =, !=, like

Update source

PUT https://www.<your_traffit_name>.traffit.com/api/integration/v2/sources/123
RequestsUpdate source

Example CURL:

curl -X PUT "https://<your_traffit_name>.traffit.com/api/integration/v2/sources/123" \
     -H "accept: application/json" \
     -H "Authorization: Bearer abcdef1234" \
     -H "Content-Type: application/json" \
     -d "{ \"domain\": \"traffit\", \"url\": \"http://traffit.com\"}"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Body
{
  "domain": "traffit",
  "url": "http://traffit.com",
  "external_id": "abc123",
  "dictionary_item_id": 1
}
Responses204400401404
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Validation Failed",
  "errors": "<list_of_errors>"
}
Headers
Content-Type: application/json
Body
{
  "error": "Authorization key is invalid."
}

Source not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Update source
PUT/api/integration/v2/sources/{source_id}

Update all source data

Required scope of authorization token: source

Supported headers:

Authorization

URI Parameters
HideShow
source_id
int (required) Example: 123

Source ID


Workflow

Get workflow states stats

GET https://www.<your_traffit_name>.traffit.com/api/integration/v2/workflows/123/states/counter
RequestsGet workflow states stats

Example CURL:

curl -X GET "https://www.<your_traffit_name>.traffit.com/api/integration/v2/workflows/123/states/counter"
     -H "accept: application/json"
     -H "Authorization: Bearer abcdef1234"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Responses200401404
Headers
Content-Type: application/json
Body
[
  {
    "state_id": 1,
    "state_name": "Nowy",
    "state_sid": "s1s0",
    "candidates_count": "1"
  },
  {
    "state_id": 3,
    "state_name": "Odrzucenie",
    "state_sid": "s1s2",
    "candidates_count": "2"
  }
]
Headers
Content-Type: application/json
Body
{
  "error": "Invalid scope"
}
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Get workflow states stats
GET/api/integration/v2/workflows/{workflow_id}/states/counter

URI Parameters
HideShow
workflow_id
int (required) Example: 123

Workflow ID


Get workflow with states details

GET https://www.<your_traffit_name>.traffit.com/api/integration/v2/workflows/123
RequestsGet workflow with states details

Example CURL:

curl -X GET "https://www.<your_traffit_name>.traffit.com/api/integration/v2/workflows/{workflow_id}"
     -H "accept: application/json"
     -H "Authorization: Bearer abcdef1234"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Responses200401404
Headers
Content-Type: application/json
Body
{
  "id": 1,
  "name": "Proces rekrutacyjny",
  "states": [
    {
      "id": 1,
      "name": "New",
      "type": "start",
      "sid": "start",
      "time_limit": 1,
      "order": 0
    },
    {
      "id": 2,
      "name": "Qualified",
      "type": "qualified",
      "time_limit": 5,
      "order": 1
    },
    {
      "id": 3,
      "name": "Phone interview",
      "type": "phone_interview",
      "order": 2
    },
    {
      "id": 4,
      "name": "Interview",
      "type": "interview",
      "order": 3
    },
    {
      "id": 5,
      "name": "Offer",
      "type": "offer",
      "order": 4
    },
    {
      "id": 6,
      "name": "Hired",
      "type": "end-good",
      "order": 9999997
    },
    {
      "id": 7,
      "name": "Rejected",
      "type": "end-bad",
      "order": 9999998
    },
    {
      "id": 8,
      "name": "Waiting list",
      "type": "wait",
      "order": 9999999
    }
  ]
}
Headers
Content-Type: application/json
Body
{
  "error": "Invalid scope"
}
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Get workflow with states details
GET/api/integration/v2/workflows/{workflow_id}

URI Parameters
HideShow
workflow_id
int (required) Example: 123

Workflow ID


Get workflows

GET https://www.<your_traffit_name>.traffit.com/api/integration/v2/workflows
RequestsGet workflows

Example CURL:

curl -X GET "https://www.<your_traffit_name>.traffit.com/api/integration/v2/workflows"
     -H "accept: application/json"
     -H "Authorization: Bearer abcdef1234"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Responses200401404
Headers
Content-Type: application/json
Body
[
  {
    "id": 1,
    "name": "Recruitment workflow",
    "active": 1,
    "updated_at": "2022-07-01 13:09:21"
  },
  {
    "id": 2,
    "name": "IT Recruitment workflow",
    "active": 1,
    "updated_at": "2022-05-01 13:09:21"
  }
]
Headers
Content-Type: application/json
Body
{
  "error": "Invalid scope"
}
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Get workflows
GET/api/integration/v2/workflows

URI Parameters
HideShow
workflow_id
int (required) Example: 123

Workflow ID


Generated by aglio on 04 Apr 2024