Important Notice: Outdated Information
This article is outdated and will not be updated. The information provided may be inaccurate or no longer relevant
Carerix now offers a GraphQL API
Please use our GraphQL API.
https://docs.carerix.io/graphql/welcome
https://help.carerix.com/en/articles/9482350-carerix-graphql-api
This Article describes our Carerix REST API
Related articles:
Introduction Carerix REST API
Your Carerix system supports the popular REST API . With this REST API you develop applications that are able to exchange ( read and write ) nearly all data with your Carerix system.
This particular documentation lists standard REST API methods (auto-generated from the source code), which when coupled with a basic understanding of Carerix Data models and their relationships with each other as well as examples found in XML API should give you as developer the tools to accomplish the necessary tasks.
An example for REST API: (Upload an attachment to an existing candidate).
PUT /CREmployee/88 <?xml version="1.0" encoding="utf-8" ?> <CREmployee> <attachments> <CRAttachment> <label>labeltext</label> <toTypeNode><CRDataNode id="1461"/></toTypeNode> <filePath>C:\temp\CV.doc</filePath> <toAttachmentData> <CRAttachmentData> <content>... base-64 encoded data ...</content> </CRAttachmentData> </toAttachmentData> </CRAttachment> </attachments> </CREmployee>
Source:
Further resources:
http://res.carerix.com/manual/english/cxfields.htm Carerix Data Models. all developers.
https://groups.google.com/forum/#!forum/carerix-rest-api - Carerix REST API Google Group - see if your question had already been answered. If not post your question and get an answer.
Quick start
Essentials
API Endpoint
The address of the REST API is: https://api.carerix.com
Timezone
All dates and timestamps are in “Europe/Amsterdam” timezone (+0200) unless noted otherwise.
Important: All date fields must contain a timezone and have the following format: YYYY-MM-DD HH:MM:SS +0200 (+0200 represents the timezone)
Tip: if you need to save a date value and “ignore” the hours part you should use 12:00 hours instead of 00:00. Example, 2013-04-28 12:00 +02:00
Authentication
Every REST API request needs a valid access token. Without a valid access token a request send to the REST API will result in an authorization error. There are 2 types of access tokens: Application Token and User Token.
Application Token
Used to connect applications with Carerix system when no user is present (background applications). Get an access token by asking the helpdesk of the Carerix system. (support@carerix.com).
Notes:
Access token grants unrestricted access to Carerix system. Use with caution.
User Token
This part is deprecated. Please refer to the text above to learn how to retrieve a token.
Responses
The following HTTP response codes would be returned depending on the outcome:
Response formats
Carerix REST API supports the following response formats:
xml - default format
Response codes
200 - Success
Example
HTTP/1.1 200 OK Content-Type: application/xml; charset=UTF-8 <?xml version="1.0" encoding="UTF-8"?> <entity name="CRUser"> ..... </entity>
204 No Content
When you DELETE a resource the API will reply with an empty body and 204 HTTP code on success.
Example
HTTP/1.1 204 No Content
401 - Authorization failed
Example
HTTP/1.1 401 Authorization Required Content-Type: text/xml;charset=utf-8 <?xml version="1.0" encoding="UTF-8"?> <NSException><name>Carerix_Api_Xml_Exception</name> <reason>Missing or invalid authorization header</reason> <userInfo></userInfo> </NSException>
500 - Error
Examine response body for more details;
Example
HTTP/1.1 500 Internal Server Error Content-Type: application/xml; charset=UTF-8 <?xml version="1.0" encoding="UTF-8"?> <NSException><name>Carerix_Api_Xml_Exception</name> <reason>Reason for exception</reason> <userInfo></userInfo></NSException>
Error format
Error responses have the following format:
<?xml version="1.0" encoding="UTF-8"?> <NSException> <name></name> <reason></reason> <userInfo></userInfo> </NSException>
Requests
Each REST API request consists of:
controller like: CRCompany, CREmployee,..etc.
method for each controller enable you to view and save information for that controller
parameters for each method make more details available for the exact execution of the request
Consult the complete list of supported API Methods for more details.
Basic Requests
To specify the response format for simple requests like GET, OPTIONS, DELETE simply add “format/FORMAT_NAME” parameter to the request URL.
Example 1
Request GET https://api.carerix.com/CREmployee/1234
Response
<?xml version="1.0" encoding="UTF-8"?> <CREmployee id="1234"> <lastName>Peters</lastName> </CREmployee> </pre>
Complex Requests
Complex requests (POST, PUT) containing the request body will have a response message formatted according to the Content-Type header received in the original request. If you are making PUT request with XML document the response would be in XML format.
Note: XML message in POST/PUT requests must not contain comments.
Example 1: Valid Request
Request
PUT https://api.carerix.com/CREmployee HTTP/1.1 Authorization: Basic YW5kcmV5Lnlha3Vib3Zza2l5QGdtYWlsLmNvbQ===== Content-Type: application/xml Content-Length: 12345 Host: api.carerix.com <?xml version="1.0" encoding="UTF-8"?> <CREmployee> <lastName>Peters</lastName> </CREmployee>
Response
<?xml version="1.0" encoding="UTF-8"?> <CREmployee id="1234"> .... <lastName>Peters</lastName> .... </CREmployee>
Example 2: Invalid Request
Request
PUT https://api.carerix.com/CREmployee HTTP/1.1 Authorization: Basic YW5kcmV5Lnlha3Vib3Zza2l5QGdtYWlsLmNvbQ===== Content-Type: application/xml Content-Length: 12345 Host: api.carerix.com <?xml version="1.0" encoding="UTF-8"?> <CREmployee> <lastName>Peters</lastName> </CREmployee>
Response
<?xml version="1.0" encoding="UTF-8"?> <NSException> <name>Carerix_Api_Xml_Exception</name> <reason>Validation error. Request body root element must be CREmployee. Please examine your request body.</reason> <userInfo /> </NSException>
Common Request Parameters
A set of request parameters shared by several API methods:
qualifier - string - required - urlencoded search criteria in the form of high-level variant of SQL. See Query Language section for more information;
start - integer - optional - return records starting from this position. Defaults to 0;
count - integer - optional - maximum number of records to return. Defaults to 10;
ordering - string - optional - urlencoded ordering criteria. The format is “{key=fieldname;sel=Direction}”, where Direction can be either “Ascending” or “Descending” and fieldname - any valid attribute in entity schema. For example, ordering by a single key {key=toUser.lastName;sel=Descending}. ordering by several keys ({key=toUser.lastName;sel=Descending},{key=toUser.firstName;sel=Ascending})
trav - boolean - optional|conditional - true - include object relationships if any into response, false - return the requested object only. Cannot be used with $show parameter;
show - string - optional|conditional - return only specified attributes. Cannot be used with $trav parameter. Can be used multiple times, e.g. show=firstName&show=lastName. To traverse a relationship and still get all of the fields of a parent entity pass an empty value, e.g. show=&show=toUser;
norestrict - boolean - optional - true - show previously deleted records; false - don't show deleted records. Default: false. Not all of the models support this parameter.
language - string - optional - return results with localized strings if available. Available languages: Dutch, English, and Spanish. Default: Dutch.
URL Schemes
The REST API supports the following request formats:
Standard URL scheme
https://api.carerix.com/CREmployee/list?show=employeeID&show=sortName&show=firstName&start=0&count=10
Authentication
The Carerix REST API authentication mechanism supports Basic HTTP Authentication . You will need to supply a system name (usually a system name, e.g. publictest) and an access token. The credentials must be supplied with each request sent to the REST API unless instructed otherwise.
To construct an “Authorization” header you start with “Basic ”. string and append base64 encoded “CARERIX_SYSTEM_NAME:CARERIX_TOKEN” string w/o quotes.
PHP Example
<?php echo "Authorization: Basic ".base64_encode('CARERIX_SYSTEM_NAME:CARERIX_TOKEN')."\n";
Raw HTTP Request
GET https://api.carerix.com/CRUser/1234 HTTP/1.1 Authorization: Basic YW5kcmV5Lnlha3Vib3Zza2l5QGdtYWlsLmNvbQ===== Host: api.carerix.com
Raw HTTP Response (successful authentication)
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: 1234 <?xml> ...requested payload... </xml>
Raw HTTP Response (failed authentication)
HTTP/1.1 401 Authorization Required WWW-Authenticate: Basic realm="Carerix REST API"
Methods
Consult the complete list of supported API Methods for more details.
Query Language
$qualifier parameter supports a form of high-level variant of SQL. It means that you can send SQL-like queries against an entity just as you would in a real database. The query parameter is basically an SQL statement that goes after “SELECT * FROM entity_table” and provides developers with unparalleled search functionality. Think of each entity as a database table you can query using basic SQL commands like:
first_name='John' AND last_name != 'Doe' first_name like 'john*'
To construct SQL queries you need to know the table schema (field names, data types, length, etc). This information can be easily obtained by calling “GET $object/describe” API methods where $object is a Carerix object name, e.g. user, employee, vacancy, etc. More information on query language can be found here .
REST API Clients
PHP
We have developed Carerix REST API PHP5 Client with ActiveRecord flavor to help you kick-start development with Carerix REST API.
JavaScript
JavaScript application cannot access web services on other domains using XMLHttpRequest (XHR) calls. For example, if your JavaScript application runs on siteA.com it cannot make XHR request to siteB.com. This is a security feature in all browsers. There are workarounds available: proxy, Apache mod-rewrite and others. Please consult http://developer.yahoo.com/javascript/howto-proxy.html for more details and choose a solution that best fits your requirements.
FAQs
Best Practice
Find and FindAll. It is essential to clarify what data you need and how much. It helps to reduce response package and drastically increase performance.
Bad solution
$user_id = 78242; // system publictest Carerix_Api_Rest_Entity_CRUser::find($user_id);
Response
<?xml version="1.0" encoding="UTF-8"?> <CRUser id="78242"> <additionalInfo> <NSDictionary /> </additionalInfo> <creationDate>2012-06-21 08:54:43</creationDate> <deleted>0</deleted> <firstName>Goran</firstName> <forwardEmail>0</forwardEmail> <goals> <NSArray /> </goals> <homeFullAddress /> <isActive>0</isActive> <isEmailInConfidential>0</isEmailInConfidential> <isEmailOutConfidential>0</isEmailOutConfidential> <isLoginBlocked>0</isLoginBlocked> <isNewUser>0</isNewUser> <isTbaActive>0</isTbaActive> <isTokenHomeActive>0</isTokenHomeActive> <isTokenRoadActive>0</isTokenRoadActive> <isTokenWorkActive>0</isTokenWorkActive> <lastContactDate>2012-06-21 08:54:43</lastContactDate> <lastName>Gligorin</lastName> <mailboxFlags>0</mailboxFlags> <mailboxSettings> <NSDictionary /> </mailboxSettings> <modificationDate>2012-06-21 08:54:43</modificationDate> <password>Ec7HAbc3</password> <passwordHash>e474562a4ef7fcf7fcda48a0fad4e289</passwordHash> <previewDelay>0</previewDelay> <userBonuses> <NSArray /> </userBonuses> <userID>78242</userID> <userName>PyKXt4UV</userName> <wantsCookie>0</wantsCookie> <owner> <CRUser id="5772" /> </owner> <singleOwner> <CRUser id="5772" /> </singleOwner> <toCountryNode> <CRDataNode id="0" /> </toCountryNode> <toFunctionNode> <CRDataNode id="0" /> </toFunctionNode> <toGenderNode> <CRDataNode id="2002" /> </toGenderNode> <toHomeCountryNode> <CRDataNode id="49" /> </toHomeCountryNode> <toHomeProvinceNode> <CRDataNode id="0" /> </toHomeProvinceNode> <toLanguageNode> <CRDataNode id="1464" /> </toLanguageNode> <toProductNode> <CRDataNode id="157" /> </toProductNode> <toProvinceNode> <CRDataNode id="0" /> </toProvinceNode> <toSalutationNode> <CRDataNode id="2283" /> </toSalutationNode> <toSingleStatusNode> <CRDataNode id="87" /> </toSingleStatusNode> <toSmtpServerNode> <CRDataNode id="0" /> </toSmtpServerNode> <toSourceNode> <CRDataNode id="0" /> </toSourceNode> <toStatusNode> <CRDataNode id="87" /> </toStatusNode> <toTrialPeriodUnitNode> <CRDataNode id="0" /> </toTrialPeriodUnitNode> <toUserRole> <CRUserRole id="1" /> </toUserRole> <toVisitCountryNode> <CRDataNode id="0" /> </toVisitCountryNode> </CRUser>
Last solution is not a good choose because we get more data that we need as a result it works slow.
Solution Good
$user_id = 78242; // system publictest $params = array( 'show' => array( 'firstName', 'createdBy.userId', 'toCountryNode.value', 'userCompanies.toCompany.name', ) ); Carerix_Api_Rest_Entity_CRUser::find($user_id, $params);
Response
<?xml version="1.0" encoding="UTF-8"?> <CRUser id="78242"> <firstName>Goran</firstName> <toCountryNode> <CRDataNode id="0" /> </toCountryNode> <userCompanies count="0" /> </CRUser>
Carefully usage of attachments attribute. What we are trying to do if it is need get photo of employee. Lets review some solutions.
Bad solution
$employee_id = 52186; // system publictest $params = array( 'show' => array( 'attachments', 'attachments.toTypeNode' ) ); $employee = Carerix_Api_Rest_Entity_CREmployee::find($employee_id, $params); $photo = false; foreach ($employee->getAttachments() as $item) { if ($item->getToTypeNode()->getValue() == 'Photo') { $photo = $item->getContent(); break; } }
Response
<?xml version="1.0" encoding="UTF-8"?> <CREmployee id="52186"> <attachments count="3"> <CRAttachment id="489457"> <attachmentID>489457</attachmentID> <content>... base-64 encoded data ...</content> <creationDate>2014-02-20 09:22:47</creationDate> <filePath>carerix.cxposting.logo.png</filePath> <label /> <metaData> <NSDictionary /> </metaData> <modificationDate>2014-02-20 09:22:47</modificationDate> <valid>1</valid> <owner> <CRUser id="77905" /> </owner> <toAttachmentData> <CRAttachmentData id="42de45286e0b5397377ab0ac5e9aca42" /> </toAttachmentData> <toTypeNode> <CRDataNode id="2501"> <creationDate>2007-02-20 10:39:53</creationDate> <dataNodeID>2501</dataNodeID> <deleted>0</deleted> <isDefault>0</isDefault> <isHidden>0</isHidden> <isSystem>0</isSystem> <modificationDate>2007-02-20 10:40:06</modificationDate> <notActive>0</notActive> <notes>(21,22,20)</notes> <sortOrder>26</sortOrder> <value>Logo</value> <type> <CRNodeType id="18" /> </type> </CRDataNode> </toTypeNode> </CRAttachment> <CRAttachment id="489456"> <attachmentID>489456</attachmentID> <content>... base-64 encoded data ...</content> <creationDate>2014-02-20 09:22:34</creationDate> <filePath>carerix.logo.gif</filePath> <label /> <metaData> <NSDictionary /> </metaData> <modificationDate>2014-02-20 09:22:34</modificationDate> <valid>1</valid> <owner> <CRUser id="77905" /> </owner> <toAttachmentData> <CRAttachmentData id="d6eac618e9bf111fa00045bc16550c6d" /> </toAttachmentData> <toTypeNode> <CRDataNode id="2538"> <creationDate>2008-12-31 10:27:02</creationDate> <dataNodeID>2538</dataNodeID> <deleted>0</deleted> <isDefault>0</isDefault> <isHidden>0</isHidden> <isSystem>0</isSystem> <modificationDate>2013-03-25 11:55:19</modificationDate> <notActive>0</notActive> <notes>(21,22,20)</notes> <sortOrder>46</sortOrder> <value>Photo</value> <type> <CRNodeType id="18" /> </type> </CRDataNode> </toTypeNode> </CRAttachment> <CRAttachment id="489455"> <attachmentID>489455</attachmentID> <content>... base-64 encoded data ...</content> <creationDate>2014-02-20 09:22:24</creationDate> <filePath>carerix.logo.gif</filePath> <label /> <metaData> <NSDictionary /> </metaData> <modificationDate>2014-02-20 09:22:24</modificationDate> <valid>1</valid> <owner> <CRUser id="77905" /> </owner> <toAttachmentData> <CRAttachmentData id="d6eac618e9bf111fa00045bc16550c6d" /> </toAttachmentData> <toTypeNode> <CRDataNode id="70"> <creationDate>2002-04-24 09:20:00</creationDate> <dataNodeID>70</dataNodeID> <deleted>0</deleted> <isDefault>1</isDefault> <isHidden>0</isHidden> <isSystem>0</isSystem> <modificationDate>2013-09-26 22:33:41</modificationDate> <notActive>0</notActive> <notes>(24, 20, 21, 22)</notes> <sortOrder>1</sortOrder> <value>CVOriginal</value> <type> <CRNodeType id="18" /> </type> </CRDataNode> </toTypeNode> </CRAttachment> </attachments> </CREmployee>
This solution is wrong because the first it gets more data as need: all attachments with + all attributes + all attributes of dataNode. The second check attachment type by value of toTypeNode is not correct because value can be changed by user. It is need to use tag instead.
Better solution
$employee_id = 52186; // system publictest // find photo attachment id $params = array( 'show' => array( 'attachments.toTypeNode.tag' ) ); $employee = Carerix_Api_Rest_Entity_CREmployee::find($employee_id, $params); $attachment_id = false; foreach ($employee->getAttachments() as $item) { if ($item->getToTypeNode()->getTag() == 'PhotoTag') { $attachment_id = $item->getId(); break; } } // get attachment $photo = false; if ($attachment_id !== false) { $params = array( 'show' => array( 'content' ) ); $attachment = Carerix_Api_Rest_Entity_CRAttachment::find($attachment_id, $params); $photo = $attachment->getContent(); }
Response 1
<?xml version="1.0" encoding="UTF-8"?> <CREmployee id="52186"> <attachments count="3"> <CRAttachment id="489457"> <toTypeNode> <CRDataNode id="2501"> <tag>LogoTag</tag> </CRDataNode> </toTypeNode> </CRAttachment> <CRAttachment id="489456"> <toTypeNode> <CRDataNode id="2538"> <tag>PhotoTag</tag> </CRDataNode> </toTypeNode> </CRAttachment> <CRAttachment id="489455"> <toTypeNode> <CRDataNode id="70"> <tag>CVUploadedByCandidateTag</tag> </CRDataNode> </toTypeNode> </CRAttachment> </attachments> </CREmployee>
Response 2
<?xml version="1.0" encoding="UTF-8"?> <CRAttachment id="489456"> <content>... base-64 encoded data ...</content> </CRAttachment>
This solution is also not so good because we have to requests to server but it tremendously faster then previous one. For some satiation approach of using two requests it acceptable.
Solution good
$employee_id = 52186; // system publictest // find photo attachment id $params = array( 'show' => array( 'photo' ) ); $employee = Carerix_Api_Rest_Entity_CREmployee::find($employee_id, $params); $photo = (!is_null($employee->getPhoto()))? $employee->getPhoto(): false;
Response
<?xml version="1.0" encoding="UTF-8"?> <CREmployee id="52186"> <photo>R0lGODlhpAAoAOYAAP////f///f3//f39+/3/+f39+/v7+fv997v9+fn59bn787n797e3sbe773e59bW1r3W57XW587Ozq3O56XO3sbGxpzG3r29vZTG3rW1tYy91q2trYS11nu11qWlpXOtzmutzpycnGOlzlqlxlKlxpSUlFKcxkqcxoyMjEKUvYSEhDmUvTmMvTGMvXt7eymEtXNzcyGEtRiEtWtraxh7tRh7rRB7rWNjY1paWlJSUkpKSkJCQjk5OTExMSkpKSEhIRgYGBAQEAgICAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNC4yLjItYzA2MyA1My4zNTE3MzUsIDIwMDgvMDcvMjItMTg6MDQ6MjYgICAgICAgICI+CiAgIDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyI+CiAgICAgICAgIDx4bXA6Q3JlYXRvclRvb2w+QWRvYmUgRmlyZXdvcmtzIENTNDwveG1wOkNyZWF0b3JUb29sPgogICAgICAgICA8eG1wOkNyZWF0ZURhdGU+MjAxMC0wNy0xMlQxMjo1MzoxM1o8L3htcDpDcmVhdGVEYXRlPgogICAgICAgICA8eG1wOk1vZGlmeURhdGU+MjAxMC0wOS0wMlQxMDoxNToxMVo8L3htcDpNb2RpZnlEYXRlPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIj4KICAgICAgICAgPGRjOmZvcm1hdD5pbWFnZS9naWY8L2RjOmZvcm1hdD4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgCjw/eHBhY2tldCBlbmQ9InciPz4B//79/Pv6+fj39vX08/Lx8O/u7ezr6uno5+bl5OPi4eDf3t3c29rZ2NfW1dTT0tHQz87NzMvKycjHxsXEw8LBwL++vby7urm4t7a1tLOysbCvrq2sq6qpqKempaSjoqGgn56dnJuamZiXlpWUk5KRkI+OjYyLiomIh4aFhIOCgYB/fn18e3p5eHd2dXRzcnFwb25tbGtqaWhnZmVkY2JhYF9eXVxbWllYV1ZVVFNSUVBPTk1MS0pJSEdGRURDQkFAPz49PAA6OTg3NjU0MzIxMC8uLSwrKikoJyYlJCMiISAfHh0cGxoZGBcWFRQTEhEQDw4NDAsKCQgHBgUEAwIBAAAh+QQABwD/ACwAAAAApAAoAAAH/4AAgoOEhYaHiImKi4yNjo+QkZKTlJWWl5iZmpucnZ6foKGio6SlpqePAwoTEYIKGicsKRwLoxIhODq6uzMhEgOowZICER0nNSkQxCs2zc42KbWdHjlAQ9fY2ddCwMLeiQEKIjHNNRaCGs/qNjEKmgMbPtrz2UHd3/iDDifq5wAD5NY9m5CJgQ56CK/9yMdQAb9nMTAMQiBQXatLG6wlRJiDIT4OMUxYgLDAnaERFZuZuEcpxMaNMzwKE4CBQgFGAzjUWPdCg4BLEl5uVCEz2IAAkApM4PABhAUHmQbIe/njhgcPG1TwCDJkw6ABF0rcyEG2LNkSD1gKMpBhQ4a2cP8zGBA0QCxZtWxRzMjhgwdZGBUOJXjr1i3cQQZQ4LgLgPBbuG5dRZhMmbK0QRAqV24AacZLHxnU/pOQQNANrkJ/qGBAqELCBwAyYuM26MENIRt/hCjkmp4QQSg0DrEHADe9IIIWpHxByEFKCo8uvMwh+pBxodeAZBjkAeHv7tl8CEoAA/s1F4Rc0uMBoHy2HgAYJIQvCGVFzv9YVAQBCcfGHY7IZ95sFwiiAkI9SHDdNR090MOA1xAliAsI3bDBPDgAIB1HgyhXkQaCYFARC9UhMgBqx5XWyIYQDtEDMJ7Rk8MP88wwAI0tCjEXAP7RM8OCEcaWUEyDmDAiAAcEpE7/DSY50htCGTpy4RBC+ICDCy7A4MJUCMHGA0IoZoMChceF8MAFYWJTgiBfHkePV2TSs9sgDVRUAwIgVAQdJCVstJ0jKvQQAmuF1JVQYMJhVwKQ2EgwCArrCZLmS472SE+BhBgpkAgVfSCJpfQ46siOiTxITwUGMJobQuwN0uc8CyUAoY4AtEkPoR2mJBCJkuSwUYmJGFBBCTP0AMQPQPAwA47zVCDgRkLgoIIKviIEAyGvarPQkwkFcYMKLtwgCLPziKapruU0CYmpCInaSAIqJGpeBRm8dIOKAHCrjRD89kvPQuAlpAKpayXkg2h1otvMnpLYSs+fjJQwqXkGZEsP/wqFTNkiNgsdmBDEhASFkA6HHLATukxSAuo8ADIS8MZAtDefIR5vrBAA1dIj7iH1VmjIACQo3Iynk8SJ0JqKMCAvNjygUIEEkEaa8zxzErJyiySz2ywiFmsjISHpCG1DDQdMoq+P+A7CQAgX1KyNjYMYnU2GXM7j7iBu12NYYY4Zhqh3Jd6QkFeELHCy2BxQojWYPNwwww044FhC3dngagC52ahwYkIEA+dd54gYkNBCiBzULiEEtGBnRTQAqwiLG3ug6hCExPim6Aj9IJrGNZbIAMb5JkQyIotnk7Z967BAQUr+SGJ67AnxEEIJO2wkwdlMHzLA0tj4MIMLIXhQAv8MN/QgRKsvv53I7MgNMoGdDQxwuDrMTZIA9y8JAfvGOqqnM9c2i5LcsoE0QzxrHq0CgAJkUJEO1CclF5EEA4r3EnvgLxsOy0bM8pa5REzNPBISHEJA1pqEdOQfKRhRN95XkRT8ZBIDcI952MM7euAgfdkT4ZuClUGhEI6C18BVIXCIjWsBoAMpwc8/5qcOJU6CATCY2L52FgJVAcEDMfRZD7EBG0V44ILZOF8XpUicQwwQG7uBQEocmKmUmAATYBkTD3rggx407gYlQBUhHqACHNCxBzDYQDfOdIELZKCQhYRNBRBpSEaC7mcVgEEOevDHOupgBiW4AEsYeUhGJoIyAY1EZCdLswAIOMCUEEClA9SCgFOiUpVOLIosZ0nLWtrylrjMpS53ycte+vKXwAxmIAAAOw==</photo> </CREmployee>
In this example shortcut was used.
How find CRDataNode type?
Find type of CRDataNode helps describe
resource of REST API. For instance it is need to know toVisitProvinceNode for CRCompany:
Select GET $object/describe
hit try it out
enter CRCompany for $object field
hit execute
As a result:
... <relationship mandatory="0" destination-entity="CRDataNode" to-many="0" name="toVisitProvinceNode"> <qualifier>((typeID = 10) or (typeID = 0))</qualifier> <default>1</default> <nodeType>Regio</nodeType> </relationship> ...
How get list CRDataNode by type?
CRDataNode was toTypeNode relationship that contains information about type. Therefore it is need to use qualifier for request for getting list of CRDataNode. For instance getting list of Regio
:
Solution
$params = array( 'qualifier' => 'notActive != 1 and deleted != 1 and type.name = "Regio"', 'show' => array('value'), 'count' => 10 ); $regions = Carerix_Api_Rest_Entity_CRDataNode::findAll($params);
Get a list of CRUser statuses
The number of statuses found in CRUser model represents a number of business lines in Carerix.
Example:
<?xml version="1.0" encoding="UTF-8"?> <CREmployee id="52175"> <toUser> <CRUser id="91331"> <toSingleStatusNode> <CRDataNode id="87"> <type> <CRNodeType id="23"> <name>Kandidaat-status</name> </CRNodeType> </type> </CRDataNode> </toSingleStatusNode> <statuses count="0" /> </CRUser> </toUser> </CREmployee>
Example above shows:
System has one business line (property statuses is empty)
Name of statuses type of CREmployee is “Kandidaat-status”
We can now get a list of CRDataNodes with type “Kandidaat-status”
Algorithm the same for other entities like CRContact, etc.
Authorizing users, contacts, candidates
If you are a web developer tasked with building a login form that connects with Carerix database you have 1 option.
User credentials are exposed to the application.
To authorize users, developer would create a login form with username and password fields. When the form is submitted by user, the application would query CRUser model to find a matching record using username and password.
<?php // Example code based on CxRest PHP SDK. Adapt it to your own needs. $params = array("qualifier" => "userName = 'andrey' AND password = 'test' AND deleted = 0 AND isActive = 1"); $users = Carerix_Api_Rest_Entity_CRUser::findAll($params); if (count($users)) { $user = $users[0]; print_r($user); /* user exists start session show their profile etc. */ } ?>
How add CRAttachment to CREmployee?
Bad solution
public function saveCVToCarerix($userID, $cvLocation, $path, $employeeID){ $type = pathinfo($cvLocation, PATHINFO_EXTENSION); $data = file_get_contents($cvLocation.$path); $cvString = base64_encode($data); $owner = Carerix_Api_Rest_Entity_CRUser::find($userID); $attachment = new Carerix_Api_Rest_Entity_CRAttachment(array( 'content' => $cvString, 'toTypeNode' => array('id' => 60), 'owner' => $owner, 'filePath' => 'cv_'.$path, 'label' => 'cv', )); $attachment = $attachment->save(); $employee = Carerix_Api_Rest_Entity_CREmployee::find($employeeID); $employee->setAttachments($attachment); $employee->save(); }
It is not best choose to use 3 requests to add Attachment to Employee:
The first
$owner = Carerix_Api_Rest_Entity_CRUser::find($userID);
The second
$employee = Carerix_Api_Rest_Entity_CREmployee::find($employeeID);
The third
$employee→save();
More over all find
method was run without parameters that dramatically decreases performance.
Solution Good
$employee_id = 51858, // employeeID from publictest; $path = 'Entity/CREmployee/attachment/size.more.then.500.odt'; $data = array( 'toTypeNode' => array('id' => 1461), // documentatie 'owner' => array('id' => 77905), // Sergii Pryz 'filePath' => 'size.more.then.500.odt', 'label' => 'cv' ); $data['content'] = file_get_contents($dataPath.'/'.$path); $data['content'] = base64_encode($data['content']); $attachment = new Carerix_Api_Rest_Entity_CRAttachment($data); $employee = new Carerix_Api_Rest_Entity_CREmployee(); $result = $employee->setId($employee_id) ->setAttachments($attachment) ->save();
As a result we have only one request to server.
GDPR: How to set consent stage and consent date when candidate applies for a vacancy?
Carerix provides consent stages and their corresponding tags (fixed identifiers for both admin and web development usage):
NoConsentTag
ConsentAskedTag
ConsentGivenTag and its derivatives: LegitimateInterestTag, ContractualNecessityTag, LegalObligationTag, PublicInterestTag, VitalInterestTag
ConsentRevokedTag
If you are using Carerix WP plugin to power your job board then the consent stage is automatically set to ConsentGivenTag and Approval date is set to current time.
If you are running your own job board then you must ensure to explicitly ask a candidate for a consent by means of “I agree… ” checkbox and then add the following snippet to your 'CREmployee/apply' call
POST /CREmployee/apply host: api.carerix.com <?xml version="1.0" encoding="utf-8"?> <CREmployee> .... <toConsentStageNode><CRDataNode key="tags" value="ConsentGivenTag"/></toConsentStageNode> <privacyApprovalDate>2018-01-22 12:00:00</privacyApprovalDate> <toConsentPeriodNode><CRDataNode key="tags" value="ThreeMonthsTag"/></toConsentPeriodNode> </CREmployee>
NOTE: replace the date format with actual value
In case you're using PHP REST Client same can be achieved in a following way:
<?php ... $employee = new Carerix_Api_Rest_Entity_CREmployee(); $employee->setFirstName('John'); $employee->setLastName('Smith'); //set via array value $employee->setToConsentStageNode(array('attributes' => array('key' => 'tags', 'value' => 'ConsentGivenTag'))); //set using CRDataNode object $consentPeriodNode = new Carerix_Api_Rest_Entity_CRDataNode(); $consentPeriodNode->setAttributes(array('key' => 'tags', 'value' => 'ThreeMonthsTag')); $employee->setToConsentPeriodNode($consentPeriodNode); //or use $employee->save(); just to update GDPR values $params = array('x-cx-pub' => $publication_id); $employee = $employee->apply($params);
Release notes
all releases
all releases
v1.0.2
Add new methods for getting token using encryptedPassword
Add version tracking functionality
v1.0.1
improved support for large incoming XML messages (e.g. attachments) for POST and PUT requests.
v0.8.0
Access token can be revoked by Carerix administrator.
v0.8.1
Withdraw revocation access token
v0.8.2
CRToDo and it's virtual entities like CRTask, CRNote, CRMeeting, CRCampaign supports email resource
v0.8.3