Back to top

Notes API

Notes

New Note

Add Note
POST/notes

CLIENTS ONLY: Add a new note (maximum length 300 characters).

Example URI

POST https://notes.api.cv-library.co.uk/notes
Request
HideShow
Headers
Content-Type: application/json; charset=UTF-8
X-Account-ID: ...
X-HMAC: ...
X-Recruiter-ID: ...
Body
{
  "candidate_id": 123456,
  "text": "abc"
}
Response  201
HideShow
Headers
Location: http://.../notes/{id}
Response  401
Response  413
Response  415

Note List

Get Notes
GET/notes{?account_id,candidate_id,fields,page,per_page,recruiter_id,sort}

CLIENTS, ADMIN: Get a collection of notes, paginated, filtered and sorted according to parameters.

Example URI

GET https://notes.api.cv-library.co.uk/notes?account_id=189520&candidate_id=123456,456789&fields=candidate_id&page=&per_page=10&recruiter_id=303656&sort=
URI Parameters
HideShow
account_id
int (optional) Example: 189520

ID(s) of account(s) whose notes will be displayed

candidate_id
int (optional) Example: 123456,456789

ID(s) of candidate(s) whose notes will be displayed

fields
string (optional) Example: candidate_id

Which fields to display

Choices: account_id candidate_id created id recruiter_id revision text updated

page
int (optional) Default: 1 

Page number / offset

per_page
int (optional) Example: 10

Number of notes displayed per page

recruiter_id
int (optional) Example: 303656

ID(s) of recruiter(s) whose notes will be displayed

sort
string (optional) 

Which field to sort by

Choices: created -created updated -updated

Request
HideShow
Headers
Content-Type: application/json; charset=UTF-8
X-Account-ID: ...
X-HMAC: ...
X-Recruiter-ID: ...
Response  200
HideShow
Headers
Content-Length: ...
Link: <http://.../notes?...per_page=3&page=2>; rel="next", ...
Body
[
    {
        "candidate_id" : 123456,
        "created"      : "...",
        "id"           : 1,
        "revision"     : 1,
        "text"         : "foo",
        "updated"      : "...",
        "visible"      : true
    }
    {
        "candidate_id" : 123456,
        "created"      : "...",
        "id"           : 2,
        "revision"     : 1,
        "text"         : "boo",
        "updated"      : "...",
        "visible"      : true
    }
    {
        "candidate_id" : 123456,
        "created"      : "...",
        "id"           : 3,
        "revision"     : 2,
        "text"         : "moo",
        "updated"      : "...",
        "visible"      : true
    }
]
Request
HideShow
Headers
Content-Type: application/json; charset=UTF-8
X-Admin: ...
X-HMAC: ...
Response  200
HideShow
Headers
Content-Length: ...
Link: <http://.../notes?...per_page=3&page=2>; rel="next", ...
Body
[
    {
        "candidate_id" : 123456,
        "created"      : "...",
        "id"           : 1,
        "revision"     : 1,
        "text"         : "foo",
        "updated"      : "...",
        "visible"      : true
    }
    {
        "candidate_id" : 123456,
        "created"      : "...",
        "id"           : 2,
        "revision"     : 1,
        "text"         : "boo",
        "updated"      : "...",
        "visible"      : true
    }
    {
        "candidate_id" : 123456,
        "created"      : "...",
        "id"           : 3,
        "revision"     : 2,
        "text"         : "moo",
        "updated"      : "...",
        "visible"      : true
    }
]
Response  401
Response  415

Single Note

Get Note
GET/notes/

CLIENTS, ADMIN: Get a single note

Example URI

GET https://notes.api.cv-library.co.uk/notes/
Request
HideShow
Headers
Content-Type: application/json; charset=UTF-8
X-Account-ID: ...
X-HMAC: ...
X-Recruiter-ID: ...
Response  200
HideShow
Headers
Content-Length: ...
Content-Type: application/json; charset=UTF-8
Body
{
  "candidate_id": 123456,
  "created": "...",
  "id": 1,
  "revision": 1,
  "text": "foo",
  "updated": "...",
  "visible": true
}
Request
HideShow
Headers
Content-Type: application/json; charset=UTF-8
X-Admin: ...
X-HMAC: ...
Response  200
HideShow
Headers
Content-Length: ...
Content-Type: application/json; charset=UTF-8
Body
{
  "candidate_id": 123456,
  "created": "...",
  "id": 1,
  "revision": 1,
  "text": "foo",
  "updated": "...",
  "visible": true
}
Response  401
Response  403
Response  404
Response  410
Response  415

Patch Note
PATCH/notes/

CLIENTS, ADMIN: Hide (‘delete’) note, or update text

Example URI

PATCH https://notes.api.cv-library.co.uk/notes/
Request
HideShow
Headers
Content-Type: application/json; charset=UTF-8
X-Account-ID: ...
X-HMAC: ...
X-Recruiter-ID: ...
Body
{
    "text" : "new text"
}

{
    "visible" : false
}
Response  204
Request
HideShow
Headers
Content-Type: application/json; charset=UTF-8
X-Admin: ...
X-HMAC: ...
Body
{
    "text" : "new text"
}

{
    "visible" : false
}
Response  204
Response  401
Response  403
Response  404
Response  410
Response  413
Response  415

Admin Notes Log

Get Log
GET/notes/log{?account_id,admin,fields,page,per_page,sort}

ADMIN ONLY: Get log of edits and deletions made by admin

Example URI

GET https://notes.api.cv-library.co.uk/notes/log?account_id=189520&admin=123456&fields=candidate_id&page=&per_page=10&sort=
URI Parameters
HideShow
account_id
int (optional) Example: 189520

ID of account whose notes will be displayed

admin
int (optional) Example: 123456

name of admin whose edits will be displayed

fields
string (optional) Example: candidate_id

Which fields to display

Choices: account_id admin admin_updated candidate_id id old_text recruiter_id text

page
int (optional) Default: 1 

Page number / offset

per_page
int (optional) Example: 10

Number of notes displayed per page

sort
string (optional) 

Which field to sort by

Choices: updated -updated

Request
HideShow
Headers
Content-Type: application/json; charset=UTF-8
X-Admin: ...
X-HMAC: ...
Response  200
HideShow
Headers
Content-Length: ...
Link: <http://.../notes?...per_page=3&page=2>; rel="next", ...
Body
[
    {
        "account_id"   : 189520,
        "admin"        : "admin-person-1",
        "admin_updated": ...,
        "candidate_id" : 123456,
        "id"           : 1,
        "old_text"     : "foo",
        "recruiter_id" : 303656,
        "text"         : "bar",
    }
    {
        "account_id"   : 189520,
        "admin"        : "admin-person-2",
        "admin_updated": ...,
        "candidate_id" : 123456,
        "id"           : 1,
        "old_text"     : "foo",
        "recruiter_id" : 987654,
        "text"         : "",
    }
]
Response  401
Response  415

Generated by aglio on 11 Apr 2019