Skip to content

Socio-Economics Types

POST socio_economics_types

Returns meta information (unit, available subtypes, subtype translations) about the specified socio-economics types.

Request#

curl -X POST 'https://api.pricehubble.com/api/v1/socio_economics_types?access_token=74126eab0a9048d993bda4b1b55ae074' \
  -H 'Content-Type: application/json' \
  -d '{
    "types": [
        "population_size",
        "foreign_nationals",
        "education_levels"
    ],
    "countryCode": "CH"
}'
Field Description Type Remarks
types A list of socio-economics types array of strings
countryCode ISO country code string CH, DE and FR are currently supported

Response#

{
  "types":[
    {
      "code": "population_size"
    },
    {
      "code": "foreign_nationals",
      "unit": "%"
    },
    {
      "code": "education_levels",
      "subtypes":[
        {
          "code": "no_education",
          "translations":[
            {
              "language": "en",
              "value": "uneducated"
            },
            {
              "language": "de",
              "value": "ungebildet"
            },
            {
              "language": "fr",
              "value": "ignare"
            }
          ]
        },
        {
          "code": "compulsory_education",
          "translations":[
            {
              "language": "en",
              "value": "compulsory education"
            },
            {
              "language": "de",
              "value": "obligatorische schule"
            },
            {
              "language": "fr",
              "value": "scolarité obligatoire"
            }
          ]
        },
        {
          "code": "upper_secondary_education",
          "translations":[
            {
              "language": "en",
              "value": "upper_secondary_education"
            },
            {
              "language": "de",
              "value": "sekundarstufe ii"
            },
            {
              "language": "fr",
              "value": "degré scondaire ii"
            }
          ]
        },
        {
          "code": "tertiary_level_education",
          "translations":[
            {
              "language": "en",
              "value": "tertiary_level_education"
            },
            {
              "language": "de",
              "value": "tertiärstufe"
            },
            {
              "language": "fr",
              "value": "degré tertiaire"
            }
          ]
        }
      ]
    }
  ]
}
Field Description Type Remarks
types List of matching socio-economics types array
types[i].code Code of the socio-economics type string
types[i].unit Measurement unit of the socio-economics type string
types[i].subtypes List of subtypes of the socio-economics type array empty array if there are no subtypes
types[i].subtypes[i].code Code of the subtype string
types[i].subtypes[i].translations List of translations of the subtype (in the locally relevant languages) array
types[i].subtypes[i].translations[i].language ISO language code of the translation enum
types[i].subtypes[i].translations[i].value Value of the translation string