All your candidates can be retrieved by GET  request to 

https://<your_traffit_subdomain>.traffit.com/api/v2/employees/

Requirements:

  • you need to have a grant access token with employee scope

Available request headers: (How headers work with API?)

  •  Authorization 
  • X-Request-Page-Size
  • X-Request-Current-Page 
  • X-Request-Filter
  • X-Request-Sort
  • X-Response-Metadata

Available filtering fields: (How can I filter records via API? )

System fields:

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

Custom fields with comparators are described here 

Available sorting fields:  (How can I sort records via API? )

System fields:

System field name
'id'              
'name'            
'lastname'        
'guid'            
'email'             

Custom fields:

All types except Choice/Multi-choice with dictionary values. 

Example cURL request::

curl -X GET 'https://<your_traffit_subdomain>.traffit.com/api/integration/v2/employees/' \
-H 'Authorization: Bearer <your_grant_access_token>' \
-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"}' 

Example response (without custom fields):

[
  {
    "id": 2226874,
    "name": "Test",
    "lastname": "Candidate",
    "status": "active",
    "files": [],
    "email": "[email protected]",
    "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": "[email protected]",
    "created_at": "2012-05-30 14:15:40",
    "updated_at": "2012-05-30 14:16:35"
  }
]

Did this answer your question?