Skip to content

Template Creation#

POST user-settings/templates/

Add a template which defines what to see on a PDF.

Request#

Example request#

curl -X POST 'https://api.pricehubble.com/api/v1/user-settings/templates/' \
  -H 'Authorization: Bearer 74126eab0a9048d993bda4b1b55ae074' \
  -H 'Content-Type: application/json' \
  -d '{
    "title": "My template",
    "countryCode": "CH",
    "level": "user",
    "rentType": "rent_net",
    "primaryColor": "#08964D",
    "frontCover": true,
    "backCover": false,
    "sections": [
      {
        "type": "overview",
        "enabled": true,
        "configuration": {
            "layout": "brochure"
        }
      },
      {
        "type": "comparables",
        "enabled": true,
        "configuration": {
            "offers": true,
            "transactions": true,
            "market_trends": true,
            "offer_details": true,
            "transaction_details": true
        }
      },
      {
        "type": "market",
        "enabled": false,
        "configuration": {}
      },
      {
        "type": "socio",
        "enabled": true,
        "configuration": {
            "economics": true,
            "demographics": true
        }
      },
      {
        "type": "environment",
        "enabled": true,
        "configuration": {
            "view": true,
            "noise": true,
            "nuisance": true
        }
      },
      {
        "type": "amenities",
        "enabled": true,
        "configuration": {
            "health": true,
            "leisure": true,
            "catering": true,
            "shopping": true,
            "education": true
        }
      },
      {
        "type": "accessibility",
        "enabled": true,
        "configuration": {}
      },
      {
        "type": "projects",
        "enabled": true,
        "configuration": {}
      },
      {
        "type": "attachments.floorplan",
        "enabled": true,
        "configuration": {}
      },
      {
        "type": "attachments.permit",
        "enabled": true,
        "configuration": {}
      },
      {
        "type": "attachments.marketing",
        "enabled": true,
        "configuration": {}
      },
      {
        "type": "attachments.valuation",
        "enabled": true,
        "configuration": {}
      },
      {
        "type": "attachments.other",
        "enabled": true,
        "configuration": {}
      }
    ]
  }'

Request fields#

Field Description Type Remarks
title The title of the template string
level The visibility level of the template string user or organization. Only admin users can add organization-level Templates. organization-level Templates are visible by anyone in the organization, while user-level Templates are only visible by the creator.
countryCode ISO country code string
rentType Rent type to use if the PDF printed contains rent valuations string rent_net or rent_gross. Default: rent_gross.
primaryColor Main color applied to graphic elements (hex with #) string Default: #066ABE.
frontCover Whether to display a front cover or not boolean Default: true
backCover Whether to display a back cover or not boolean Default: true
sections Order and visibility of sections Array of Sections The order in the array defines the order in the PDF.

Response#

Example Response#

{
    "id": "e1bb921e-7d77-4914-84b3-1529b22842e8"
}

Response fields#

Field Description Type Remarks
id Id of the created Template uuid

Section#

Sections are the configurable elements.

Field Description Type Remarks
type Type of the section string Possible values overview, comparables, amenities, market, socio, projects, accessibility, environment, valuation, attachments.floorplan, attachments.permit, attachments.marketing, attachments.valuation, attachments.other. Available types may differ by country, refer to the below table for the available types.
enabled Whether the section should be visible or not boolean
configuration Specific configuration for this type of Section json May differ by country, refer to the table below.

Section configuration#

The following table shows the different configurations by type values and the availability by country. Each section type and configuration items available in one country is required there.

Section type value Configuration Configuration type Remarks
overview
layout string appraisal or brochure. This will define the overall layout of the PDF.
comparables
offers boolean Whether to show the offers overview
offer_details boolean Whether to show the detail of each offers in PDF
transactions boolean Whether to show the similar transactions overview. Only available in FR, DE.
transaction_details boolean Whether to show the detail of each transactions. Only available in FR, DE.
market_trends boolean Whether to show the trends graphs. It will show the old version of the market trends graph. For the new version, please use market section. Only one of the two can be added to a template.
amenities
health boolean Whether to show the health amenities
leisure boolean Whether to show the leisure amenities
catering boolean Whether to show the catering amenities
shopping boolean Whether to show the shopping amenities
education boolean Whether to show the education amenities
market configuration is {}. It will show the new version of the market trends graph. For the old version, please use market_trends configuration under comparables section. Only one of the two can be added to a template.
socio Only available in AT, BE, CH, DE, FR, NL.
demographics boolean Whether to show demographics graphs.
economics boolean Whether to show economics graphs. Only available in AT, CH, DE, FR, NL
housing boolean Whether to show housing graphs. Only available in FR, AT, and DE
projects Only available in AT, CH, DE, FR, JP. configuration is {}.
accessibility configuration is {}.
environment
view boolean Whether to show the view levels. Only available in CH.
noise boolean Whether to show the noise levels. Available in all countries except JP.
nuisance boolean Whether to show nuisance levels. Only available in CH.
valuation Only available if layout configuration of overview is appraisal. configuration is {}.
cadastre Only available in FR. configuration is {}.
attachments.floorplan Displays the floorplan-type Attachments. configuration is {}.
attachments.permit Displays the permit-type Attachments. configuration is {}.
attachments.marketing Displays the marketing-type Attachments. configuration is {}.
attachments.valuation Displays the valuation-type Attachments. configuration is {}.
attachments.other Displays the other-type Attachments. configuration is {}.