Updates - Project API updates and PHP-SDK 1.1.3 release
Deprecations
Project under construction
<project>
<in_bau>1</in_bau> <!-- Use <status> instead -->
</project>
<?php
$project->getUnderConstruction(); // Use getProjectState() and isStateBuilding() instead
Employee profile picture
The profile picture will still be the first attachment object from getPictures() or getAttachments(). However since it’s now possible to get multiple attachments in those calls, it can occur, that a employee does not have a profile picture but other attachments.
To avoid this problem you can switch to the getProfilePicture() method or check if the getGroup() on the attachment is PROFILBILD.
<?php
$employee->getAttachments()[0]; // Use getProfilePicture() instead or check if $attachment->getGroup() == 'PROFILBILD' to identify the profile picture.
New features
Retrieve all projects regardless of active realties
projekt/list?alle=1
<?php
$projectQuery->all();
New project fields
Several new fields are available for projects:
- Project state can be planning, building, finished.
- Reference projects
- Url
- Completion Date
- Sale Start
projekt/list?filter[projekt_status]=planning
projekt/list?filter[referenz]=1
projekt/list?filter[fertigstellung_von]=2017-01-01&filter[fertigstellung_bis]=2017-01-31
projekt/list?filter[verkaufsstart_von]=2017-01-01&filter[verkaufsstart_bis]=2017-01-31
<project>
<status>building</status>
<referenz>1</referenz>
<fertigstellung>2017-03-30</fertigstellung>
<verkaufsstart>2017-01-31</verkaufsstart>
<url>https://...</url>
</project>
<?php
$projectQuery->filterByProjectState(Project::PROJECT_STATE_PLANNING);
$projectQuery->filterByIsReference(true);
$project->getProjectState(); // string: planning, building, finished
$project->isStatePlanning(); // bool
$project->isStateBuilding(); // bool
$project->isStateFinished(); // bool
$project->getIsReference(); // bool
$project->getUrl(); // string
$project->getCompletionDate($format = 'Y-m-d'); // string 2017-03-30
$project->getCompletionDate(null); // DateTime
$project->getSaleStart($format = 'Y-m-d'); // string 2017-01-31
$project->getSaleStart(null); // DateTime
All project realties
A new parameter has been introduced to project and realty calls, which allows to return all realties which are assigned to a active project regardless of the realty state. For security reasons this setting must explicitly be enabled in the API settings over the Justimmo interface.
Additionally there will be an information if the realty should be displayed in a search list.
projekt/list?alleProjektObjekte=1
projekt/detail?id=1234&alleProjektObjekte=1
objekt/list?filter[projekt_id]=12&alleProjektObjekte=1
<verwaltung_techn>
<user_defined_simplefield feldname="ji_anzeige_in_suchergebnis">1</user_defined_simplefield>
</verwaltung_techn>
<?php
$projectQuery->allProjectRealties(true);
$realtyQuery
->filterByProjectId(12)
->allProjectRealties(true);
$realty->getShowInSearch(); // bool
Ids call for employees and projects
The ids call is now available for projects and employees. It works the same as the realty ids call.
/projekt/ids
/team/ids
[
"1",
"2",
"4",
"5"
]
<?php
$projectQuery->findIds(); // returns array of ids
$employeeQuery->findIds(); // returns array of ids
Return only realtyIds in project calls
To decrease the data in project calls there is now a parameter to return only realty ids instead of additional realty data.
projekt/list?objektIds=1
projekt/detail?id=1234&objektIds=1
<immobilien_ids>
<id>66077</id>
<id>66076</id>
<id>66046</id>
<id>66040</id>
</immobilien_ids>
<?php
$projectQuery->onlyRealtyIds(true);
$project->getRealtyIds(); // array
Improved realty rent support
In addition to the summarized rent fields for all groups, the fields of the single rent row have been extended and SDK support has been added. Click here for a full price description.
<miete>
<netto>452.95</netto><!-- Rent without VAT -->
<brutto>498.25</brutto><!-- Rent with USt. -->
<ust>10</ust><!-- VAT in percent -->
<ust_wert>10</ust_wert><!-- VAT as user input -->
<ust_berechneter_wert>45.3</ust_berechneter_wert><!-- VAT -->
<ust_typ>percent</ust_typ><!-- Input user type for vat | numeric or percent -->
</miete>
<?php
$realty->getRentNet();
$realty->getRentGross();
$realty->getRentVat();
$realty->getRentVatInput();
$realty->getRentVatValue();
$realty->getRentVatType();
Filter by updated at in realty call
objekt/list?filter[aktualisiert_am_von]=2017-01-01&filter[aktualisiert_am_bis]=2017-01-31
<?php
$realtyQuery->filterByUpdatedAt(array('min' => '2017-01-01', 'max' => '2017-01-31'));
Multiple attachments and links for employees
Please see deprecations for further information about profile pictures.
<anhaenge>
<anhang location="REMOTE">
<anhangtitel>81.jpeg</anhangtitel>
<format>.jpg</format>
<daten>
<pfad>https://files.justimmo.at/public/pic/big/Awf77iCGNE.jpg</pfad>
</daten>
</anhang>
<anhang location="REMOTE" gruppe="LINKS">
<anhangtitel>Testlink</anhangtitel>
<format/>
<daten>
<pfad>https://www.justimmo.at</pfad>
</daten>
</anhang>
<anhang location="REMOTE" gruppe="FILMLINK">
<anhangtitel>Testvideo</anhangtitel>
<format/>
<daten>
<pfad>http://www.youtube.com</pfad>
</daten>
</anhang>
</anhaenge>
<?php
$employee->getProfilePicture(); // Attachment
$employee->getLinks(); // Attachment[]
$employee->getAttachments(); // Attachment[]
$employee->getPictures(); // Attachment[]
$employee->getDocuments(); // Attachment[]
$employee->getVideos(); // Attachment[]