Traffit

Overview

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=password 
        -F username=<your_Traffit_username> 
        -F password=<your_Traffit_password> 
        -F scope=employee
Headers
Content-Type: application/json
Body
{
  "client_id": "<your_client_name>",
  "client_secret": "<your_client_secret",
  "grant_type": "password",
  "username": "<your_Traffit_username",
  "password": "<your_Traffit_password>"
}
Responses200400
Headers
Content-Type: application/json
Body
{
  "access_token": "<your_access_token>",
  "expires_in": 3600,
  "token_type": "Bearer",
  "scope": "employee",
  "refresh_token": "<your_refresh_token>"
}
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 one hour.

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:

You need to type a password here

username:

Your Traffit username which you use for logging into Traffit system.

password:

Your Traffit password which you use for logging into Traffit system.

scope:

One of the scopes which you chose for a client.


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

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 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 recruiter owner
Job Job status status
Job Industry branches
Job Number of vacancies emp_number
Job Notes note
Job Job type x_work_time
Job Remote job remote
Job Deadline recruitment_deadline
Job Office localization
Job Client client
Job Contact person person
Job Region regions
Job Reference number nrRef
Client Company name name
Client City city
Client Country country
Client Email email
Client Note note
Client Phone phone
Client Postal code postal_code
Client Status status
Client Street street
Client TAX Number vat_number
Client Company website address www
Contact Phone phone
Contact Position position
Contact Disabled activityState

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 OR 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/v2/integration/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/v2/integration/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/v2/integration/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/v2/integration/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/v2/integration/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/v2/integration/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 to the candidate

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

Example CURL:

curl -X POST "https://<your_traffit_name>.traffit.com/api/integration/v2/employees/123/files/22" \
     -H "accept: application/json" \
     -H "Authorization: Bearer abcdef1234" \
     -H "Content-Type: application/json" \
     -d "{ \"dictionary_type\": \"CV\" }"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Body
{
  "dictionary_type": "CV"
}
Responses204400401404409
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 or file not found

Headers
Content-Type: application/json
Body
{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}
Headers
Content-Type: application/json
Body
{
  "error": "File is already assigned to this employee"
}

Add file to the candidate
POST/api/integration/v2/employees/{employee_id}/files/{file_id}

URI Parameters
HideShow
employee_id
int (required) Example: 123

Employee ID

file_id
int (required) Example: 22

File 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


Move candidate in job to last state

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

Example CURL:

curl -X POST "https://<your_traffit_name>.traffit.com/api/integration/v2/employees/123/recruitments/22/states/_back" \
     -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 last state
POST/api/integration/v2/employees/{employee_id}/recruitments/{recruitment_id}/states/_back

URI Parameters
HideShow
employee_id
int (required) Example: 123

Employee ID

recruitment_id
int (required) Example: 351

Job ID


Add provision to the candidate in job

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
Body
{
  "recruitment": "111",
  "agreement_date": "2021-01-04"
}
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 or file not found

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

Add provision to the candidate in job
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 in job

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

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
Body
[
  {
    "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"
  }
]
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 or file not found

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

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

Add many provisions to the candidate in job

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/api/integration/v2/employees/{employee_id/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/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"
    },
    "content": "",
    "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"
    },
    "content": "",
    "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"
    },
    "content": "",
    "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 =, !=, >=, <=
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 sorting 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"
    },
    "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"
    },
    "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"
    },
    "content": "",
    "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"
    },
    "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"
    },
    "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"
    },
    "content": "",
    "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"
    },
    "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"
    },
    "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"
    },
    "content": "",
    "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 =, !=

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

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


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/v2/integration/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/v2/integration/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/v2/integration/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
  },
  "created_by": {
    "id": 18
  },
  "updated_by": {
    "id": 18
  },
  "created_at": "2020-02-10 08:49:39",
  "updated_at": "2020-04-27 11:15:40"
}
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"
      ]
    }
  }
}
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
  },
  "created_by": {
    "id": 18
  },
  "updated_by": {
    "id": 18
  },
  "created_at": "2020-02-10 08:49:39",
  "updated_at": "2020-04-27 11:15:40"
}
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"
      ]
    }
  }
}
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
  },
  "created_by": {
    "id": 18
  },
  "updated_by": {
    "id": 18
  },
  "created_at": "2020-02-10 08:49:39",
  "updated_at": "2020-04-27 11:15:40"
}
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"
      ]
    }
  }
}
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/v2/integration/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
    },
    "created_by": {
      "id": 1
    },
    "updated_by": {
      "id": 1
    },
    "created_at": "2019-01-22 14:57:33",
    "updated_at": "2019-01-22 14:58:13"
  },
  {
    "id": 132,
    "status": "active",
    "name": "New second job",
    "client": {
      "id": 2
    },
    "created_by": {
      "id": 18
    },
    "created_at": "2020-01-21 15:04:52",
    "updated_at": "2020-01-22 10:08:38"
  }
]
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 =, !=, <=, >=

Add candidate to the recruitment

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

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"
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 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 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


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",
    "workflow": {
      "id": 1
    },
    "order": 0
  },
  {
    "id": 3,
    "name": "Video call",
    "workflow": {
      "id": 1
    },
    "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 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


Client

Create new client

POST https://www.<your_traffit_name>.traffit.com/api/v2/integration/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/v2/integration/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/v2/integration/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/v2/integration/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/v2/integration/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/v2/integration/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/v2/integration/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\"}"
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"
}
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/v2/integration/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\"}"
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"
}
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/v2/integration/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/v2/integration/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/v2/integration/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"
}
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"
    }
  }
}
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"
}
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"
    }
  }
}
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"
}
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"
    }
  }
}
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/v2/integration/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"
  },
  {
    "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"
  }
]
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/v2/integration/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/v2/integration/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/v2/integration/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/v2/integration/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/v2/integration/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\" }}"
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"
  }
}
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/v2/integration/users/

Create user

Required scope of authorization token: user

Supported headers:

Authorization,

X-Request-Metadata


Create new user

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

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\"}"
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Body
{
  "username": "john@doe.com"
Responses204400401
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."
}

Create new user
PATCH/api/v2/integration/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/v2/integration/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,
  "permission_group": {
    "id": 1,
    "name": "Administrator"
  }
}
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"
      ]
    }
  }
}
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,
  "permission_group": {
    "id": 1,
    "name": "Administrator"
  }
}
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"
      ]
    }
  }
}
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/v2/integration/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,
    "permission_group": {
      "id": 9,
      "name": "Administrator"
    }
  },
  {
    "username": "nicole.doe@traffit.com",
    "email": "nicole.doe@traffit.com",
    "id": 22,
    "permission_group": {
      "id": 1,
      "name": "Administrator"
    }
  }
]
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

Crm_activity

Get single crm_activity

GET https://www.<your_traffit_name>.traffit.com/api/v2/integration/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/v2/integration/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"
    }
  },
  {
    "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"
    }
  }
]
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"
    }
  },
  {
    "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"
    }
  }
]
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,


Generated by aglio on 07 Jan 2021