Traffit
API Endpoint
https://www.<your_traffit_name>.traffit.comOverview ¶
For integration with Traffit API you need to do two things:
- Add the API client
- 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.
-
Go to the Settings–> Integration with the Traffit API and click “+Add client”.
-
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.
-
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.
-
The ‘Generate Client Secret’ button will show up after you choose at least scope. Click on it.
-
A newly created client will show up in the summary with your unique Client Secret generated by Traffit.
Generating access 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>"
}
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 tokenPOST/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?
-
Go to Settings–>Fields Configuration and choose which entity fields you want to configure.
-
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 | ||
Job | Job title | name |
Contact | Name | name |
Contact | Last name | lastname |
Contact |
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 | ||
Candidate | GoldenLine | goldenline |
Candidate | ||
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 | ||
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 ¶
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"
}
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."
}
Update candidate ¶
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"
}
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 ¶
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"
}
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"
}
}
Get single candidate ¶
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
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
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
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/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
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"
}
}
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Body
{
"tags": [
"tag_name1",
"tag_name2"
]
}
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 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"
}
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 candidatePOST/api/integration/v2/employees/{employee_id}/files/{file_id}
- employee_id
int
(required) Example: 123Employee ID
- file_id
int
(required) Example: 22File ID
Reject 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"
}
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 jobPOST/api/integration/v2/employees/{employee_id}/recruitments/{recruitment_id}/states/_move_to_reject_state
- employee_id
int
(required) Example: 123Employee ID
- recruitment_id
int
(required) Example: 351Job ID
Move 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
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 statePOST/api/integration/v2/employees/{employee_id}/recruitments/{recruitment_id}/states/_move_to_next_state
- employee_id
int
(required) Example: 123Employee ID
- recruitment_id
int
(required) Example: 351Job ID
Move 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
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 statePOST/api/integration/v2/employees/{employee_id}/recruitments/{recruitment_id}/states/{state_id}/_move
- employee_id
int
(required) Example: 123Employee ID
- recruitment_id
int
(required) Example: 351Job ID
- state_id
int
(required) Example: 8State ID
Move 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
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 statePOST/api/integration/v2/employees/{employee_id}/recruitments/{recruitment_id}/states/_back
- employee_id
int
(required) Example: 123Employee ID
- recruitment_id
int
(required) Example: 351Job ID
Add provision to the candidate in job ¶
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"
}
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 jobPOST/api/integration/v2/employees/{employee_id}/provisions/{provision_id}
- employee_id
int
(required) Example: 123Employee ID
- provision_id
int
(required) Example: 22Provision ID
Add 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"
}
]
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"
}
}
Get candidate jobs ¶
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
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
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 jobsGET/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
- employee_id
int
(required) Example: 123Employee ID
Get candidate activities ¶
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
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
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
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 activitiesGET/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 | = , != , >= , <= |
- employee_id
int
(required) Example: 123Employee ID
Get candidates list ¶
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": "<="} }
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 listGET/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-Response-Metadata
Supported comparators for sorting by system fields:
System field name | Available comparators |
---|---|
id | = , != , <= , >= |
name | = , != , like |
lastname | = , != , like |
guid | = , != , like |
= , != , like |
|
created_at | = , != , <= , >= |
updated_at | = , != , <= , >= |
synchro_time | = , != , <= , >= |
Get candidates activities ¶
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
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
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
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 activitiesGET/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 ¶
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
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
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
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 historyGET/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 ¶
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"
}
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 candidatePOST/api/integration/v2/employees/{employee_id}/notes
- employee_id
int
(required) Example: 123Employee ID
Get candidate talents ¶
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
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"
}
}
Job ¶
Create new 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"
}
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"
}
}
Update 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"
}
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 ¶
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"
}
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"
}
}
Get single job ¶
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
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
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
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 jobs list ¶
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": "<="} }
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 listGET/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-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 ¶
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
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 recruitmentPOST/api/integration/v2/recruitments/{recruitment_id}/employees/{employee_id}
- recruitment_id
int
(required) Example: 222Job ID
- employee_id
int
(required) Example: 123Employee ID
Get 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
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 rejectionsGET/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,
- recruitment_id
int
(required) Example: 123Job ID
Get 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
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 rejectionsGET/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,
- recruitment_id
int
(required) Example: 123Job ID
Get job 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
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 rejectionsGET/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,
- recruitment_id
int
(required) Example: 123Job ID
Get 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
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 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
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 counterGET/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,
- recruitment_id
int
(required) Example: 123Job ID
Client ¶
Create 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"
}
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."
}
Update 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"
}
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 ¶
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Body
{
"synchro_time": "2020-08-27 09:01:15",
"_additional_custom_field": "Custom value"
}
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"
}
}
Get single client ¶
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
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
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
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 clients list ¶
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": "<="} }
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 listGET/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-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 ¶
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"
}
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."
}
Update 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"
}
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 ¶
Headers
Content-Type: application/json
Authorization: Bearer abcdef1234
Body
{
"lastname": "Doe",
"email": "john.doe@email.com"
}
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_personPATCH/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
- crm_person_id
int
(required) Example: 123Crm_person ID
Get single crm_person ¶
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
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
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
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_personGET/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
- crm_person_id
int
(required) Example: 123Crm_person ID
Get crm_persons list ¶
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": "<="} }
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 listGET/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-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 |
= , != , like |
File ¶
Upload 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
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."
}
Job post ¶
Get single job post ¶
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
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
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"
}
}
Form ¶
Get application form ¶
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
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"
}
}
User ¶
Create 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"
}
}
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 ¶
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"
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."
}
Get single user ¶
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
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
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 users list ¶
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": "<="} }
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 listGET/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-Response-Metadata
Supported comparators for sorting by system fields:
System field name | Available comparators |
---|---|
id | = , != , <= , >= |
username | = , != , like |
= , != , like |
Crm_activity ¶
Get single crm_activity ¶
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
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
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 crm_activities list ¶
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": "<="} }
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 listGET/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-Response-Metadata
Supported comparators for sorting by system fields:
System field name | Available comparators |
---|---|
id | = , != , <= , >= |
created_at | = , != , <= , >= |
updated_at | = , != , <= , >= |
Provision ¶
Get provisions list ¶
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
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
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 listGET/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 ¶
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
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."
}
Generated by aglio on 07 Jan 2021